|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CPatchInfo Struct ReferenceThe struct for building a patch.
More...
#include <zone.h>
List of all members.
Patch geometry. |
void | setCornerSmoothFlag (uint corner, bool smooth) |
| setup NoiseSmooth flags: used for Noise geometry and lighting. NB: convention: corner0==A, corner1==B ... More...
|
bool | getCornerSmoothFlag (uint corner) const |
CBezierPatch | Patch |
| The patch coordinates. More...
|
uint8 | OrderS |
| Tile Order for the patch. More...
|
uint8 | OrderT |
| Tile Order for the patch. More...
|
float | ErrorSize |
| The Base Size*bumpiness of the patch (/2 at each subdivide). Set to 0, if you want CZone to compute it for you. More...
|
uint16 | BaseVertices [4] |
| The base corner vertices indices in the current zone. Used for patch connectivity. More...
|
uint8 | Flags |
| "The don't smooth" flags. More...
|
uint8 | NoiseRotation |
| The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap. More...
|
Public Methods |
void | setSmoothFlag (uint edge, bool flag) |
| Set the smooth flag for the n-th edge. More...
|
bool | getSmoothFlag (uint edge) |
| Get the smooth flag for the n-th edge. More...
|
bool | getNeighborTile (uint patchId, uint edge, sint position, uint &patchOut, sint &sOut, sint &tOut, const std::vector< CPatchInfo > &patchInfos) const |
| Get neighbor tile across a edge. More...
|
| CPatchInfo () |
Static Public Methods |
bool | transform (std::vector< CPatchInfo > &patchInfo, NL3D::CZoneSymmetrisation &zoneSymmetry, const NL3D::CTileBank &bank, bool symmetry, uint rotate, float snapCell, float weldThreshold, const NLMISC::CMatrix &toOriginalSpace) |
| Adjusts a CPatchInfo array to get a symmetrized / rotated zone with matching oriented tiles. More...
|
bool | getTileSymmetryRotate (const NL3D::CTileBank &bank, uint tile, bool &symmetry, uint &rotate) |
bool | transformTile (const NL3D::CTileBank &bank, uint &tile, uint &tileRotation, bool symmetry, uint rotate, bool goofy) |
void | transform256Case (const NL3D::CTileBank &bank, uint8 &case256, uint tileRotation, bool symmetry, uint rotate, bool goofy) |
Public Attributes |
|
std::vector< CTileElement > | Tiles |
| The Tiles for this patch. More...
|
std::vector< CTileColor > | TileColors |
| The Tile colors for this patch. More...
|
std::vector< uint8 > | Lumels |
| The Tile lumels for this patch. More...
|
std::vector< CTileLightInfluence > | TileLightInfluences |
| There is (OrderS/2+1) * (OrderT/2+1) tiles light influence. More...
|
|
CBindInfo | BindEdges [4] |
Private Attributes |
uint8 | _CornerSmoothFlag |
Detailed Description
The struct for building a patch.
NB: Different from the one which is stored. -
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2000
Definition at line 85 of file src/3d/zone.h.
Constructor & Destructor Documentation
NL3D::CPatchInfo::CPatchInfo |
( |
|
) |
[inline] |
|
Member Function Documentation
bool NL3D::CPatchInfo::getCornerSmoothFlag |
( |
uint |
corner |
) |
const |
|
bool NL3D::CPatchInfo::getNeighborTile |
( |
uint |
patchId, |
|
|
uint |
edge, |
|
|
sint |
position, |
|
|
uint & |
patchOut, |
|
|
sint & |
sOut, |
|
|
sint & |
tOut, |
|
|
const std::vector< CPatchInfo > & |
patchInfos |
|
) |
const |
|
|
Get neighbor tile across a edge.
-
Parameters:
-
patchid |
is the id of this patch |
edge |
is the edge shared with the neigbor |
position |
is the position over the edge in CCW across the patch. So if edge == 0, position is oriented like OT So if edge == 1, position is oriented like OS So if edge == 2, position is oriented like -OT So if edge == 3, position is oriented like -OS |
patchOut |
will be filled with the output patch id |
sOut |
will be filled with the output patch s coordinate |
tOut |
will be filled with the output patch t coordinate |
patchInfos |
is the vector of all patch info |
-
Returns:
-
false if no neighbor has been found or tile ratio is not the same than in this patch.
|
bool NL3D::CPatchInfo::getSmoothFlag |
( |
uint |
edge |
) |
[inline] |
|
|
Get the smooth flag for the n-th edge.
Return false if this edge must by smoothed, true else.
Definition at line 191 of file src/3d/zone.h.
References Flags. |
bool NL3D::CPatchInfo::getTileSymmetryRotate |
( |
const NL3D::CTileBank & |
bank, |
|
|
uint |
tile, |
|
|
bool & |
symmetry, |
|
|
uint & |
rotate |
|
) |
[static] |
|
void NL3D::CPatchInfo::setCornerSmoothFlag |
( |
uint |
corner, |
|
|
bool |
smooth |
|
) |
|
|
|
setup NoiseSmooth flags: used for Noise geometry and lighting. NB: convention: corner0==A, corner1==B ...
Definition at line 55 of file 3d/zone.cpp.
References _CornerSmoothFlag, and nlassert. |
void NL3D::CPatchInfo::setSmoothFlag |
( |
uint |
edge, |
|
|
bool |
flag |
|
) |
[inline] |
|
|
Set the smooth flag for the n-th edge.
flag is false if this edge must by smoothed, true else.
Definition at line 179 of file src/3d/zone.h.
References Flags. |
|
Adjusts a CPatchInfo array to get a symmetrized / rotated zone with matching oriented tiles.
This method only adjuste tile and vertex color array, does'nt transform vertices.
Transform an array of patchInfo by a symmetry on OY axis followed by a 90° CCW rotation (0, 1, 2, 3).
The method doesn't transform vertices. If symmetry, the method invert 0-3 and 1-2 vertices indexes to get CCW oriented patches. It will fix bind informations. The method fixes tile and color vertex arrays. The method fixes tile rotation, 256 cases and tile transistions.
Return false if something wrong.
Definition at line 1669 of file 3d/zone.cpp.
References NL3D::CZoneSymmetrisation::build, CPatchInfo, NL3D::CZoneSymmetrisation::getTileState, getTileSymmetryRotate, NLAISCRIPT::l, nlwarning, transform256Case, transformTile, and v. |
void NL3D::CPatchInfo::transform256Case |
( |
const NL3D::CTileBank & |
bank, |
|
|
uint8 & |
case256, |
|
|
uint |
tileRotation, |
|
|
bool |
symmetry, |
|
|
uint |
rotate, |
|
|
bool |
goofy |
|
) |
[static] |
|
bool NL3D::CPatchInfo::transformTile |
( |
const NL3D::CTileBank & |
bank, |
|
|
uint & |
tile, |
|
|
uint & |
tileRotation, |
|
|
bool |
symmetry, |
|
|
uint |
rotate, |
|
|
bool |
goofy |
|
) |
[static] |
|
Member Data Documentation
uint8 NL3D::CPatchInfo::_CornerSmoothFlag [private]
|
|
uint16 NL3D::CPatchInfo::BaseVertices[4]
|
|
|
The base corner vertices indices in the current zone. Used for patch connectivity.
Definition at line 125 of file src/3d/zone.h. |
float NL3D::CPatchInfo::ErrorSize
|
|
|
The Base Size*bumpiness of the patch (/2 at each subdivide). Set to 0, if you want CZone to compute it for you.
Definition at line 123 of file src/3d/zone.h.
Referenced by CPatchInfo. |
uint8 NL3D::CPatchInfo::Flags
|
|
|
"The don't smooth" flags.
For each edge of the patch (0~3), the flag means that this patch mustn't be smoothed with its neightbor. The n-th edge links the vertices "n" and "(n+1)%4". The flag for the n-th edge is (1<<n).
Definition at line 129 of file src/3d/zone.h.
Referenced by getSmoothFlag, and setSmoothFlag. |
std::vector<uint8> NL3D::CPatchInfo::Lumels
|
|
|
The Tile lumels for this patch.
There must be (OrderS*4+1)*(OrderT*4+1) tile lumels. Those are lumel value in tiles. There is 4x4 lumels by tiles plus last lumels. They are stored in line first order, from S=0 to 1, and T=0 to 1.
Definition at line 160 of file src/3d/zone.h. |
uint8 NL3D::CPatchInfo::NoiseRotation
|
|
|
The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap.
Definition at line 133 of file src/3d/zone.h.
Referenced by CPatchInfo. |
uint8 NL3D::CPatchInfo::OrderS
|
|
uint8 NL3D::CPatchInfo::OrderT
|
|
std::vector<CTileColor> NL3D::CPatchInfo::TileColors
|
|
|
The Tile colors for this patch.
There must be (OrderS+1)*(OrderT+1) tile colors. Those are the colors at the corners of the tiles. They are stored in line first order, from S=0 to 1, and T=0 to 1.
Definition at line 154 of file src/3d/zone.h. |
|
There is (OrderS/2+1) * (OrderT/2+1) tiles light influence.
It indicates which static pointLight influence each corner of a TessBlock (block of 2*2 tiles).
If size==0, suppose no light influence. but CZone::retrieve() always return a size == (OrderS/2+1) * (OrderT/2+1).
They are stored in line first order, from S=0 to 1, and T=0 to 1.
Definition at line 170 of file src/3d/zone.h. |
The documentation for this struct was generated from the following files:
|
|