A landscape patch. More...
#include <patch.h>
Classes | |
| struct | CBindInfo |
Public Member Functions | |
| CPatch () | |
| Constructor. | |
| ~CPatch () | |
| dtor | |
| void | compile (CZone *z, uint patchId, uint8 orderS, uint8 orderT, CTessVertex *baseVertices[4], float errorSize=0) |
| compile a valid patch. | |
| void | release () |
| Un-compile a patch. Tesselation is deleted. if patch is not compiled, no - op. | |
| CLandscape * | getLandscape () const |
| Get the landscape in which is placed this patch. | |
| CZone * | getZone () const |
| uint8 | getOrderS () const |
| uint8 | getOrderT () const |
| uint8 | getOrderForEdge (sint8 edge) const |
| float | getErrorSize () const |
| sint | getFar0 () const |
| sint | getFar1 () const |
| uint16 | getPatchId () const |
| void | getBindNeighbor (uint edge, CBindInfo &neighborEdge) const |
| return neighborhood information. | |
| CAABBox | buildBBox () const |
| Build the bbox of the patch, according to ctrl points, and displacement map max value. | |
| CVector | computeVertex (float s, float t) const |
| Compute a vertex. | |
| CVector | computeContinousVertex (float s, float t) const |
| Same as computeVertex, but special accurate version for CVisualCollisionEntity. | |
| void | unbind () |
| unbind the patch from All neighbors. | |
| void | bind (CBindInfo Edges[4], bool rebind) |
| bind the patch to 4 neighbors, given in this patch edge order (0,1,2,3). | |
| void | forceMergeAtTileLevel () |
| For changing TileMaxSubdivision. force tesselation to be under tile. | |
| void | averageTesselationVertices () |
| This is especially for Pacs. | |
| void | refineAll () |
| Refine this patch. Even if clipped. Refine all nodes. | |
| void | resetRenderFar () |
| void | deleteTileUvs () |
| void | recreateTileUvs () |
| void | refreshTesselationGeometry () |
| void | serial (NLMISC::IStream &f) |
| void | unpack (CBezierPatch &p) const |
| bool | isRenderClipped () const |
| const CTessVertex * | getCornerVertex (uint corner) |
| uint | getTileMaterialRefCount () const |
| Get number of TileMaterial created in this Patch. | |
| CBezierPatch * | unpackIntoCache () const |
Render | |
| void | preRender (const NLMISC::CBSphere &patchSphere) |
| preRender this patch. Build Max faces / pass etc... | |
| void | updateTextureFarOnly (const NLMISC::CBSphere &patchSphere) |
| void | renderFar0 () |
| Render this patch, if not clipped. Call PatchCurrentDriver->renderSimpleTriangles(). | |
| void | renderFar1 () |
| void | computeSoftwareGeomorphAndAlpha () |
| void | updateClipPatchVB (bool renderClipped) |
| CPatch * | getNextFar0ToRdr () const |
| CPatch * | getNextFar1ToRdr () const |
Smooth flags methods | |
| void | setSmoothFlag (uint edge, bool flag) |
| Set the smooth flag for the n-th edge. | |
| bool | getSmoothFlag (uint edge) const |
| Get the smooth flag for the n-th edge. | |
Subdivision / ForCollision. | |
| void | addTrianglesInBBox (CPatchIdent paId, const CAABBox &bbox, std::vector< CTrianglePatch > &triangles, uint8 tileTessLevel) const |
| Add triangles to triangles array which intersect the bbox. | |
| void | fillPatchQuadBlock (CPatchQuadBlock &quadBlock) const |
| Fill a CPatchQuadBlock, from its required PatchId. | |
| void | addPatchBlocksInBBox (CPatchIdent paId, const CAABBox &bbox, std::vector< CPatchBlockIdent > &paBlockIds) const |
| Add CPatchBlockIdent to CPatchBlockIdent array which intersect the bbox. | |
| CVector | getTesselatedPos (CUV uv) const |
| From the current tesselation of this patch, and a UV in this patch, return tesselated position. | |
| void | appendTessellationLeaves (std::vector< const CTessFace * > &leaves) const |
| From the current tesselation of this patch, append to the list of leaves faces. | |
Lightmap get interface. | |
| uint8 | getLumel (const CUV &uv) const |
| Get the lumel under the position. | |
| void | appendTileLightInfluences (const CUV &uv, std::vector< CPointLightInfluence > &pointLightList) const |
| Append lights under the position to pointLightList. | |
| void | computeCurrentTLILightmapDiv2 (NLMISC::CRGBA *array) const |
| For CTextureFar, compute current TLI Lightmap at tile level. | |
Tiles get interface. | |
| CTileElement * | getTileElement (const CUV &uv) |
| Get the lumel under the position. | |
VB Allocator mgt. | |
| void | deleteVBAndFaceVector () |
| void | allocateVBAndFaceVector () |
| void | fillVB () |
| void | fillVBIfVisible () |
| void | deleteVBAndFaceVectorFar1Only () |
| void | allocateVBAndFaceVectorFar1Only () |
| void | fillVBFar0Only () |
| void | fillVBFar1Only () |
| void | fillVBFarsDLMUvOnly () |
| void | fillFar0DLMUvOnlyVertexListVB (CTessList< CTessFarVertex > &vertList) |
| void | fillFar1DLMUvOnlyVertexListVB (CTessList< CTessFarVertex > &vertList) |
| void | debugAllocationMarkIndices (uint marker) |
| void | recreateTessBlockFaceVector (CTessBlock &block) |
MicroVegetation | |
| void | deleteAllVegetableIgs () |
| Delete any vegetable Ig still existing in this patch. | |
| void | recreateAllVegetableIgs () |
| Recreate any vegetable block (as possible) in this patch. (useful for edition). | |
TileLightInfluences | |
| void | resetTileLightInfluences () |
| make a valid empty array of TileLightInfluences (ie resized to good size, but with empty light influences | |
Public Attributes | |
| CVector3s | Vertices [4] |
| The patch coordinates (see CBezierPatch). | |
| CVector3s | Tangents [8] |
| CVector3s | Interiors [4] |
| std::vector< uint8 > | CompressedLumels |
| std::vector< CTileElement > | Tiles |
| std::vector< CTileColor > | TileColors |
| std::vector< CTileLightInfluence > | TileLightInfluences |
Private Member Functions | |
| void | computeDefaultErrorSize () |
| void | makeRoots () |
| CTessFace * | getRootFaceForEdge (sint edge) const |
| CTessVertex * | getRootVertexForEdge (sint edge) const |
| void | changeEdgeNeighbor (sint edge, CTessFace *to) |
| void | computeNewFar (const NLMISC::CBSphere &patchSphere, sint &newFar0, sint &newFar1) |
| void | fillFar0VertexVB (CTessFarVertex *pVert) |
| void | fillFar1VertexVB (CTessFarVertex *pVert) |
| void | fillTileVertexVB (CTessNearVertex *pVert) |
| void | fillFar0VertexListVB (CTessList< CTessFarVertex > &vertList) |
| void | fillFar1VertexListVB (CTessList< CTessFarVertex > &vertList) |
| void | fillTileVertexListVB (CTessList< CTessNearVertex > &vertList) |
| void | updateFar0VBAlloc (CTessList< CTessFarVertex > &vertList, bool alloc) |
| void | updateFar1VBAlloc (CTessList< CTessFarVertex > &vertList, bool alloc) |
| void | updateTileVBAlloc (CTessList< CTessNearVertex > &vertList, bool alloc) |
| void | updateVBAlloc (bool alloc) |
| void | debugAllocationMarkIndicesFarList (CTessList< CTessFarVertex > &vertList, uint marker) |
| void | debugAllocationMarkIndicesNearList (CTessList< CTessNearVertex > &vertList, uint marker) |
| void | createFaceVectorFar1 () |
| void | deleteFaceVectorFar1 () |
| void | createFaceVectorFar0OrTile () |
| void | deleteFaceVectorFar0OrTile () |
| void | checkCreateVertexVBFar (CTessFarVertex *pVert) |
| void | checkCreateVertexVBNear (CTessNearVertex *pVert) |
| void | checkFillVertexVBFar (CTessFarVertex *pVert) |
| void | checkFillVertexVBNear (CTessNearVertex *pVert) |
| void | checkDeleteVertexVBFar (CTessFarVertex *pVert) |
| void | checkDeleteVertexVBNear (CTessNearVertex *pVert) |
| void | computeGeomorphVertexList (CTessList< CTessFarVertex > &vertList) |
| void | computeGeomorphFar0VertexListVB (CTessList< CTessFarVertex > &vertList) |
| void | computeGeomorphAlphaFar1VertexListVB (CTessList< CTessFarVertex > &vertList) |
| void | computeGeomorphTileVertexListVB (CTessList< CTessNearVertex > &vertList) |
| void | computeTbTm (uint &numtb, uint &numtm, uint ts, uint tt) |
Texture mgt. | |
| CPatchRdrPass * | getTileRenderPass (sint tileId, sint pass) |
| void | getTileUvInfo (sint tileId, sint pass, bool alpha, uint8 &orient, CVector &uvScaleBias, bool &is256x256, uint8 &uvOff) |
| void | getTileLightMap (uint ts, uint tt, CPatchRdrPass *&rdrpass) |
| void | getTileLightMapUvInfo (uint ts, uint tt, CVector &uvScaleBias) |
| void | releaseTileLightMap (uint ts, uint tt) |
| void | computeNearBlockLightmap (uint ts, uint tt, NLMISC::CRGBA *lightText) |
| void | computeTileLightmapPixelAroundCorner (const NLMISC::CVector2f &stIn, NLMISC::CRGBA *dest, bool lookAround) |
| void | computeTileLightmap (uint ts, uint tt, NLMISC::CRGBA *dest, uint stride) |
| void | computeTileLightmapEdge (uint ts, uint tt, uint edge, NLMISC::CRGBA *dest, uint stride, bool inverse) |
| void | computeTileLightmapPixel (uint ts, uint tt, uint s, uint t, NLMISC::CRGBA *dest) |
| void | computeTileLightmapAutomatic (uint ts, uint tt, NLMISC::CRGBA *dest, uint stride) |
| void | computeTileLightmapEdgeAutomatic (uint ts, uint tt, uint edge, NLMISC::CRGBA *dest, uint stride, bool inverse) |
| void | computeTileLightmapPixelAutomatic (uint ts, uint tt, uint s, uint t, NLMISC::CRGBA *dest) |
| void | computeTileLightmapPrecomputed (uint ts, uint tt, NLMISC::CRGBA *dest, uint stride) |
| void | computeTileLightmapEdgePrecomputed (uint ts, uint tt, uint edge, NLMISC::CRGBA *dest, uint stride, bool inverse) |
| void | computeTileLightmapPixelPrecomputed (uint ts, uint tt, uint s, uint t, NLMISC::CRGBA *dest) |
| void | modulateTileLightmapWithTileColors (uint ts, uint tt, NLMISC::CRGBA *dest, uint stride) |
| void | modulateTileLightmapEdgeWithTileColors (uint ts, uint tt, uint edge, NLMISC::CRGBA *dest, uint stride, bool inverse) |
| void | modulateTileLightmapPixelWithTileColors (uint ts, uint tt, uint s, uint t, NLMISC::CRGBA *dest) |
| void | getTileTileColors (uint ts, uint tt, NLMISC::CRGBA corners[4]) |
| CRGBA | getCurrentTLIColor (uint x, uint y) const |
| void | getCurrentTileTLIColors (uint ts, uint tt, NLMISC::CRGBA corners[4]) |
| void | addTileLightmapWithTLI (uint ts, uint tt, NLMISC::CRGBA *dest, uint stride) |
| void | addTileLightmapEdgeWithTLI (uint ts, uint tt, uint edge, NLMISC::CRGBA *dest, uint stride, bool inverse) |
| void | addTileLightmapPixelWithTLI (uint ts, uint tt, uint s, uint t, NLMISC::CRGBA *dest) |
Subdivision private. | |
| void | buildBBoxFromBezierPatch (const CBezierPatch &p, CAABBox &ret) const |
| build a bbox from the convex hull of a bezier patch, enlarged with noise. | |
| void | addTrianglesInBBoxRecurs (CPatchIdent paId, const CAABBox &bbox, std::vector< CTrianglePatch > &triangles, uint8 tessLevel, const CBezierPatch &pa, uint8 s0, uint8 s1, uint8 t0, uint8 t1) const |
| recurse subdivide of the bezierPatch. | |
| void | addTileTrianglesInBBox (CPatchIdent paId, const CAABBox &bbox, std::vector< CTrianglePatch > &triangles, uint8 tessLevel, uint8 s0, uint8 t0) const |
| called by addTrianglesInBBoxRecurs(). | |
| void | addPatchBlocksInBBoxRecurs (CPatchIdent paId, const CAABBox &bbox, std::vector< CPatchBlockIdent > &paBlockIds, const CBezierPatch &pa, uint8 s0, uint8 s1, uint8 t0, uint8 t1) const |
| recurse method of addPatchBlocksInBBox. | |
| CVector | computeVertexButCorner (float s, float t, bool &onCorner) const |
| Used by computeContinousVertex(). | |
Private Attributes | |
| CZone * | Zone |
| uint16 | PatchId |
| uint8 | OrderS |
| uint8 | OrderT |
| bool | ExcludeFromRefineAll |
| sint | TessBlockLimitLevel |
| sint | TileLimitLevel |
| sint | SquareLimitLevel |
| float | ErrorSize |
| CTessFace * | Son0 |
| CTessFace * | Son1 |
| CTessVertex * | BaseVertices [4] |
| CTessFarVertex | BaseFarVertices [4] |
| float | Far0UScale |
| float | Far0VScale |
| float | Far0UBias |
| float | Far0VBias |
| float | Far1UScale |
| float | Far1VScale |
| float | Far1UBias |
| float | Far1VBias |
| uint8 | Flags |
| Flags NL_PATCH_FAR0_ROTATED and NL_PATCH_FAR1_ROTATED NL_PATCH_FAR0_ROTATED for Far0, NL_PATCH_FAR1_ROTATED for Far1 If the flag is set, the far texture of the patch is rotated of 1 (to the left of course). | |
| float | TransitionSqrMin |
| float | OOTransitionSqrDelta |
| sint | Far0 |
| sint | Far1 |
| CPatchRdrPass * | _PatchRdrPassFar0 |
| CPatch * | _NextRdrFar0 |
| CPatchRdrPass * | _PatchRdrPassFar1 |
| CPatch * | _NextRdrFar1 |
Vegetables. | |
| std::vector < CVegetableClipBlock * > | VegetableClipBlocks |
| list of vegetable clipBlocks, created/destroyed at same time as TessBlocks. | |
Static Private Attributes | |
| static uint32 | _Version = 7 |
| Stream version of the class. | |
| static CBezierPatch | CachePatch |
| static const CPatch * | LastPatch = NULL |
Friends | |
| class | CTessFace |
| class | CZone |
| class | CLandscapeVegetableBlock |
| class | CPatchRdrPass |
RenderList mgt. | |
|
| |
| enum | TFarVertType { FVMasterBlock = 0, FVTessBlock, FVTessBlockEdge } |
| void | resetMasterBlock () |
| void | clearTessBlocks () |
| void | addRefTessBlocks () |
| void | decRefTessBlocks () |
| uint | getNumTessBlock (CTessFace *face) |
| void | getNumTessBlock (CParamCoord pc, TFarVertType &type, uint &numtb) |
| void | dirtTessBlockFaceVector (CTessBlock &block) |
| void | appendFaceToRenderList (CTessFace *face) |
| void | removeFaceFromRenderList (CTessFace *face) |
| void | appendFaceToTileRenderList (CTessFace *face) |
| void | removeFaceFromTileRenderList (CTessFace *face) |
| void | extendTessBlockWithEndPos (CTessFace *face) |
| void | appendTileMaterialToRenderList (CTileMaterial *tm) |
| void | removeTileMaterialFromRenderList (CTileMaterial *tm) |
| void | appendFarVertexToRenderList (CTessFarVertex *fv) |
| void | removeFarVertexFromRenderList (CTessFarVertex *fv) |
| void | appendNearVertexToRenderList (CTileMaterial *tileMat, CTessNearVertex *nv) |
| void | removeNearVertexFromRenderList (CTileMaterial *tileMat, CTessNearVertex *nv) |
|
| |
| uint8 | NoiseRotation |
| Noise Data. | |
| uint8 | _CornerSmoothFlag |
| Put here for packing with NoiseRotation. | |
| CZone * | _BindZoneNeighbor [4] |
| Realtime Bind information. | |
| void | setCornerSmoothFlag (uint corner, bool smooth) |
| setup Smooth flags for Noise on corner: used for Noise geometry and for lighting. | |
| bool | getCornerSmoothFlag (uint corner) const |
| CTessFace * | linkTessFaceWithEdge (const NLMISC::CVector2f &uv0, const NLMISC::CVector2f &uv1, CTessFace *linkTo) |
| Used by bind(). | |
| float | computeDisplaceRawInteger (sint ts, sint tt, sint ms, sint mt) const |
| Noise Geometry. | |
| void | computeDisplaceRawCoordinates (float sTile, float tTile, float s, float t, sint &ts, sint &tt, sint &ms, sint &mt) const |
| float | computeDisplaceRaw (float sTile, float tTile, float s, float t) const |
| compute the displacement for s,t ([0;OrderS], [0;OrderT]) (sTile, tTile) choose what NoiseMap to use, and (s,t) choose the coordinate in the patch to compute this NoiseMap. | |
| float | computeDisplaceRawOnNeighbor (float sTile, float tTile, float s, float t) const |
| useful only for computeDisplaceCornerSmooth(). | |
| float | computeDisplaceInteriorSmooth (float s, float t) const |
| compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). | |
| float | computeDisplaceEdgeSmooth (float s, float t, sint8 smoothBorderX, sint8 smoothBorderY) const |
| compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). | |
| float | computeDisplaceCornerSmooth (float s, float t, sint8 smoothBorderX, sint8 smoothBorderY) const |
| compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). | |
| CVector | computeNormalEdgeSmooth (float s, float t, sint8 smoothBorderX, sint8 smoothBorderY) const |
| compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]). | |
| CVector | computeNormalCornerSmooth (float s, float t, sint8 smoothBorderX, sint8 smoothBorderY) const |
| compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]). | |
| CVector | computeNormalOnNeighbor (float s, float t, uint edgeExclude) const |
| same reasoning as in computeDisplaceRawOnNeighbor(). | |
| void | computeNoise (float s, float t, CVector &displace) const |
| compute the Final displacement for s,t ([0;1], [0;1]). | |
| void | createVegetableBlock (uint numTb, uint ts, uint tt) |
| Micro-Vegetation. | |
| void | releaseVegetableBlock (uint numTb) |
| release the vegetableBlock in the corresponding TessBlock. TessBlocks must exist | |
| void | generateTileVegetable (CVegetableInstanceGroup *vegetIg, uint distType, uint ts, uint tt, CLandscapeVegetableBlockCreateContext &vbCreateCtx) |
| void | getTileLumelmapPrecomputed (uint ts, uint tt, uint8 *dest, uint stride) |
| void | getTileLumelmapPixelPrecomputed (uint ts, uint tt, uint s, uint t, uint8 &dest) const |
| same as computeTileLightmapPixelPrecomputed, but brut result, not modified by colorTable. | |
Block renders. | |
|
| |
| CTessBlock | MasterBlock |
| sint | NumRenderableFaces |
| NLMISC::CObjectVector< CTessBlock > | TessBlocks |
| sint | TessBlockRefCount |
UpdateLighting Management | |
|
| |
| CPatch * | _ULNearPrec |
| CPatch * | _ULNearNext |
| void | linkBeforeNearUL (CPatch *patchNext) |
| For lighting update, insert this before patchNext (CiruclarList). textNext must be !NULL. | |
| void | unlinkNearUL () |
| For lighting update, unlink (CiruclarList). | |
| CPatch * | getNextNearUL () const |
| For lighting update, get Next (CiruclarList). If ==this, then list is empty. | |
| uint | getNumNearTessBlocks () const |
| get the number of Near TessBlocks. Actually OrderS/2*OrderT/2. | |
| uint | updateTessBlockLighting (uint numTb) |
| recompute the near lightmap of tessBlock "numTb". | |
Dynamic Lighting Management | |
|
| |
| CPatchDLMContext * | _DLMContext |
| The Dynamic LightMap context. | |
| sint | _DLMContextRefCount |
| The reference count for DLMContext. | |
| void | beginDLMLighting () |
| begin Dynamic light Process. | |
| void | processDLMLight (CPatchDLMPointLight &pl) |
| Process a Dynamic light, creating the DLMContext if necessary. | |
| void | endDLMLighting () |
| end Dynamic light Process, deleting the DLMContext if necessary. | |
| void | addRefDLMContext () |
| Add a ref count to the DLMContext, creating it if necessary. | |
| void | decRefDLMContext (uint count=1) |
| Dec a ref count to the DLMContext, deleting it if refCount== 0. | |
Lumels methods | |
|
| |
| void | unpackShadowMap (uint8 *pShadow) |
| Unpack the lumels of the patches. | |
| void | packShadowMap (const uint8 *pLumel) |
| Pack the lumels of the patches. | |
| void | resetCompressedLumels () |
| Rebuild the packed lumels without shadow. | |
| void | setupColorsFromTileFlags (const NLMISC::CRGBA colors[4]) |
| Debug purpose only : setup the colors of this patch so that it shows which tiles have vegetable disabled, or are above, below water. | |
| void | copyTileFlagsFromPatch (const CPatch *src) |
| Set this patch flags from an other one. | |
| uint32 | countNumTriFar0 () const |
| uint32 | countNumTriFar1 () const |
| void | packLumelBlock (uint8 *dest, const uint8 *source, uint8 alpha0, uint8 alpha1) |
| Pack a 4x4 lumel block. | |
| uint | evalLumelBlock (const uint8 *original, const uint8 *unCompressed, uint width, uint height) |
| Eval an uncompressed 4x4 block against the original. | |
| void | unpackLumelBlock (uint8 *dest, const uint8 *src) |
| Unpack a 4x4 lumel block. | |
A landscape patch.
QuadPatch layout (same notations as 3ds Max SDK).
A---> ad ---- da <---D | | | | v v ab ia id dc
| | | |
ba ib ic cd ^ ^ | | | | B---> bc ---- cb <---C
NB: Patch 1x1 or 1xX are illegal: lot of problem: rectangular geomoprh, Son0 and Son1 must be setup as tile at beginning ...
NB: Edges number are:
Definition at line 296 of file patch.h.
enum NL3D::CPatch::TFarVertType [private] |
| NL3D::CPatch::CPatch | ( | ) |
Constructor.
Definition at line 59 of file patch.cpp.
References _BindZoneNeighbor, _CornerSmoothFlag, _DLMContext, _DLMContextRefCount, _NextRdrFar0, _NextRdrFar1, _PatchRdrPassFar0, _PatchRdrPassFar1, _ULNearNext, _ULNearPrec, ExcludeFromRefineAll, Far0, Far1, MasterBlock, NoiseRotation, NumRenderableFaces, OrderS, OrderT, NL3D::CTessBlock::resetClip(), Son0, Son1, TessBlockRefCount, and Zone.
| void NL3D::CPatch::addPatchBlocksInBBox | ( | CPatchIdent | paId, | |
| const CAABBox & | bbox, | |||
| std::vector< CPatchBlockIdent > & | paBlockIds | |||
| ) | const |
Add CPatchBlockIdent to CPatchBlockIdent array which intersect the bbox.
NB: this method use a convex hull subdivion to search in O(logn) what part of the patch to insert.
| patchId | the id of this patch, used to fill PatchBlockIdent. | |
| bbox | the bbox to test against. | |
| paBlockIds | array to be filled (no clear performed, elements added). |
Definition at line 502 of file patch.cpp.
References addPatchBlocksInBBoxRecurs(), OrderS, OrderT, and unpackIntoCache().
Referenced by NL3D::CLandscape::addPatchBlocksInBBox().
| void NL3D::CPatch::addPatchBlocksInBBoxRecurs | ( | CPatchIdent | paId, | |
| const CAABBox & | bbox, | |||
| std::vector< CPatchBlockIdent > & | paBlockIds, | |||
| const CBezierPatch & | pa, | |||
| uint8 | s0, | |||
| uint8 | s1, | |||
| uint8 | t0, | |||
| uint8 | t1 | |||
| ) | const [private] |
recurse method of addPatchBlocksInBBox.
Definition at line 512 of file patch.cpp.
References buildBBoxFromBezierPatch(), NLMISC::CAABBox::intersect(), NL_PATCH_BLOCK_MAX_QUAD, nlassert, OrderS, NL3D::CPatchBlockIdent::OrderS, OrderT, NL3D::CPatchBlockIdent::OrderT, NL3D::CPatchBlockIdent::PatchId, NL3D::CPatchBlockIdent::S0, NL3D::CPatchBlockIdent::S1, NL3D::CBezierPatch::subdivideS(), NL3D::CBezierPatch::subdivideT(), NL3D::CPatchBlockIdent::T0, and NL3D::CPatchBlockIdent::T1.
Referenced by addPatchBlocksInBBox().
| void NL3D::CPatch::addRefDLMContext | ( | ) | [private] |
Add a ref count to the DLMContext, creating it if necessary.
Definition at line 1947 of file patch_lightmap.cpp.
References _DLMContext, _DLMContextRefCount, fillVBFarsDLMUvOnly(), NL3D::CPatchDLMContext::generate(), getLandscape(), isRenderClipped(), nlassert, and Zone.
Referenced by appendTileMaterialToRenderList(), and processDLMLight().
| void NL3D::CPatch::addRefTessBlocks | ( | ) | [private] |
Definition at line 609 of file patch.cpp.
References NL3D::CLandscape::_VegetableManager, NL3D::CVegetableManager::createClipBlock(), getLandscape(), NL3D::CLandscape::linkPatchToNearUL(), NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK, NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT, NL3D_TESSBLOCK_TILESIZE, nlassert, OrderS, OrderT, NLMISC::CObjectVector< T, EnableObjectBehavior >::resize(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlockRefCount, TessBlocks, and VegetableClipBlocks.
Referenced by appendFaceToRenderList(), appendFarVertexToRenderList(), appendNearVertexToRenderList(), and appendTileMaterialToRenderList().
| void NL3D::CPatch::addTileLightmapEdgeWithTLI | ( | uint | ts, | |
| uint | tt, | |||
| uint | edge, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride, | |||
| bool | inverse | |||
| ) | [private] |
Definition at line 1755 of file patch_lightmap.cpp.
References NL3D::bilinearColorDiv2AndAdd(), getCurrentTileTLIColors(), and NL_LUMEL_BY_TILE.
Referenced by computeTileLightmapEdge().
| void NL3D::CPatch::addTileLightmapPixelWithTLI | ( | uint | ts, | |
| uint | tt, | |||
| uint | s, | |||
| uint | t, | |||
| NLMISC::CRGBA * | dest | |||
| ) | [private] |
Definition at line 1790 of file patch_lightmap.cpp.
References NL3D::bilinearColorDiv2AndAdd(), and getCurrentTileTLIColors().
Referenced by computeTileLightmapPixel().
| void NL3D::CPatch::addTileLightmapWithTLI | ( | uint | ts, | |
| uint | tt, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride | |||
| ) | [private] |
Definition at line 1736 of file patch_lightmap.cpp.
References NL3D::bilinearColorDiv2AndAdd(), getCurrentTileTLIColors(), and NL_LUMEL_BY_TILE.
Referenced by computeTileLightmap().
| void NL3D::CPatch::addTileTrianglesInBBox | ( | CPatchIdent | paId, | |
| const CAABBox & | bbox, | |||
| std::vector< CTrianglePatch > & | triangles, | |||
| uint8 | tessLevel, | |||
| uint8 | s0, | |||
| uint8 | t0 | |||
| ) | const [private] |
called by addTrianglesInBBoxRecurs().
effective fill the array of triangles from 1 tile at tile coordinates s0,t0. depending of tessLevel (0,1,2), 2, 8 or 32 triangles are added. (2*2m, 1*1*m or 0.5*0.5m). NB: only triangles of quad included in the bbox are added.
Definition at line 333 of file patch.cpp.
References computeVertex(), NLMISC::CAABBox::extend(), NLMISC::CAABBox::intersect(), nlassert, OrderS, OrderT, NL3D::CTrianglePatch::PatchId, NLMISC::CAABBox::setCenter(), NLMISC::CUV::U, NLMISC::CTriangleUV::Uv0, NLMISC::CTriangleUV::Uv1, NLMISC::CTriangleUV::Uv2, NLMISC::CUV::V, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, and NLMISC::CTriangle::V2.
Referenced by addTrianglesInBBoxRecurs().
| void NL3D::CPatch::addTrianglesInBBox | ( | CPatchIdent | paId, | |
| const CAABBox & | bbox, | |||
| std::vector< CTrianglePatch > & | triangles, | |||
| uint8 | tileTessLevel | |||
| ) | const |
Add triangles to triangles array which intersect the bbox.
NB: this method use a convex hull subdivion to search in O(logn) what part of the patch to insert.
| patchId | the id of this patch, used to fill triangles. | |
| bbox | the bbox to test against. | |
| triangles | array to be filled (no clear performed, elements added). | |
| tileTessLevel | 0,1 or 2 size of the triangles (2*2m, 1*1m or 0.5*0.5m). Level of subdivision of a tile. |
Definition at line 268 of file patch.cpp.
References addTrianglesInBBoxRecurs(), OrderS, OrderT, and unpackIntoCache().
Referenced by NL3D::CLandscape::addTrianglesInBBox().
| void NL3D::CPatch::addTrianglesInBBoxRecurs | ( | CPatchIdent | paId, | |
| const CAABBox & | bbox, | |||
| std::vector< CTrianglePatch > & | triangles, | |||
| uint8 | tessLevel, | |||
| const CBezierPatch & | pa, | |||
| uint8 | s0, | |||
| uint8 | s1, | |||
| uint8 | t0, | |||
| uint8 | t1 | |||
| ) | const [private] |
recurse subdivide of the bezierPatch.
3 1st parameters are the parameter of addTrianglesInBBox().
pa is the bezier patch for this subdivision of this patch.
s0, s1, t0, t1 represent the part of the bezier patch subdivided. At start, s0=0, s1=OrderS, t0=0, t1=OrderT.
Definition at line 278 of file patch.cpp.
References addTileTrianglesInBBox(), buildBBoxFromBezierPatch(), NLMISC::CAABBox::intersect(), nlassert, NL3D::CBezierPatch::subdivideS(), and NL3D::CBezierPatch::subdivideT().
Referenced by addTrianglesInBBox().
| void NL3D::CPatch::allocateVBAndFaceVector | ( | ) |
Definition at line 887 of file patch_render.cpp.
References createFaceVectorFar0OrTile(), createFaceVectorFar1(), and updateVBAlloc().
Referenced by preRender(), and updateClipPatchVB().
| void NL3D::CPatch::allocateVBAndFaceVectorFar1Only | ( | ) |
Definition at line 915 of file patch_render.cpp.
References createFaceVectorFar1(), Far1, NL3D::CTessBlock::FarVertexList, MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, updateFar1VBAlloc(), and NL3D::CTessBlock::visibleFar1().
Referenced by preRender().
| void NL3D::CPatch::appendFaceToRenderList | ( | CTessFace * | face | ) | [private] |
Definition at line 798 of file patch.cpp.
References addRefTessBlocks(), NL3D::CTessList< T >::append(), appendFaceToTileRenderList(), dirtTessBlockFaceVector(), NL3D::CTessVertex::EndPos, NL3D::CTessBlock::FaceTileMaterialRefCount, NL3D::CTessBlock::FarFaceList, getNumTessBlock(), NL3D::CTessFace::Level, MasterBlock, NumRenderableFaces, NL3D::CTessVertex::StartPos, TessBlockLimitLevel, TessBlocks, NL3D::CTessFace::VBase, NL3D::CTessFace::VLeft, and NL3D::CTessFace::VRight.
Referenced by NL3D::CTessFace::doMerge(), makeRoots(), NL3D::CTessFace::split(), and NL3D::CTessFace::splitRectangular().
| void NL3D::CPatch::appendFaceToTileRenderList | ( | CTessFace * | face | ) | [private] |
Definition at line 882 of file patch.cpp.
References NL3D::CTessList< T >::append(), NL3D::CLandscape::appendToShadowPolyReceiver(), dirtTessBlockFaceVector(), getLandscape(), getNumTessBlock(), NL3D_MAX_TILE_FACE, nlassert, NL3D::CTileMaterial::Pass, NL3D::CRdrTileId::PatchRdrPass, TessBlocks, NL3D::CTileMaterial::TileFaceList, NL3D::CTessFace::TileFaces, and NL3D::CTessFace::TileMaterial.
Referenced by appendFaceToRenderList(), and NL3D::CTessFace::recreateTileUvs().
| void NL3D::CPatch::appendFarVertexToRenderList | ( | CTessFarVertex * | fv | ) | [private] |
Definition at line 1045 of file patch.cpp.
References addRefTessBlocks(), NL3D::CTessList< T >::append(), NL3D::CTessBlock::FarVertexList, FVMasterBlock, FVTessBlockEdge, getNumTessBlock(), MasterBlock, NL3D::CTessFarVertex::OwnerBlock, NL3D::CTessFarVertex::PCoord, and TessBlocks.
Referenced by makeRoots(), NL3D::CTessFace::split(), and NL3D::CTessFace::splitRectangular().
| void NL3D::CPatch::appendNearVertexToRenderList | ( | CTileMaterial * | tileMat, | |
| CTessNearVertex * | nv | |||
| ) | [private] |
Definition at line 1091 of file patch.cpp.
References addRefTessBlocks(), computeTbTm(), nlassert, NL3D::CTessNearVertex::OwnerBlock, TessBlocks, NL3D::CTileMaterial::TileS, and NL3D::CTileMaterial::TileT.
Referenced by NL3D::CTessFace::allocTileUv().
| void NL3D::CPatch::appendTessellationLeaves | ( | std::vector< const CTessFace * > & | leaves | ) | const |
From the current tesselation of this patch, append to the list of leaves faces.
Definition at line 2198 of file patch.cpp.
References NL3D::CTessFace::appendTessellationLeaves(), nlassert, Son0, and Son1.
Referenced by NL3D::CLandscape::getTessellationLeaves().
| void NL3D::CPatch::appendTileLightInfluences | ( | const CUV & | uv, | |
| std::vector< CPointLightInfluence > & | pointLightList | |||
| ) | const |
Append lights under the position to pointLightList.
Notice that the PointLight are ensured to be actually CPointLightNamed.
Definition at line 1540 of file patch_lightmap.cpp.
References NL3D::CZone::_PointLightArray, NLMISC::clamp(), NL3D::CPointLightNamedArray::getPointLights(), getZone(), NL3D::CTileLightInfluence::Light, nlassert, NL3D::CLightInfluenceInterpolator::NumLightPerCorner, NL3D::CTileLightInfluence::NumLightPerCorner, NLMISC::OptFastFloor(), OrderS, OrderT, TileLightInfluences, NLMISC::CUV::U, and NLMISC::CUV::V.
Referenced by NL3D::CLandscape::appendTileLightInfluences(), and generateTileVegetable().
| void NL3D::CPatch::appendTileMaterialToRenderList | ( | CTileMaterial * | tm | ) | [private] |
Definition at line 953 of file patch.cpp.
References addRefDLMContext(), addRefTessBlocks(), NL3D::CTileAddedInfo::Center, computeTbTm(), NL3D::CTileAddedInfo::Corners, createVegetableBlock(), NL3D::CBezierPatch::eval(), NL3D::CBezierPatch::evalNormal(), getLandscape(), NL3D::CLandscape::getTileCallbacks(), MasterBlock, nlassert, NL3D::CTileAddedInfo::Normal, OrderS, OrderT, TessBlocks, NL3D::CTileAddedInfo::TileID, NL3D::CTessBlock::TileMaterialRefCount, NL3D::CTileMaterial::TileS, NL3D::CTileMaterial::TileT, and unpackIntoCache().
Referenced by NL3D::CTessFace::computeTileMaterial().
| void NL3D::CPatch::averageTesselationVertices | ( | ) |
This is especially for Pacs.
see CLandscape desc.
Definition at line 1510 of file patch.cpp.
References NL3D::CTessFace::averageTesselationVertices(), BaseVertices, computeVertex(), NL3D::CTessVertex::EndPos, nlassert, NL3D::CTessVertex::Pos, Son0, Son1, and NL3D::CTessVertex::StartPos.
Referenced by NL3D::CZone::averageTesselationVertices().
| void NL3D::CPatch::beginDLMLighting | ( | ) |
begin Dynamic light Process.
reset texture To Black (if needed) Called by CLandscape. _DLMContext must exist
Definition at line 2002 of file patch_lightmap.cpp.
References _DLMContext, NL3D::CPatchDLMContext::clearLighting(), NL3D::CPatchDLMContext::CurPointLightCount, isRenderClipped(), nlassert, and NL3D::CPatchDLMContext::OldPointLightCount.
Referenced by NL3D::CLandscape::computeDynamicLighting().
bind the patch to 4 neighbors, given in this patch edge order (0,1,2,3).
Tesselation is reseted (patch unbound first). NB: this patch and his neighborood must be compiled... NB: neighbor patchs must not be NULL (but according to NPatchs).
Definition at line 1852 of file patch.cpp.
References _BindZoneNeighbor, BaseVertices, NL3D::CPatchUVLocator::build(), changeEdgeNeighbor(), checkFillVertexVBFar(), NL3D::CTessFace::computeSplitPoint(), computeVertex(), NL3D::CPatch::CBindInfo::Edge, NL3D::CTessVertex::EndPos, NL3D::CTessFace::FBase, NL3D::CTessFace::FLeft, NL3D::CTessFace::FRight, NL3D::CTessFace::FVBase, NL3D::CTessFace::FVLeft, NL3D::CTessFace::FVRight, getBindNeighbor(), getRootFaceForEdge(), getRootVertexForEdge(), NL3D::CTessFace::isLeaf(), linkTessFaceWithEdge(), NL3D::CPatchUVLocator::locateUV(), NL3D::CTessFace::MultipleBindFace, NL3D::CPatch::CBindInfo::Next, nlassert, NL3D::CPatch::CBindInfo::NPatchs, OrderS, OrderT, NL3D::CTessVertex::Pos, NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::set(), Son0, Son1, NL3D::CTessFace::SonLeft, NL3D::CTessFace::SonRight, NL3D::CTessVertex::StartPos, NL3D::CTessFace::updateBind(), NL3D::CTessFace::VBase, NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by NL3D::CZone::bindPatch().
| CAABBox NL3D::CPatch::buildBBox | ( | ) | const |
Build the bbox of the patch, according to ctrl points, and displacement map max value.
Definition at line 255 of file patch.cpp.
References buildBBoxFromBezierPatch(), and unpackIntoCache().
Referenced by NL3D::CLandscape::addZone(), and NL3D::CZone::compile().
| void NL3D::CPatch::buildBBoxFromBezierPatch | ( | const CBezierPatch & | p, | |
| CAABBox & | ret | |||
| ) | const [private] |
build a bbox from the convex hull of a bezier patch, enlarged with noise.
Definition at line 219 of file patch.cpp.
References NL3D::CBezierPatch::Interiors, NLMISC::CVector::maxof(), NLMISC::CVector::minof(), NL3D_NOISE_MAX, NLMISC::CAABBox::setMinMax(), NL3D::CBezierPatch::Tangents, and NL3D::CBezierPatch::Vertices.
Referenced by addPatchBlocksInBBoxRecurs(), addTrianglesInBBoxRecurs(), and buildBBox().
Definition at line 1810 of file patch.cpp.
References NL3D::CTessFace::FLeft, NL3D::CTessFace::FRight, nlassert, OrderS, OrderT, Son0, and Son1.
Referenced by bind().
| void NL3D::CPatch::checkCreateVertexVBFar | ( | CTessFarVertex * | pVert | ) | [private] |
Definition at line 1576 of file patch_render.cpp.
References NL3D::CLandscapeVBAllocator::allocateVertex(), NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, Far0, Far1, NL3D::CTessFarVertex::Index0, NL3D::CTessFarVertex::Index1, isRenderClipped(), nlassert, NL3D::CTessFarVertex::OwnerBlock, NL3D::CTessBlock::visibleFar0(), and NL3D::CTessBlock::visibleFar1().
Referenced by NL3D::CTessFace::split(), and NL3D::CTessFace::splitRectangular().
| void NL3D::CPatch::checkCreateVertexVBNear | ( | CTessNearVertex * | pVert | ) | [private] |
Definition at line 1617 of file patch_render.cpp.
References NL3D::CLandscapeVBAllocator::allocateVertex(), NL3D::CLandscapeGlobals::CurrentTileVBAllocator, Far0, NL3D::CTessNearVertex::Index, isRenderClipped(), nlassert, NL3D::CTessNearVertex::OwnerBlock, and NL3D::CTessBlock::visibleTile().
Referenced by NL3D::CTessFace::checkCreateFillTileVB().
| void NL3D::CPatch::checkDeleteVertexVBFar | ( | CTessFarVertex * | pVert | ) | [private] |
Definition at line 1645 of file patch_render.cpp.
References NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, NL3D::CLandscapeVBAllocator::deleteVertex(), Far0, Far1, NL3D::CTessFarVertex::Index0, NL3D::CTessFarVertex::Index1, isRenderClipped(), nlassert, NL3D::CTessFarVertex::OwnerBlock, NL3D::CTessBlock::visibleFar0(), and NL3D::CTessBlock::visibleFar1().
Referenced by NL3D::CTessFace::doMerge().
| void NL3D::CPatch::checkDeleteVertexVBNear | ( | CTessNearVertex * | pVert | ) | [private] |
Definition at line 1663 of file patch_render.cpp.
References NL3D::CLandscapeGlobals::CurrentTileVBAllocator, NL3D::CLandscapeVBAllocator::deleteVertex(), Far0, NL3D::CTessNearVertex::Index, isRenderClipped(), nlassert, NL3D::CTessNearVertex::OwnerBlock, and NL3D::CTessBlock::visibleTile().
Referenced by NL3D::CTessFace::deleteTileUv().
| void NL3D::CPatch::checkFillVertexVBFar | ( | CTessFarVertex * | pVert | ) | [private] |
Definition at line 1596 of file patch_render.cpp.
References NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, Far0, Far1, fillFar0VertexVB(), fillFar1VertexVB(), isRenderClipped(), nlassert, NL3D::CTessFarVertex::OwnerBlock, NL3D::CTessBlock::visibleFar0(), and NL3D::CTessBlock::visibleFar1().
Referenced by bind(), NL3D::CTessFace::split(), NL3D::CTessFace::splitRectangular(), and NL3D::CTessFace::updateNearFarVertices().
| void NL3D::CPatch::checkFillVertexVBNear | ( | CTessNearVertex * | pVert | ) | [private] |
Definition at line 1630 of file patch_render.cpp.
References NL3D::CLandscapeGlobals::CurrentTileVBAllocator, Far0, fillTileVertexVB(), isRenderClipped(), nlassert, NL3D::CTessNearVertex::OwnerBlock, and NL3D::CTessBlock::visibleTile().
Referenced by NL3D::CTessFace::checkCreateFillTileVB(), NL3D::CTessFace::checkFillTileVB(), and NL3D::CTessFace::updateNearFarVertices().
| void NL3D::CPatch::clearTessBlocks | ( | ) | [private] |
Definition at line 667 of file patch.cpp.
References NL3D::CLandscape::_VegetableManager, NLMISC::contReset(), deleteAllVegetableIgs(), NL3D::CVegetableManager::deleteClipBlock(), getLandscape(), TessBlockRefCount, TessBlocks, NL3D::CLandscape::unlinkPatchFromNearUL(), VegetableClipBlocks, and Zone.
Referenced by decRefTessBlocks(), makeRoots(), and release().
| void NL3D::CPatch::compile | ( | CZone * | z, | |
| uint | patchId, | |||
| uint8 | orderS, | |||
| uint8 | orderT, | |||
| CTessVertex * | baseVertices[4], | |||
| float | errorSize = 0 | |||
| ) |
compile a valid patch.
(init) Call this method before any other. Zone and Control points must be valid before calling compile().
This is an ERROR to call compile() two times.
| z | zone where the patch must be binded. | |
| orderS | the Tile order in S direction: 2,4,8,16. | |
| orderT | the Tile order in T direction: 2,4,8,16. | |
| errorSize | if 0, setup() compute himself the errormetric of the patch. May be setup to surface of patch, modulated by tangents and displacement map. |
Definition at line 1288 of file patch.cpp.
References _ULNearNext, _ULNearPrec, BaseVertices, computeDefaultErrorSize(), ErrorSize, NLMISC::getPowerOf2(), NL3D::CTessBlock::init(), makeRoots(), MasterBlock, min, nlassert, OrderS, OrderT, PatchId, SquareLimitLevel, TessBlockLimitLevel, TileLimitLevel, and Zone.
Referenced by NL3D::CZone::compile().
Same as computeVertex, but special accurate version for CVisualCollisionEntity.
If on a corner of the patch (0,0), (0,1) ...., take directly the BaseVertices[] result if on a border of a patch (ie s==0, s==1, t==0 or t==1), also compute the vertex of the neighbor patch (if any), and then average the result. This ensure that tesselation generated is perfectly continous, even across patchs of same or different zones. This feature is very important for CVisualCollisionEntity::snapToGround()
Definition at line 1368 of file patch.cpp.
References BaseVertices, NL3D::CPatchUVLocator::build(), computeVertex(), computeVertexButCorner(), NL3D::CTessVertex::EndPos, getBindNeighbor(), getOrderS(), getOrderT(), NL3D::CPatchUVLocator::locateUV(), nlassert, nlstop, NLMISC::CVector::Null, NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, NL3D::CPatch::CBindInfo::Zone, and Zone.
Referenced by fillPatchQuadBlock().
| void NL3D::CPatch::computeCurrentTLILightmapDiv2 | ( | NLMISC::CRGBA * | array | ) | const |
For CTextureFar, compute current TLI Lightmap at tile level.
array should be allocated of at least sqr(NL_MAX_TILES_BY_PATCH_EDGE+1).
Definition at line 1802 of file patch_lightmap.cpp.
References NLMISC::CRGBA::B, NLMISC::CRGBA::G, getCurrentTLIColor(), OrderS, OrderT, and NLMISC::CRGBA::R.
Referenced by NL3D::CTextureFar::rebuildPatch().
| void NL3D::CPatch::computeDefaultErrorSize | ( | ) | [private] |
Definition at line 204 of file patch.cpp.
References ErrorSize, unpackIntoCache(), and NL3D::CBezierPatch::Vertices.
Referenced by compile().
| float NL3D::CPatch::computeDisplaceCornerSmooth | ( | float | s, | |
| float | t, | |||
| sint8 | smoothBorderX, | |||
| sint8 | smoothBorderY | |||
| ) | const [private] |
compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]).
Special case on corner.
Definition at line 469 of file patch_noise.cpp.
References NL3D::CPatchUVLocator::build(), NL3D::computeDisplaceBilinear(), computeDisplaceInteriorSmooth(), computeDisplaceRaw(), computeDisplaceRawOnNeighbor(), getBindNeighbor(), NL3D::CPatchUVLocator::locateUV(), nlassert, nlstop, NL3D::noiseFloor(), OrderS, OrderT, NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::set(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by computeNoise().
| float NL3D::CPatch::computeDisplaceEdgeSmooth | ( | float | s, | |
| float | t, | |||
| sint8 | smoothBorderX, | |||
| sint8 | smoothBorderY | |||
| ) | const [private] |
compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]).
Special case on edge.
Definition at line 286 of file patch_noise.cpp.
References NL3D::CPatchUVLocator::build(), NL3D::computeDisplaceBilinear(), computeDisplaceInteriorSmooth(), computeDisplaceRaw(), getBindNeighbor(), NL3D::CPatchUVLocator::locateUV(), nlassert, nlstop, NL3D::noiseFloor(), OrderS, OrderT, NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::set(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by computeNoise().
compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]).
Definition at line 256 of file patch_noise.cpp.
References NL3D::computeDisplaceBilinear(), computeDisplaceRawCoordinates(), and computeDisplaceRawInteger().
Referenced by computeDisplaceCornerSmooth(), computeDisplaceEdgeSmooth(), and computeNoise().
| float NL3D::CPatch::computeDisplaceRaw | ( | float | sTile, | |
| float | tTile, | |||
| float | s, | |||
| float | t | |||
| ) | const [private] |
compute the displacement for s,t ([0;OrderS], [0;OrderT]) (sTile, tTile) choose what NoiseMap to use, and (s,t) choose the coordinate in the patch to compute this NoiseMap.
Any rotation of the NoiseMap is included in this method. NB: s,t does not have to be clamped to ([0;OrderS], [0;OrderT]).
Definition at line 217 of file patch_noise.cpp.
References computeDisplaceRawCoordinates(), and computeDisplaceRawInteger().
Referenced by computeDisplaceCornerSmooth(), computeDisplaceEdgeSmooth(), and computeDisplaceRawOnNeighbor().
| void NL3D::CPatch::computeDisplaceRawCoordinates | ( | float | sTile, | |
| float | tTile, | |||
| float | s, | |||
| float | t, | |||
| sint & | ts, | |||
| sint & | tt, | |||
| sint & | ms, | |||
| sint & | mt | |||
| ) | const [private] |
Definition at line 166 of file patch_noise.cpp.
References NL3D_TILE_NOISE_MAP_SIZE, NL3D_TILE_NOISE_MAP_TILE_FACTOR, NL3D::noiseFloor(), NoiseRotation, NLMISC::CUV::U, and NLMISC::CUV::V.
Referenced by computeDisplaceInteriorSmooth(), and computeDisplaceRaw().
| float NL3D::CPatch::computeDisplaceRawInteger | ( | sint | ts, | |
| sint | tt, | |||
| sint | ms, | |||
| sint | mt | |||
| ) | const [private] |
Noise Geometry.
Definition at line 134 of file patch_noise.cpp.
References NLMISC::clamp(), NL3D::CZone::getLandscape(), NL3D::CTileBank::getTileNoiseMap(), getZone(), NL3D_NOISE_MAX, NL3D_TILE_NOISE_MAP_SIZE, OrderS, OrderT, NL3D::CTileNoiseMap::Pixels, NL3D::CLandscape::TileBank, and Tiles.
Referenced by computeDisplaceInteriorSmooth(), and computeDisplaceRaw().
| float NL3D::CPatch::computeDisplaceRawOnNeighbor | ( | float | sTile, | |
| float | tTile, | |||
| float | s, | |||
| float | t | |||
| ) | const [private] |
useful only for computeDisplaceCornerSmooth().
This method, if nessecary (ie sTile or tTile <0 or >Order), look on his neighbor to compute the value.
Definition at line 420 of file patch_noise.cpp.
References NL3D::CPatchUVLocator::build(), computeDisplaceRaw(), getBindNeighbor(), NL3D::CPatchUVLocator::locateUV(), OrderS, OrderT, NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::set(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by computeDisplaceCornerSmooth().
| void NL3D::CPatch::computeGeomorphAlphaFar1VertexListVB | ( | CTessList< CTessFarVertex > & | vertList | ) | [private] |
Definition at line 1400 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), CHECK_VBA_RANGE, NLMISC::clamp(), NL3D::CLandscapeGlobals::CurrentFar1VBInfo, NL3D::CTessFarVertex::Index1, NL3D::CTessNodeList::Next, OOTransitionSqrDelta, NL3D::CTessVertex::Pos, NL3D::CLandscapeGlobals::PZBModelPosition, NL3D::CLandscapeGlobals::RefineCenter, NL3D::CTessFarVertex::Src, TransitionSqrMin, and NL3D::CFarVertexBufferInfo::VertexSize.
Referenced by computeSoftwareGeomorphAndAlpha().
| void NL3D::CPatch::computeGeomorphFar0VertexListVB | ( | CTessList< CTessFarVertex > & | vertList | ) | [private] |
Definition at line 1381 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), CHECK_VBA_RANGE, NL3D::CLandscapeGlobals::CurrentFar0VBInfo, NL3D::CTessFarVertex::Index0, NL3D::CTessNodeList::Next, NL3D::CTessVertex::Pos, NL3D::CLandscapeGlobals::PZBModelPosition, NL3D::CTessFarVertex::Src, and NL3D::CFarVertexBufferInfo::VertexSize.
Referenced by computeSoftwareGeomorphAndAlpha().
| void NL3D::CPatch::computeGeomorphTileVertexListVB | ( | CTessList< CTessNearVertex > & | vertList | ) | [private] |
Definition at line 1432 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), CHECK_VBA_RANGE, NL3D::CLandscapeGlobals::CurrentTileVBInfo, NL3D::CTessNearVertex::Index, NL3D::CTessNodeList::Next, NL3D::CTessVertex::Pos, NL3D::CLandscapeGlobals::PZBModelPosition, NL3D::CTessNearVertex::Src, and NL3D::CNearVertexBufferInfo::VertexSize.
Referenced by computeSoftwareGeomorphAndAlpha().
| void NL3D::CPatch::computeGeomorphVertexList | ( | CTessList< CTessFarVertex > & | vertList | ) | [private] |
Definition at line 1368 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), NL3D::CTessVertex::computeGeomPos(), NL3D::CTessNodeList::Next, and NL3D::CTessFarVertex::Src.
Referenced by computeSoftwareGeomorphAndAlpha().
| void NL3D::CPatch::computeNearBlockLightmap | ( | uint | ts, | |
| uint | tt, | |||
| NLMISC::CRGBA * | lightText | |||
| ) | [private] |
Definition at line 861 of file patch_lightmap.cpp.
References NL3D::CPatchUVLocator::build(), computeTileLightmap(), computeTileLightmapEdge(), computeTileLightmapPixel(), computeTileLightmapPixelAroundCorner(), NL3D::CPatch::CBindInfo::Edge, getBindNeighbor(), getCornerSmoothFlag(), getSmoothFlag(), NL3D::CPatchUVLocator::locateUV(), NLMISC::n, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, NL_TILE_LIGHTMAP_SIZE, nlassert, OrderS, OrderT, NL3D::CPatchUVLocator::sameEdgeOrder(), NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::set(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by getTileLightMap(), and updateTessBlockLighting().
| void NL3D::CPatch::computeNewFar | ( | const NLMISC::CBSphere & | patchSphere, | |
| sint & | newFar0, | |||
| sint & | newFar1 | |||
| ) | [private] |
Definition at line 52 of file patch_render.cpp.
References _PatchRdrPassFar0, _PatchRdrPassFar1, NLMISC::CBSphere::Center, Far0, NL3D::CLandscapeGlobals::Far0Dist, Far0UBias, Far0UScale, Far0VBias, Far0VScale, Far1, NL3D::CLandscapeGlobals::Far1Dist, Far1UBias, Far1UScale, Far1VBias, Far1VScale, NL3D::CLandscapeGlobals::FarTransition, Flags, NL3D::CLandscape::freeFarRenderPass(), NL3D::CLandscape::getFarRenderPass(), NL3D::CZone::Landscape, NL_PATCH_FAR0_ROTATED, NL_PATCH_FAR1_ROTATED, nlassert, nlstop, OOTransitionSqrDelta, NLMISC::CBSphere::Radius, NL3D::CLandscapeGlobals::RefineCenter, NLMISC::sqr(), NL3D::CLandscapeGlobals::TileDistNear, TransitionSqrMin, and Zone.
Referenced by preRender(), and updateTextureFarOnly().
compute the Final displacement for s,t ([0;1], [0;1]).
This is the top call. displace.norm() should be <= NL3D_NOISE_MAX.
Definition at line 872 of file patch_noise.cpp.
References computeDisplaceCornerSmooth(), computeDisplaceEdgeSmooth(), computeDisplaceInteriorSmooth(), computeNormalCornerSmooth(), computeNormalEdgeSmooth(), NL3D::CBezierPatch::evalNormal(), OrderS, OrderT, and unpackIntoCache().
Referenced by computeVertex().
| CVector NL3D::CPatch::computeNormalCornerSmooth | ( | float | s, | |
| float | t, | |||
| sint8 | smoothBorderX, | |||
| sint8 | smoothBorderY | |||
| ) | const [private] |
compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]).
Special case on corner.
Definition at line 726 of file patch_noise.cpp.
References NL3D::CPatchUVLocator::build(), computeNormalEdgeSmooth(), computeNormalOnNeighbor(), NL3D::CPatch::CBindInfo::Edge, NL3D::CBezierPatch::evalNormal(), getBindNeighbor(), getCornerSmoothFlag(), getOrderS(), getOrderT(), NL3D::CPatchUVLocator::locateUV(), nlassert, nlstop, NL3D::noiseCeilF(), NL3D::noiseFloorF(), NLMISC::CVector::Null, NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::set(), unpackIntoCache(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by computeNoise().
| CVector NL3D::CPatch::computeNormalEdgeSmooth | ( | float | s, | |
| float | t, | |||
| sint8 | smoothBorderX, | |||
| sint8 | smoothBorderY | |||
| ) | const [private] |
compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]).
Special case on edge.
Definition at line 586 of file patch_noise.cpp.
References NL3D::CPatchUVLocator::build(), NL3D::CBezierPatch::evalNormal(), getBindNeighbor(), getOrderS(), getOrderT(), getSmoothFlag(), NL3D::CPatchUVLocator::locateUV(), nlassert, nlstop, NL3D::noiseCeilF(), NL3D::noiseFloorF(), NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::set(), unpackIntoCache(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by computeNoise(), and computeNormalCornerSmooth().
| CVector NL3D::CPatch::computeNormalOnNeighbor | ( | float | s, | |
| float | t, | |||
| uint | edgeExclude | |||
| ) | const [private] |
same reasoning as in computeDisplaceRawOnNeighbor().
Definition at line 673 of file patch_noise.cpp.
References NL3D::CPatchUVLocator::build(), NL3D::CBezierPatch::evalNormal(), getBindNeighbor(), getOrderS(), getOrderT(), NL3D::CPatchUVLocator::locateUV(), OrderS, OrderT, NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::set(), unpackIntoCache(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by computeNormalCornerSmooth().
| void NL3D::CPatch::computeSoftwareGeomorphAndAlpha | ( | ) |
Definition at line 1452 of file patch_render.cpp.
References computeGeomorphAlphaFar1VertexListVB(), computeGeomorphFar0VertexListVB(), computeGeomorphTileVertexListVB(), computeGeomorphVertexList(), Far0, Far1, NL3D::CTessBlock::FarVertexList, NL3D::CTessBlock::getClipped(), isRenderClipped(), MasterBlock, NL3D::CTessBlock::NearVertexList, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, NL3D::CTessBlock::visibleFar0(), NL3D::CTessBlock::visibleFar1(), and NL3D::CTessBlock::visibleTile().
Referenced by NL3D::CLandscape::render().
Definition at line 940 of file patch.cpp.
References OrderS.
Referenced by appendNearVertexToRenderList(), appendTileMaterialToRenderList(), getTileLightMap(), getTileLightMapUvInfo(), releaseTileLightMap(), removeNearVertexFromRenderList(), and removeTileMaterialFromRenderList().
| void NL3D::CPatch::computeTileLightmap | ( | uint | ts, | |
| uint | tt, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride | |||
| ) | [private] |
Definition at line 747 of file patch_lightmap.cpp.
References addTileLightmapWithTLI(), computeTileLightmapAutomatic(), computeTileLightmapPrecomputed(), getLandscape(), and modulateTileLightmapWithTileColors().
Referenced by computeNearBlockLightmap().
| void NL3D::CPatch::computeTileLightmapAutomatic | ( | uint | ts, | |
| uint | tt, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride | |||
| ) | [private] |
Definition at line 554 of file patch_lightmap.cpp.
References computeTileLightmapPixelAutomatic(), and NL_LUMEL_BY_TILE.
Referenced by computeTileLightmap().
| void NL3D::CPatch::computeTileLightmapEdge | ( | uint | ts, | |
| uint | tt, | |||
| uint | edge, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride, | |||
| bool | inverse | |||
| ) | [private] |
Definition at line 762 of file patch_lightmap.cpp.
References addTileLightmapEdgeWithTLI(), computeTileLightmapEdgeAutomatic(), computeTileLightmapEdgePrecomputed(), getLandscape(), and modulateTileLightmapEdgeWithTileColors().
Referenced by computeNearBlockLightmap().
| void NL3D::CPatch::computeTileLightmapEdgeAutomatic | ( | uint | ts, | |
| uint | tt, | |||
| uint | edge, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride, | |||
| bool | inverse | |||
| ) | [private] |
Definition at line 568 of file patch_lightmap.cpp.
References computeTileLightmapPixelAutomatic(), and NL_LUMEL_BY_TILE.
Referenced by computeTileLightmapEdge().
| void NL3D::CPatch::computeTileLightmapEdgePrecomputed | ( | uint | ts, | |
| uint | tt, | |||
| uint | edge, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride, | |||
| bool | inverse | |||
| ) | [private] |
Definition at line 701 of file patch_lightmap.cpp.
References CompressedLumels, getLandscape(), NL3D::CLandscape::getStaticLight(), NL3D::getUnpackLumelBlock(), NL3D::NL3DDeltaLumel, NL3D::NL3DPixelStartLumel, NL_BLOCK_LUMEL_COMPRESSED_SIZE, and OrderS.
Referenced by computeTileLightmapEdge().
| void NL3D::CPatch::computeTileLightmapPixel | ( | uint | ts, | |
| uint | tt, | |||
| uint | s, | |||
| uint | t, | |||
| NLMISC::CRGBA * | dest | |||
| ) | [private] |
Definition at line 779 of file patch_lightmap.cpp.
References addTileLightmapPixelWithTLI(), computeTileLightmapPixelAutomatic(), computeTileLightmapPixelPrecomputed(), getLandscape(), and modulateTileLightmapPixelWithTileColors().
Referenced by computeNearBlockLightmap(), and computeTileLightmapPixelAroundCorner().
| void NL3D::CPatch::computeTileLightmapPixelAroundCorner | ( | const NLMISC::CVector2f & | stIn, | |
| NLMISC::CRGBA * | dest, | |||
| bool | lookAround | |||
| ) | [private] |
Definition at line 796 of file patch_lightmap.cpp.
References NL3D::CPatchUVLocator::build(), computeTileLightmapPixel(), computeTileLightmapPixelAroundCorner(), getBindNeighbor(), NL3D::CPatchUVLocator::locateUV(), NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, OrderS, OrderT, NL3D::CPatchUVLocator::selectPatch(), NLMISC::CVector2f::x, NLMISC::CVector2f::y, and NL3D::CPatch::CBindInfo::Zone.
Referenced by computeNearBlockLightmap(), and computeTileLightmapPixelAroundCorner().
| void NL3D::CPatch::computeTileLightmapPixelAutomatic | ( | uint | ts, | |
| uint | tt, | |||
| uint | s, | |||
| uint | t, | |||
| NLMISC::CRGBA * | dest | |||
| ) | [private] |
Definition at line 598 of file patch_lightmap.cpp.
References NLMISC::clamp(), computeVertex(), NL3D::CLandscape::getAutomaticLightDir(), getLandscape(), NL3D::CLandscape::getStaticLight(), NL_LUMEL_BY_TILE, NLMISC::CVector::normalize(), OrderS, and OrderT.
Referenced by computeTileLightmapAutomatic(), computeTileLightmapEdgeAutomatic(), and computeTileLightmapPixel().
| void NL3D::CPatch::computeTileLightmapPixelPrecomputed | ( | uint | ts, | |
| uint | tt, | |||
| uint | s, | |||
| uint | t, | |||
| NLMISC::CRGBA * | dest | |||
| ) | [private] |
Definition at line 735 of file patch_lightmap.cpp.
References CompressedLumels, getLandscape(), NL3D::CLandscape::getStaticLight(), NL3D::getUnpackLumelBlock(), NL_BLOCK_LUMEL_COMPRESSED_SIZE, and OrderS.
Referenced by computeTileLightmapPixel().
| void NL3D::CPatch::computeTileLightmapPrecomputed | ( | uint | ts, | |
| uint | tt, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride | |||
| ) | [private] |
Definition at line 675 of file patch_lightmap.cpp.
References CompressedLumels, getLandscape(), NL3D::CLandscape::getStaticLight(), NL_BLOCK_LUMEL_COMPRESSED_SIZE, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, OrderS, and unpackLumelBlock().
Referenced by computeTileLightmap().
Compute a vertex.
Compute a vertex according to:
Patch UV geometric correction.
Definition at line 1343 of file patch.cpp.
References computeNoise(), NL3D::CBezierPatch::eval(), getLandscape(), and unpackIntoCache().
Referenced by addTileTrianglesInBBox(), NL3D::CTessFace::averageTesselationVertices(), averageTesselationVertices(), bind(), NL3D::CLandscape::buildCollideFaces(), computeContinousVertex(), computeTileLightmapPixelAutomatic(), computeVertexButCorner(), NL3D::CLandscapeVegetableBlockCreateContext::eval(), makeRoots(), NL3D::CZoneLighter::processZonePointLightRT(), NL3D::CTessFace::refreshTesselationGeometry(), refreshTesselationGeometry(), NL3D::CTessFace::split(), and NL3D::CTessFace::splitRectangular().
Used by computeContinousVertex().
Definition at line 1461 of file patch.cpp.
References BaseVertices, computeVertex(), NL3D::CTessVertex::EndPos, nlassert, nlstop, NLMISC::CVector::Null, and Zone.
Referenced by computeContinousVertex().
| void NL3D::CPatch::copyTileFlagsFromPatch | ( | const CPatch * | src | ) |
| uint32 NL3D::CPatch::countNumTriFar0 | ( | ) | const |
Definition at line 2304 of file patch.cpp.
References NL3D::CTessBlock::Far0FaceVector, MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and NL3D::CTessBlock::visibleFar0().
Referenced by NL3D::countNumWantedIndexFar0().
| uint32 NL3D::CPatch::countNumTriFar1 | ( | ) | const |
Definition at line 2322 of file patch.cpp.
References NL3D::CTessBlock::Far1FaceVector, MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and NL3D::CTessBlock::visibleFar1().
Referenced by NL3D::countNumWantedIndexFar1().
| void NL3D::CPatch::createFaceVectorFar0OrTile | ( | ) | [private] |
Definition at line 705 of file patch_render.cpp.
References NL3D::CLandscape::_FaceVectorManager, NL3D::CTessBlock::createFaceVectorFar0(), Far0, getLandscape(), MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
Referenced by allocateVBAndFaceVector().
| void NL3D::CPatch::createFaceVectorFar1 | ( | ) | [private] |
Definition at line 683 of file patch_render.cpp.
References NL3D::CLandscape::_FaceVectorManager, NL3D::CTessBlock::createFaceVectorFar1(), Far1, getLandscape(), MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
Referenced by allocateVBAndFaceVector(), and allocateVBAndFaceVectorFar1Only().
Micro-Vegetation.
Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist
Definition at line 306 of file patch_vegetable.cpp.
References NL3D::CBezierPatch::eval(), getLandscape(), NL3D::CLandscapeVegetableBlock::init(), NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK, NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT, OrderS, OrderT, TessBlocks, unpackIntoCache(), and VegetableClipBlocks.
Referenced by appendTileMaterialToRenderList(), and recreateAllVegetableIgs().
| void NL3D::CPatch::debugAllocationMarkIndices | ( | uint | marker | ) |
Definition at line 956 of file patch_render.cpp.
References debugAllocationMarkIndicesFarList(), debugAllocationMarkIndicesNearList(), NL3D::CTessBlock::FarVertexList, MasterBlock, NL3D::CTessBlock::NearVertexList, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
| void NL3D::CPatch::debugAllocationMarkIndicesFarList | ( | CTessList< CTessFarVertex > & | vertList, | |
| uint | marker | |||
| ) | [private] |
Definition at line 935 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), NL3D::CTessFarVertex::Index0, NL3D::CTessFarVertex::Index1, and NL3D::CTessNodeList::Next.
Referenced by debugAllocationMarkIndices().
| void NL3D::CPatch::debugAllocationMarkIndicesNearList | ( | CTessList< CTessNearVertex > & | vertList, | |
| uint | marker | |||
| ) | [private] |
Definition at line 946 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), NL3D::CTessNearVertex::Index, and NL3D::CTessNodeList::Next.
Referenced by debugAllocationMarkIndices().
| void NL3D::CPatch::decRefDLMContext | ( | uint | count = 1 |
) | [private] |
Dec a ref count to the DLMContext, deleting it if refCount== 0.
Definition at line 1974 of file patch_lightmap.cpp.
References _DLMContext, _DLMContextRefCount, fillVBFarsDLMUvOnly(), isRenderClipped(), nlassert, and Zone.
Referenced by endDLMLighting(), and removeTileMaterialFromRenderList().
| void NL3D::CPatch::decRefTessBlocks | ( | ) | [private] |
Definition at line 656 of file patch.cpp.
References clearTessBlocks(), nlassert, and TessBlockRefCount.
Referenced by removeFaceFromRenderList(), removeFarVertexFromRenderList(), removeNearVertexFromRenderList(), and removeTileMaterialFromRenderList().
| void NL3D::CPatch::deleteAllVegetableIgs | ( | ) |
Delete any vegetable Ig still existing in this patch.
Definition at line 294 of file patch_vegetable.cpp.
References releaseVegetableBlock(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
Referenced by clearTessBlocks(), NL3D::CLandscape::enableVegetable(), and NL3D::CLandscape::setVegetableDensity().
| void NL3D::CPatch::deleteFaceVectorFar0OrTile | ( | ) | [private] |
Definition at line 725 of file patch_render.cpp.
References NL3D::CLandscape::_FaceVectorManager, NL3D::CTessBlock::deleteFaceVectorFar0(), Far0, getLandscape(), MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
Referenced by deleteVBAndFaceVector().
| void NL3D::CPatch::deleteFaceVectorFar1 | ( | ) | [private] |
Definition at line 694 of file patch_render.cpp.
References NL3D::CLandscape::_FaceVectorManager, NL3D::CTessBlock::deleteFaceVectorFar1(), Far1, getLandscape(), MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
Referenced by deleteVBAndFaceVector(), and deleteVBAndFaceVectorFar1Only().
| void NL3D::CPatch::deleteTileUvs | ( | ) |
Definition at line 2164 of file patch.cpp.
References NL3D::CTessFace::deleteTileUvs(), Son0, and Son1.
| void NL3D::CPatch::deleteVBAndFaceVector | ( | ) |
Definition at line 879 of file patch_render.cpp.
References deleteFaceVectorFar0OrTile(), deleteFaceVectorFar1(), and updateVBAlloc().
Referenced by preRender(), release(), and updateClipPatchVB().
| void NL3D::CPatch::deleteVBAndFaceVectorFar1Only | ( | ) |
Definition at line 896 of file patch_render.cpp.
References deleteFaceVectorFar1(), Far1, NL3D::CTessBlock::FarVertexList, MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, updateFar1VBAlloc(), and NL3D::CTessBlock::visibleFar1().
Referenced by preRender().
| void NL3D::CPatch::dirtTessBlockFaceVector | ( | CTessBlock & | block | ) | [private] |
Definition at line 781 of file patch.cpp.
References NL3D::CTessBlock::appendToModifyListAndDeleteFaceVector(), getLandscape(), NL3D::CTessBlock::isInModifyList(), and isRenderClipped().
Referenced by appendFaceToRenderList(), appendFaceToTileRenderList(), removeFaceFromRenderList(), and removeFaceFromTileRenderList().
| void NL3D::CPatch::endDLMLighting | ( | ) |
end Dynamic light Process, deleting the DLMContext if necessary.
NB: _DLMContext->compileLighting() is not called, since done during render phase. Called by CLandscape. _DLMContext must exist
Definition at line 2032 of file patch_lightmap.cpp.
References _DLMContext, decRefDLMContext(), nlassert, and NL3D::CPatchDLMContext::OldPointLightCount.
Referenced by NL3D::CLandscape::computeDynamicLighting().
| uint NL3D::CPatch::evalLumelBlock | ( | const uint8 * | original, | |
| const uint8 * | unCompressed, | |||
| uint | width, | |||
| uint | height | |||
| ) | [private] |
Eval an uncompressed 4x4 block against the original.
Definition at line 242 of file patch_lightmap.cpp.
Referenced by packShadowMap().
| void NL3D::CPatch::extendTessBlockWithEndPos | ( | CTessFace * | face | ) | [private] |
Definition at line 764 of file patch.cpp.
References NL3D::CTessVertex::EndPos, getNumTessBlock(), NL3D::CTessFace::Level, TessBlockLimitLevel, TessBlocks, NL3D::CTessFace::VBase, NL3D::CTessFace::VLeft, and NL3D::CTessFace::VRight.
Referenced by NL3D::CTessFace::refreshTesselationGeometry().
| void NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB | ( | CTessList< CTessFarVertex > & | vertList | ) |
Definition at line 1683 of file patch_render.cpp.
References _DLMContext, NL3D::CTessList< T >::begin(), CHECK_VBA_RANGE, NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar0VBInfo, NL3D::CPatchDLMContext::DLMUBias, NL3D::CPatchDLMContext::DLMUScale, NL3D::CPatchDLMContext::DLMVBias, NL3D::CPatchDLMContext::DLMVScale, NL3D::CParamCoord::getS(), NL3D::CParamCoord::getT(), NL3D::CTessFarVertex::Index0, NL3D::CTessNodeList::Next, nlassert, NL3D::CTessFarVertex::PCoord, NLMISC::CUV::U, NLMISC::CUV::V, and NL3D::CFarVertexBufferInfo::VertexSize.
Referenced by fillVBFarsDLMUvOnly().
| void NL3D::CPatch::fillFar0VertexListVB | ( | CTessList< CTessFarVertex > & | vertList | ) | [private] |
Definition at line 1231 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), fillFar0VertexVB(), and NL3D::CTessNodeList::Next.
Referenced by fillVB(), fillVBFar0Only(), and preRender().
| void NL3D::CPatch::fillFar0VertexVB | ( | CTessFarVertex * | pVert | ) | [inline, private] |
Definition at line 988 of file patch_render.cpp.
References _DLMContext, CHECK_VBA_RANGE, NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar0VBInfo, NL3D::CPatchDLMContext::DLMUBias, NL3D::CPatchDLMContext::DLMUScale, NL3D::CPatchDLMContext::DLMVBias, NL3D::CPatchDLMContext::DLMVScale, NL3D::CTessVertex::EndPos, Far0UBias, Far0UScale, Far0VBias, Far0VScale, Flags, NL3D::CParamCoord::getS(), NL3D::CParamCoord::getT(), NL3D::CTessFarVertex::Index0, NL3D::CTessVertex::MaxFaceSize, NL3D::CTessVertex::MaxNearLimit, NL_PATCH_FAR0_ROTATED, nlassert, NL3D::CLandscapeGlobals::OORefineThreshold, NL3D::CTessFarVertex::PCoord, NL3D::CTessVertex::Pos, NL3D::CLandscapeGlobals::PZBModelPosition, NL3D::CTessFarVertex::Src, NL3D::CTessVertex::StartPos, NLMISC::CUV::U, NLMISC::CUV::V, NL3D::CLandscapeGlobals::VertexProgramEnabled, and NL3D::CFarVertexBufferInfo::VertexSize.
Referenced by checkFillVertexVBFar(), and fillFar0VertexListVB().
| void NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB | ( | CTessList< CTessFarVertex > & | vertList | ) |
Definition at line 1740 of file patch_render.cpp.
References _DLMContext, NL3D::CTessList< T >::begin(), CHECK_VBA_RANGE, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBInfo, NL3D::CPatchDLMContext::DLMUBias, NL3D::CPatchDLMContext::DLMUScale, NL3D::CPatchDLMContext::DLMVBias, NL3D::CPatchDLMContext::DLMVScale, NL3D::CParamCoord::getS(), NL3D::CParamCoord::getT(), NL3D::CTessFarVertex::Index1, NL3D::CTessNodeList::Next, nlassert, NL3D::CTessFarVertex::PCoord, NLMISC::CUV::U, NLMISC::CUV::V, and NL3D::CFarVertexBufferInfo::VertexSize.
Referenced by fillVBFarsDLMUvOnly().
| void NL3D::CPatch::fillFar1VertexListVB | ( | CTessList< CTessFarVertex > & | vertList | ) | [private] |
Definition at line 1243 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), fillFar1VertexVB(), and NL3D::CTessNodeList::Next.
Referenced by fillVB(), fillVBFar1Only(), and preRender().
| void NL3D::CPatch::fillFar1VertexVB | ( | CTessFarVertex * | pVert | ) | [inline, private] |
Definition at line 1072 of file patch_render.cpp.
References _DLMContext, CHECK_VBA_RANGE, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBInfo, NL3D::CPatchDLMContext::DLMUBias, NL3D::CPatchDLMContext::DLMUScale, NL3D::CPatchDLMContext::DLMVBias, NL3D::CPatchDLMContext::DLMVScale, NL3D::CTessVertex::EndPos, Far1UBias, Far1UScale, Far1VBias, Far1VScale, Flags, NL3D::CParamCoord::getS(), NL3D::CParamCoord::getT(), NL3D::CTessFarVertex::Index1, NL3D::CTessVertex::MaxFaceSize, NL3D::CTessVertex::MaxNearLimit, NL_PATCH_FAR1_ROTATED, nlassert, NL3D::CLandscapeGlobals::OORefineThreshold, OOTransitionSqrDelta, NL3D::CTessFarVertex::PCoord, NL3D::CTessVertex::Pos, NL3D::CLandscapeGlobals::PZBModelPosition, NL3D::CTessFarVertex::Src, NL3D::CTessVertex::StartPos, TransitionSqrMin, NLMISC::CUV::U, NLMISC::CUV::V, NL3D::CLandscapeGlobals::VertexProgramEnabled, and NL3D::CFarVertexBufferInfo::VertexSize.
Referenced by checkFillVertexVBFar(), and fillFar1VertexListVB().
| void NL3D::CPatch::fillPatchQuadBlock | ( | CPatchQuadBlock & | quadBlock | ) | const |
Fill a CPatchQuadBlock, from its required PatchId.
nlassert(PatchId size is less than NL_PATCH_BLOCK_MAX_QUAD)
Definition at line 458 of file patch.cpp.
References computeContinousVertex(), NL_PATCH_BLOCK_MAX_QUAD, NL_PATCH_BLOCK_MAX_VERTEX, nlassert, OrderS, NL3D::CPatchBlockIdent::OrderS, OrderT, NL3D::CPatchBlockIdent::OrderT, NL3D::CPatchQuadBlock::PatchBlockId, NL3D::CPatchBlockIdent::S0, NL3D::CPatchBlockIdent::S1, NL3D::CPatchBlockIdent::T0, NL3D::CPatchBlockIdent::T1, and NL3D::CPatchQuadBlock::Vertices.
Referenced by NL3D::CLandscape::fillPatchQuadBlock().
| void NL3D::CPatch::fillTileVertexListVB | ( | CTessList< CTessNearVertex > & | vertList | ) | [private] |
Definition at line 1255 of file patch_render.cpp.
References NL3D::CTessList< T >::begin(), fillTileVertexVB(), and NL3D::CTessNodeList::Next.
Referenced by fillVB(), and preRender().
| void NL3D::CPatch::fillTileVertexVB | ( | CTessNearVertex * | pVert | ) | [inline, private] |
Definition at line 1169 of file patch_render.cpp.
References CHECK_VBA_RANGE, NL3D::CLandscapeGlobals::CurrentTileVBAllocator, NL3D::CLandscapeGlobals::CurrentTileVBInfo, NL3D::CTessVertex::EndPos, NL3D::CNearVertexBufferInfo::GeomInfoOff, NL3D::CTessNearVertex::Index, NL3D::CTessVertex::MaxFaceSize, NL3D::CTessVertex::MaxNearLimit, nlassert, NL3D::CLandscapeGlobals::OORefineThreshold, NL3D::CTessVertex::Pos, NL3D::CTessNearVertex::PUv0, NL3D::CTessNearVertex::PUv1, NL3D::CTessNearVertex::PUv2, NL3D::CLandscapeGlobals::PZBModelPosition, NL3D::CTessNearVertex::Src, NL3D::CTessVertex::StartPos, NL3D::CNearVertexBufferInfo::TexCoordOff0, NL3D::CNearVertexBufferInfo::TexCoordOff1, NL3D::CNearVertexBufferInfo::TexCoordOff2, NLMISC::CUV::U, NL3D::CLandscapeGlobals::VertexProgramEnabled, and NL3D::CNearVertexBufferInfo::VertexSize.
Referenced by checkFillVertexVBNear(), and fillTileVertexListVB().
| void NL3D::CPatch::fillVB | ( | ) |
Definition at line 1268 of file patch_render.cpp.
References NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, NL3D::CLandscapeGlobals::CurrentTileVBAllocator, Far0, Far1, NL3D::CTessBlock::FarVertexList, fillFar0VertexListVB(), fillFar1VertexListVB(), fillTileVertexListVB(), MasterBlock, NL3D::CTessBlock::NearVertexList, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, NL3D::CTessBlock::visibleFar0(), NL3D::CTessBlock::visibleFar1(), and NL3D::CTessBlock::visibleTile().
Referenced by fillVBIfVisible(), preRender(), and updateClipPatchVB().
| void NL3D::CPatch::fillVBFar0Only | ( | ) |
Definition at line 1326 of file patch_render.cpp.
References NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, Far0, NL3D::CTessBlock::FarVertexList, fillFar0VertexListVB(), MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and NL3D::CTessBlock::visibleFar0().
Referenced by preRender().
| void NL3D::CPatch::fillVBFar1Only | ( | ) |
Definition at line 1344 of file patch_render.cpp.
References NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, Far1, NL3D::CTessBlock::FarVertexList, fillFar1VertexListVB(), MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and NL3D::CTessBlock::visibleFar1().
Referenced by preRender().
| void NL3D::CPatch::fillVBFarsDLMUvOnly | ( | ) |
Definition at line 1798 of file patch_render.cpp.
References NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, Far0, Far1, NL3D::CTessBlock::FarVertexList, fillFar0DLMUvOnlyVertexListVB(), fillFar1DLMUvOnlyVertexListVB(), MasterBlock, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, NL3D::CTessBlock::visibleFar0(), and NL3D::CTessBlock::visibleFar1().
Referenced by addRefDLMContext(), and decRefDLMContext().
| void NL3D::CPatch::fillVBIfVisible | ( | ) |
Definition at line 1318 of file patch_render.cpp.
References fillVB(), and isRenderClipped().
Referenced by NL3D::CLandscape::render().
| void NL3D::CPatch::forceMergeAtTileLevel | ( | ) |
For changing TileMaxSubdivision. force tesselation to be under tile.
Definition at line 2044 of file patch.cpp.
References NL3D::CTessFace::forceMergeAtTileLevel(), nlassert, Son0, and Son1.
Referenced by NL3D::CZone::forceMergeAtTileLevel().
| void NL3D::CPatch::generateTileVegetable | ( | CVegetableInstanceGroup * | vegetIg, | |
| uint | distType, | |||
| uint | ts, | |||
| uint | tt, | |||
| CLandscapeVegetableBlockCreateContext & | vbCreateCtx | |||
| ) | [private] |
Definition at line 48 of file patch_vegetable.cpp.
References _DLMContext, NL3D::CLandscape::_VegetableManager, NLMISC::CRGBAF::A, appendTileLightInfluences(), NLMISC::CRGBAF::B, NLMISC::clamp(), NL3D::CPointLight::computeLinearAttenuation(), NLMISC::contReset(), NL3D::CPatchDLMContext::DLMUBias, NL3D::CPatchDLMContext::DLMUScale, NL3D::CPatchDLMContext::DLMVBias, NL3D::CPatchDLMContext::DLMVScale, NL3D::CLandscapeVegetableBlockCreateContext::eval(), NL3D::CBezierPatch::eval(), NL3D::CBezierPatch::evalNormal(), NLMISC::CRGBAF::G, NL3D::CVegetable::generateGroupBiLinear(), NL3D::CVegetable::generateInstance(), getLandscape(), NL3D::CPointLight::getPosition(), getTileLumelmapPrecomputed(), NL3D::CLandscape::getTileVegetableDesc(), NL3D::CTileVegetableDesc::getVegetableList(), NL3D::CTileVegetableDesc::getVegetableSeed(), NLMISC::CVector::I, NLMISC::CVector::J, NL3D::CVegetableLightEx::MaxNumLight, NL3D::CPatchDLMContext::MaxU8, NL3D::CPatchDLMContext::MaxV8, min, NL3D::CPatchDLMContext::MinU8, NL3D::CPatchDLMContext::MinV8, NL3D_PATCH_TILE_AREA, NL3D_VEGETABLE_BLOCK_ELTDIST, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, NL_TILE_ELM_LAYER_EMPTY, nlassert, NLMISC::CVector::normalize(), NLMISC::CMatrix::normalize(), NL3D::CVegetableLightEx::NumLights, NLMISC::OptFastFloor(), OrderS, OrderT, NLMISC::CRGBAF::R, NL3D::CVegetable::reserveIgAddInstances(), NL3D::CVegetableManager::reserveIgCompile(), NLMISC::CMatrix::setPos(), NLMISC::CMatrix::setRot(), Tiles, NL3D::CVegetableUV8::U, NLMISC::CUV::U, unpackIntoCache(), NL3D::CVegetableUV8::V, NLMISC::CUV::V, NL3D::CTileElement::VegetableDisabled, NL3D::CVegetableInstanceGroup::VegetableLightEx, NLMISC::CVector::x, NLMISC::CVector::y, NLMISC::CMatrix::ZXY, and NLMISC::CMatrix::ZYX.
Referenced by NL3D::CLandscapeVegetableBlock::createVegetableIGForDistType().
return neighborhood information.
Definition at line 2235 of file patch.cpp.
References _BindZoneNeighbor, NL3D::CZone::buildBindInfo(), getZone(), NL3D::CPatch::CBindInfo::MultipleBindNum, nlassert, NL3D::CPatch::CBindInfo::NPatchs, PatchId, and NL3D::CPatch::CBindInfo::Zone.
Referenced by bind(), NL3D::CZoneCornerSmoother::buildPatchBindInfo(), NL3D::CZoneLighter::buildZoneInformation(), computeContinousVertex(), computeDisplaceCornerSmooth(), computeDisplaceEdgeSmooth(), computeDisplaceRawOnNeighbor(), computeNearBlockLightmap(), computeNormalCornerSmooth(), computeNormalEdgeSmooth(), computeNormalOnNeighbor(), and computeTileLightmapPixelAroundCorner().
Definition at line 960 of file patch_noise.cpp.
References _CornerSmoothFlag, and nlassert.
Referenced by computeNearBlockLightmap(), computeNormalCornerSmooth(), and NL3D::CZone::retrieve().
| const CTessVertex* NL3D::CPatch::getCornerVertex | ( | uint | corner | ) | [inline] |
Definition at line 652 of file patch.h.
References BaseVertices.
Referenced by NL3D::CZoneCornerSmoother::computeAllCornerSmoothFlags().
| void NL3D::CPatch::getCurrentTileTLIColors | ( | uint | ts, | |
| uint | tt, | |||
| NLMISC::CRGBA | corners[4] | |||
| ) | [private] |
Definition at line 1652 of file patch_lightmap.cpp.
References NLMISC::CRGBA::avg2RGBOnly(), NLMISC::CRGBA::Black, getCurrentTLIColor(), and getZone().
Referenced by addTileLightmapEdgeWithTLI(), addTileLightmapPixelWithTLI(), and addTileLightmapWithTLI().
Definition at line 1617 of file patch_lightmap.cpp.
References NL3D::CZone::_PointLightArray, NLMISC::CRGBA::addRGBOnly(), NLMISC::CRGBA::Black, NL3D::CTileLightInfluence::getDiffuseLightFactor(), getLandscape(), NL3D::CPointLightNamedArray::getPointLights(), NL3D::CPointLightNamed::getUnAnimatedDiffuse(), getZone(), NL3D::CTileLightInfluence::Light, NLMISC::CRGBA::modulateFromColorRGBOnly(), NLMISC::CRGBA::modulateFromuiRGBOnly(), NL3D::CTileLightInfluence::NumLightPerCorner, OrderS, and TileLightInfluences.
Referenced by computeCurrentTLILightmapDiv2(), and getCurrentTileTLIColors().
| float NL3D::CPatch::getErrorSize | ( | ) | const [inline] |
| sint NL3D::CPatch::getFar0 | ( | ) | const [inline] |
| sint NL3D::CPatch::getFar1 | ( | ) | const [inline] |
| CLandscape * NL3D::CPatch::getLandscape | ( | ) | const |
Get the landscape in which is placed this patch.
Definition at line 2208 of file patch.cpp.
References NL3D::CZone::getLandscape(), and Zone.
Referenced by addRefDLMContext(), addRefTessBlocks(), NL3D::CTessFace::allocTileUv(), appendFaceToTileRenderList(), appendTileMaterialToRenderList(), NL3D::CTessFace::buildTileFaces(), clearTessBlocks(), NL3D::CPatchDLMContext::computeTextureFar(), computeTileLightmap(), computeTileLightmapEdge(), computeTileLightmapEdgePrecomputed(), computeTileLightmapPixel(), computeTileLightmapPixelAutomatic(), computeTileLightmapPixelPrecomputed(), computeTileLightmapPrecomputed(), NL3D::CTessFace::computeTileMaterial(), computeVertex(), createFaceVectorFar0OrTile(), createFaceVectorFar1(), createVegetableBlock(), deleteFaceVectorFar0OrTile(), deleteFaceVectorFar1(), NL3D::CTessFace::deleteTileFaces(), NL3D::CTessFace::deleteTileUv(), dirtTessBlockFaceVector(), NL3D::CTessFace::doMerge(), generateTileVegetable(), getCurrentTLIColor(), makeRoots(), recreateAllVegetableIgs(), recreateTessBlockFaceVector(), release(), NL3D::CTessFace::releaseTileMaterial(), releaseVegetableBlock(), removeFaceFromTileRenderList(), removeTileMaterialFromRenderList(), NL3D::CTessFace::split(), NL3D::CTessFace::splitRectangular(), NL3D::CTessFace::unbind(), NL3D::CTessFace::updateBindAndSplit(), NL3D::CTessFace::updateRefineMerge(), and NL3D::CTessFace::updateRefineSplit().
Get the lumel under the position.
Definition at line 1496 of file patch_lightmap.cpp.
References NLMISC::clamp(), getTileLumelmapPixelPrecomputed(), NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, NLMISC::OptFastFloor(), OrderS, OrderT, NLMISC::CUV::U, and NLMISC::CUV::V.
Referenced by NL3D::CLandscape::getLumel().
| CPatch* NL3D::CPatch::getNextFar0ToRdr | ( | ) | const [inline] |
Definition at line 454 of file patch.h.
References _NextRdrFar0.
Referenced by NL3D::countNumWantedIndexFar0(), and NL3D::CLandscape::render().
| CPatch* NL3D::CPatch::getNextFar1ToRdr | ( | ) | const [inline] |
Definition at line 456 of file patch.h.
References _NextRdrFar1.
Referenced by NL3D::countNumWantedIndexFar1(), and NL3D::CLandscape::render().
| CPatch* NL3D::CPatch::getNextNearUL | ( | ) | const [inline] |
For lighting update, get Next (CiruclarList). If ==this, then list is empty.
Definition at line 743 of file patch.h.
References _ULNearNext.
Referenced by NL3D::CLandscape::unlinkPatchFromNearUL(), and NL3D::CLandscape::updateLightingTextureNear().
| uint NL3D::CPatch::getNumNearTessBlocks | ( | ) | const [inline] |
get the number of Near TessBlocks. Actually OrderS/2*OrderT/2.
Definition at line 746 of file patch.h.
References NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
Referenced by NL3D::CLandscape::updateLightingTextureNear().
| void NL3D::CPatch::getNumTessBlock | ( | CParamCoord | pc, | |
| TFarVertType & | type, | |||
| uint & | numtb | |||
| ) | [private] |
Definition at line 736 of file patch.cpp.
References FVMasterBlock, FVTessBlock, FVTessBlockEdge, OrderS, OrderT, NL3D::CParamCoord::S, and NL3D::CParamCoord::T.
Definition at line 720 of file patch.cpp.
References OrderS, OrderT, NL3D::CTessFace::PVBase, NL3D::CTessFace::PVLeft, NL3D::CTessFace::PVRight, NL3D::CParamCoord::S, and NL3D::CParamCoord::T.
Referenced by appendFaceToRenderList(), appendFaceToTileRenderList(), appendFarVertexToRenderList(), extendTessBlockWithEndPos(), removeFaceFromRenderList(), removeFaceFromTileRenderList(), and removeFarVertexFromRenderList().
Definition at line 2218 of file patch.cpp.
References OrderS, and OrderT.
Referenced by NL3D::CPatchUVLocator::build().
| uint8 NL3D::CPatch::getOrderS | ( | ) | const [inline] |
Definition at line 381 of file patch.h.
References OrderS.
Referenced by NL3D::CTextureFar::allocatePatch(), NL3D::CPatchUVLocator::build(), NL3D::CLandscape::buildCollideFaces(), NL3D::CZoneLighter::buildZoneInformation(), computeContinousVertex(), computeNormalCornerSmooth(), computeNormalEdgeSmooth(), computeNormalOnNeighbor(), NL3D::CPatchDLMContext::computeTextureFar(), NL3D::CZoneLighter::computeTileFlagsOnly(), NL3D::CLandscapeVegetableBlockCreateContext::eval(), NL3D::CLandscape::freeFarRenderPass(), NL3D::CPatchDLMContext::generate(), NL3D::CLandscape::getFarRenderPass(), NL3D::CZoneLighter::getNormal(), NL3D::CLandscapeVegetableBlock::init(), NL3D::CZoneLighter::isLumelOnEdgeMustBeOversample(), NL3D::CTextureFar::rebuildPatch(), NL3D::CTextureFar::removePatch(), NL3D::CPatchUVLocator::selectPatch(), NL3D::CTextureFar::touchPatchULAndNext(), and NL3D::CTextureFar::tryAllocatePatch().
| uint8 NL3D::CPatch::getOrderT | ( | ) | const [inline] |
Definition at line 382 of file patch.h.
References OrderT.
Referenced by NL3D::CTextureFar::allocatePatch(), NL3D::CPatchUVLocator::build(), NL3D::CLandscape::buildCollideFaces(), NL3D::CZoneLighter::buildZoneInformation(), computeContinousVertex(), computeNormalCornerSmooth(), computeNormalEdgeSmooth(), computeNormalOnNeighbor(), NL3D::CPatchDLMContext::computeTextureFar(), NL3D::CZoneLighter::computeTileFlagsOnly(), NL3D::CLandscapeVegetableBlockCreateContext::eval(), NL3D::CLandscape::freeFarRenderPass(), NL3D::CPatchDLMContext::generate(), NL3D::CLandscape::getFarRenderPass(), NL3D::CZoneLighter::getNormal(), NL3D::CLandscapeVegetableBlock::init(), NL3D::CTextureFar::rebuildPatch(), NL3D::CTextureFar::removePatch(), NL3D::CPatchUVLocator::selectPatch(), NL3D::CTextureFar::touchPatchULAndNext(), and NL3D::CTextureFar::tryAllocatePatch().
| uint16 NL3D::CPatch::getPatchId | ( | ) | const [inline] |
Definition at line 387 of file patch.h.
References PatchId.
Referenced by NL3D::CZoneLighter::buildZoneInformation(), NL3D::CLandscape::computeDynamicLighting(), NL3D::CZoneLighter::getNormal(), and NL3D::CZoneLighter::isLumelOnEdgeMustBeOversample().
| CTessVertex * NL3D::CPatch::getRootVertexForEdge | ( | sint | edge | ) | const [private] |
Definition at line 1778 of file patch.cpp.
References nlassert, OrderS, OrderT, Son0, Son1, NL3D::CTessFace::VBase, NL3D::CTessFace::VLeft, and NL3D::CTessFace::VRight.
Referenced by bind().
Get the smooth flag for the n-th edge.
Return true if this edge must by smoothed, false else.
Definition at line 572 of file patch.h.
References Flags, and NL_PATCH_SMOOTH_FLAG_SHIFT.
Referenced by NL3D::CZoneCornerSmoother::buildPatchBindInfo(), computeNearBlockLightmap(), computeNormalEdgeSmooth(), and NL3D::CZoneLighter::getNormal().
From the current tesselation of this patch, and a UV in this patch, return tesselated position.
Definition at line 577 of file patch.cpp.
References NLMISC::clamp(), NL3D::CTessFace::getTesselatedPos(), NLMISC::CVector::Null, Son0, Son1, NLMISC::CUV::U, and NLMISC::CUV::V.
Referenced by NL3D::CLandscape::getTesselatedPos().
| CTileElement * NL3D::CPatch::getTileElement | ( | const CUV & | uv | ) |
Get the lumel under the position.
Definition at line 2287 of file patch.cpp.
References NLMISC::clamp(), NLMISC::OptFastFloor(), OrderS, OrderT, Tiles, NLMISC::CUV::U, and NLMISC::CUV::V.
Referenced by NL3D::CLandscape::getTileElement().
| void NL3D::CPatch::getTileLightMap | ( | uint | ts, | |
| uint | tt, | |||
| CPatchRdrPass *& | rdrpass | |||
| ) | [private] |
Definition at line 1188 of file patch_lightmap.cpp.
References computeNearBlockLightmap(), computeTbTm(), NL3D::CLandscape::getTileLightMap(), NL3D::CZone::Landscape, NL3D::CTessBlock::LightMapId, NL3D::CTessBlock::LightMapRdrPass, NL3D::CTessBlock::LightMapRefCount, NL_TILE_LIGHTMAP_SIZE, nlassert, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and Zone.
Referenced by NL3D::CTessFace::computeTileMaterial().
Definition at line 1222 of file patch_lightmap.cpp.
References computeTbTm(), NL3D::CLandscape::getTileLightMapUvInfo(), NL3D::CZone::Landscape, NL3D::CTessBlock::LightMapId, nlassert, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, NLMISC::CVector::x, NLMISC::CVector::y, NLMISC::CVector::z, and Zone.
Referenced by NL3D::CTessFace::initTileUvLightmap().
| void NL3D::CPatch::getTileLumelmapPixelPrecomputed | ( | uint | ts, | |
| uint | tt, | |||
| uint | s, | |||
| uint | t, | |||
| uint8 & | dest | |||
| ) | const [private] |
same as computeTileLightmapPixelPrecomputed, but brut result, not modified by colorTable.
Actually used for Lightmap get interface.
Definition at line 667 of file patch_lightmap.cpp.
References CompressedLumels, NL3D::getUnpackLumelBlock(), NL_BLOCK_LUMEL_COMPRESSED_SIZE, and OrderS.
Referenced by getLumel().
| void NL3D::CPatch::getTileLumelmapPrecomputed | ( | uint | ts, | |
| uint | tt, | |||
| uint8 * | dest, | |||
| uint | stride | |||
| ) | [private] |
Definition at line 647 of file patch_lightmap.cpp.
References CompressedLumels, NL_BLOCK_LUMEL_COMPRESSED_SIZE, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, OrderS, and unpackLumelBlock().
Referenced by generateTileVegetable().
| uint NL3D::CPatch::getTileMaterialRefCount | ( | ) | const [inline] |
Get number of TileMaterial created in this Patch.
Definition at line 781 of file patch.h.
References MasterBlock, and NL3D::CTessBlock::TileMaterialRefCount.
Referenced by NL3D::CLandscape::render().
| CPatchRdrPass * NL3D::CPatch::getTileRenderPass | ( | sint | tileId, | |
| sint | pass | |||
| ) | [private] |
Definition at line 2062 of file patch.cpp.
References NL3D::CLandscape::getTileRenderPass(), NL3D::CZone::Landscape, NL3D_TILE_PASS_ADD, NL3D_TILE_PASS_RGB0, NL3D_TILE_PASS_RGB1, NL3D_TILE_PASS_RGB2, nlassert, Tiles, and Zone.
Referenced by NL3D::CTessFace::computeTileMaterial().
| void NL3D::CPatch::getTileTileColors | ( | uint | ts, | |
| uint | tt, | |||
| NLMISC::CRGBA | corners[4] | |||
| ) | [private] |
Definition at line 343 of file patch_lightmap.cpp.
References NL3D::CTileColor::Color565, OrderS, NLMISC::CRGBA::set565(), and TileColors.
Referenced by modulateTileLightmapEdgeWithTileColors(), modulateTileLightmapPixelWithTileColors(), and modulateTileLightmapWithTileColors().
| void NL3D::CPatch::getTileUvInfo | ( | sint | tileId, | |
| sint | pass, | |||
| bool | alpha, | |||
| uint8 & | orient, | |||
| CVector & | uvScaleBias, | |||
| bool & | is256x256, | |||
| uint8 & | uvOff | |||
| ) | [private] |
Definition at line 2102 of file patch.cpp.
References NL3D::CTile::additive, NL3D::CTile::alpha, NL3D::CTile::diffuse, NL3D::CLandscape::getTileUvScaleBiasRot(), NL3D::CZone::Landscape, NL3D_TILE_PASS_ADD, NL3D_TILE_PASS_RGB0, NL3D_TILE_PASS_RGB1, NL3D_TILE_PASS_RGB2, nlassert, Tiles, NLMISC::CVector::x, NLMISC::CVector::y, NLMISC::CVector::z, and Zone.
Referenced by NL3D::CTessFace::initTileUvRGBA().
| CZone* NL3D::CPatch::getZone | ( | ) | const [inline] |
Definition at line 380 of file patch.h.
References Zone.
Referenced by appendTileLightInfluences(), NL3D::CZoneLighter::buildZoneInformation(), computeDisplaceRawInteger(), NL3D::CLandscape::computeDynamicLighting(), getBindNeighbor(), getCurrentTileTLIColors(), getCurrentTLIColor(), NL3D::CZoneLighter::getNormal(), and NL3D::CTextureFar::rebuildPatch().
| bool NL3D::CPatch::isRenderClipped | ( | ) | const |
Definition at line 592 of file patch.cpp.
References NL3D::CZone::isPatchRenderClipped(), PatchId, and Zone.
Referenced by addRefDLMContext(), beginDLMLighting(), checkCreateVertexVBFar(), checkCreateVertexVBNear(), checkDeleteVertexVBFar(), checkDeleteVertexVBNear(), checkFillVertexVBFar(), checkFillVertexVBNear(), computeSoftwareGeomorphAndAlpha(), decRefDLMContext(), dirtTessBlockFaceVector(), fillVBIfVisible(), makeRoots(), processDLMLight(), recreateTessBlockFaceVector(), release(), NL3D::CLandscape::render(), renderFar0(), renderFar1(), and resetMasterBlock().
| void NL3D::CPatch::linkBeforeNearUL | ( | CPatch * | patchNext | ) |
For lighting update, insert this before patchNext (CiruclarList). textNext must be !NULL.
Definition at line 1877 of file patch_lightmap.cpp.
References _ULNearNext, _ULNearPrec, and nlassert.
Referenced by NL3D::CLandscape::linkPatchToNearUL().
| CTessFace * NL3D::CPatch::linkTessFaceWithEdge | ( | const NLMISC::CVector2f & | uv0, | |
| const NLMISC::CVector2f & | uv1, | |||
| CTessFace * | linkTo | |||
| ) | [private] |
Used by bind().
Search in the tesselation the first face which own the edge uv0-uv1. link it with linkTo, and return it. NULL if not found (obviously because not so tesselated)
Definition at line 1839 of file patch.cpp.
References NL3D::CTessFace::linkTessFaceWithEdge(), nlassert, Son0, and Son1.
Referenced by bind().
| void NL3D::CPatch::makeRoots | ( | ) | [private] |
Definition at line 1129 of file patch.cpp.
References appendFaceToRenderList(), appendFarVertexToRenderList(), BaseFarVertices, BaseVertices, clearTessBlocks(), NL3D::CTessFace::computeSplitPoint(), computeVertex(), NL3D::CTessVertex::EndPos, ErrorSize, NL3D::CTessFace::FBase, NLMISC::fd, NL3D::CTessFace::FLeft, NL3D::CTessFace::FRight, NL3D::CTessFace::FVBase, NL3D::CTessFace::FVLeft, NL3D::CTessFace::FVRight, getLandscape(), isRenderClipped(), NL3D::CTessFace::Level, NL3D::CTessVertex::MaxFaceSize, NL3D::CTessVertex::MaxNearLimit, NL3D::CLandscape::newTessFace(), nlassert, OrderS, OrderT, NL3D::CTessFace::Patch, NL3D::CTessFarVertex::PCoord, NL3D::CTessVertex::Pos, NL3D::CTessFace::PVBase, NL3D::CTessFace::PVLeft, NL3D::CTessFace::PVRight, resetMasterBlock(), NL3D::CParamCoord::setST(), NL3D::CTessFace::Size, Son0, Son1, NL3D::CTessFarVertex::Src, NL3D::CTessVertex::StartPos, NL3D::CTessFace::VBase, NL3D::CTessFace::VLeft, and NL3D::CTessFace::VRight.
Referenced by compile().
| void NL3D::CPatch::modulateTileLightmapEdgeWithTileColors | ( | uint | ts, | |
| uint | tt, | |||
| uint | edge, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride, | |||
| bool | inverse | |||
| ) | [private] |
Definition at line 505 of file patch_lightmap.cpp.
References NL3D::bilinearColorAndModulatex2(), getTileTileColors(), and NL_LUMEL_BY_TILE.
Referenced by computeTileLightmapEdge().
| void NL3D::CPatch::modulateTileLightmapPixelWithTileColors | ( | uint | ts, | |
| uint | tt, | |||
| uint | s, | |||
| uint | t, | |||
| NLMISC::CRGBA * | dest | |||
| ) | [private] |
Definition at line 541 of file patch_lightmap.cpp.
References NL3D::bilinearColorAndModulatex2(), and getTileTileColors().
Referenced by computeTileLightmapPixel().
| void NL3D::CPatch::modulateTileLightmapWithTileColors | ( | uint | ts, | |
| uint | tt, | |||
| NLMISC::CRGBA * | dest, | |||
| uint | stride | |||
| ) | [private] |
Definition at line 485 of file patch_lightmap.cpp.
References NL3D::bilinearColorAndModulatex2(), getTileTileColors(), and NL_LUMEL_BY_TILE.
Referenced by computeTileLightmap().
| void NL3D::CPatch::packLumelBlock | ( | uint8 * | dest, | |
| const uint8 * | source, | |||
| uint8 | alpha0, | |||
| uint8 | alpha1 | |||
| ) | [private] |
Pack a 4x4 lumel block.
Definition at line 259 of file patch_lightmap.cpp.
References NL3D::NL3DDecompressLumelFactor0Case0, NL3D::NL3DDecompressLumelFactor0Case1, NL3D::NL3DDecompressLumelFactor1Case0, and NL3D::NL3DDecompressLumelFactor1Case1.
Referenced by packShadowMap().
| void NL3D::CPatch::packShadowMap | ( | const uint8 * | pLumel | ) |
Pack the lumels of the patches.
Lumels are classes that describe the lighting environnement at a given texel of the lightmap. It is used to compute the shadow map of the patch, compress it and uncompress it. This method compress the lumels passed in parameter and stored them in its Lumels member.
| pShadow | is a pointer on the destination lumel buffer. Size must be (OrderS*4+1)*(OrderS*4+1). |
Definition at line 1264 of file patch_lightmap.cpp.
References CompressedLumels, evalLumelBlock(), NL_BLOCK_LUMEL_COMPRESSED_SIZE, NL_LUMEL_BY_TILE, nlassert, OrderS, OrderT, packLumelBlock(), and unpackLumelBlock().
Referenced by NL3D::CZone::build().
| void NL3D::CPatch::preRender | ( | const NLMISC::CBSphere & | patchSphere | ) |
preRender this patch. Build Max faces / pass etc...
Definition at line 247 of file patch_render.cpp.
References _PatchRdrPassFar0, _PatchRdrPassFar1, allocateVBAndFaceVector(), allocateVBAndFaceVectorFar1Only(), NL3D::CPatchRdrPass::appendRdrPatchFar0(), NL3D::CPatchRdrPass::appendRdrPatchFar1(), NL3D::CTileMaterial::appendTileToEachRenderPass(), NL3D::CTessBlock::clip(), NL3D::CTessBlock::clipFar(), computeNewFar(), NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, NL3D::CLandscapeGlobals::CurrentTileVBAllocator, deleteVBAndFaceVector(), deleteVBAndFaceVectorFar1Only(), NL3D::CTessBlock::FaceTileMaterialRefCount, Far0, Far1, NL3D::CLandscapeGlobals::FarTransition, NL3D::CTessBlock::FarVertexList, fillFar0VertexListVB(), fillFar1VertexListVB(), fillTileVertexListVB(), fillVB(), fillVBFar0Only(), fillVBFar1Only(), NL3D::CTessBlock::forceClip(), NL3D::CTessBlock::NearVertexList, NL3D_TESSBLOCK_TILESIZE, NumRenderableFaces, NL3D::CTessBlock::RdrTileRoot, NL3D::CTessBlock::refillFaceVectorFar0(), NL3D::CTessBlock::refillFaceVectorFar1(), NL3D::CTessBlock::refillFaceVectorTile(), NL3D::CLandscapeGlobals::RefineCenter, NL3D::CTessBlock::resetClip(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, NL3D::CLandscapeGlobals::TileDistNear, updateFar0VBAlloc(), updateFar1VBAlloc(), updateTileVBAlloc(), NL3D::CTessBlock::visibleFar0(), NL3D::CTessBlock::visibleFar1(), and NL3D::CTessBlock::visibleTile().
| void NL3D::CPatch::processDLMLight | ( | CPatchDLMPointLight & | pl | ) |
Process a Dynamic light, creating the DLMContext if necessary.
Increment RefCount. Called by CLandscape.
Definition at line 2018 of file patch_lightmap.cpp.
References _DLMContext, NL3D::CPatchDLMContext::addPointLightInfluence(), addRefDLMContext(), NL3D::CPatchDLMContext::CurPointLightCount, and isRenderClipped().
| void NL3D::CPatch::recreateAllVegetableIgs | ( | ) |
Recreate any vegetable block (as possible) in this patch. (useful for edition).
Definition at line 272 of file patch_vegetable.cpp.
References createVegetableBlock(), getLandscape(), NL3D::CLandscape::isVegetableActive(), OrderS, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
Referenced by NL3D::CLandscape::enableVegetable(), and NL3D::CLandscape::setVegetableDensity().
| void NL3D::CPatch::recreateTessBlockFaceVector | ( | CTessBlock & | block | ) |
Definition at line 747 of file patch_render.cpp.
References NL3D::CTessBlock::createFaceVectorFar0(), NL3D::CTessBlock::createFaceVectorFar1(), NL3D::CTessBlock::createFaceVectorTile(), Far0, Far1, getLandscape(), isRenderClipped(), and MasterBlock.
Referenced by NL3D::CLandscape::updateTessBlocksFaceVector().
| void NL3D::CPatch::recreateTileUvs | ( | ) |
Definition at line 2172 of file patch.cpp.
References NL3D::CTessList< T >::clear(), NLMISC::CObjectVector< T, EnableObjectBehavior >::clear(), NL3D_MAX_TILE_FACE, NL3D_TESSBLOCK_TILESIZE, NL3D::CTessFace::recreateTileUvs(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), Son0, Son1, TessBlocks, and NL3D::CTileMaterial::TileFaceList.
| void NL3D::CPatch::refineAll | ( | ) |
Refine this patch. Even if clipped. Refine all nodes.
Definition at line 1498 of file patch.cpp.
References nlassert, NL3D::CTessFace::refineAll(), Son0, and Son1.
Referenced by NL3D::CZone::refineAll().
| void NL3D::CPatch::refreshTesselationGeometry | ( | ) |
Definition at line 1536 of file patch.cpp.
References BaseVertices, computeVertex(), NL3D::CTessVertex::EndPos, nlassert, NL3D::CTessVertex::Pos, NL3D::CTessFace::refreshTesselationGeometry(), Son0, Son1, and NL3D::CTessVertex::StartPos.
| void NL3D::CPatch::release | ( | void | ) |
Un-compile a patch. Tesselation is deleted. if patch is not compiled, no - op.
Definition at line 113 of file patch.cpp.
References _DLMContext, _DLMContextRefCount, NL3D::CZone::_PatchOldRenderClipped, NL3D::CZone::_PatchRenderClipped, _ULNearNext, _ULNearPrec, clearTessBlocks(), NL3D::CLandscape::deleteTessFace(), deleteVBAndFaceVector(), NL3D::CTessFace::FLeft, NL3D::CTessFace::FRight, getLandscape(), NL3D::CTessFace::isLeaf(), isRenderClipped(), nlassert, OrderS, OrderT, PatchId, resetMasterBlock(), resetRenderFar(), NLMISC::CBitSet::set(), Son0, Son1, and Zone.
Referenced by NL3D::CZone::release(), and ~CPatch().
Definition at line 1244 of file patch_lightmap.cpp.
References computeTbTm(), NL3D::CZone::Landscape, NL3D::CTessBlock::LightMapId, NL3D::CTessBlock::LightMapRefCount, nlassert, NL3D::CLandscape::releaseTileLightMap(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and Zone.
Referenced by NL3D::CTessFace::releaseTileMaterial().
| void NL3D::CPatch::releaseVegetableBlock | ( | uint | numTb | ) | [private] |
release the vegetableBlock in the corresponding TessBlock. TessBlocks must exist
Definition at line 338 of file patch_vegetable.cpp.
References getLandscape(), and TessBlocks.
Referenced by deleteAllVegetableIgs(), and removeTileMaterialFromRenderList().
| void NL3D::CPatch::removeFaceFromRenderList | ( | CTessFace * | face | ) | [private] |
Definition at line 846 of file patch.cpp.
References decRefTessBlocks(), dirtTessBlockFaceVector(), NL3D::CTessBlock::FaceTileMaterialRefCount, NL3D::CTessBlock::FarFaceList, getNumTessBlock(), NL3D::CTessFace::Level, MasterBlock, nlassert, NumRenderableFaces, NL3D::CTessList< T >::remove(), removeFaceFromTileRenderList(), TessBlockLimitLevel, and TessBlocks.
Referenced by NL3D::CTessFace::doMerge(), NL3D::CTessFace::split(), and NL3D::CTessFace::splitRectangular().
| void NL3D::CPatch::removeFaceFromTileRenderList | ( | CTessFace * | face | ) | [private] |
Definition at line 911 of file patch.cpp.
References dirtTessBlockFaceVector(), getLandscape(), getNumTessBlock(), NL3D_MAX_TILE_FACE, nlassert, NL3D::CTileMaterial::Pass, NL3D::CRdrTileId::PatchRdrPass, NL3D::CTessList< T >::remove(), NL3D::CLandscape::removeFromShadowPolyReceiver(), TessBlocks, NL3D::CTileMaterial::TileFaceList, NL3D::CTessFace::TileFaces, and NL3D::CTessFace::TileMaterial.
Referenced by NL3D::CTessFace::deleteTileUvs(), and removeFaceFromRenderList().
| void NL3D::CPatch::removeFarVertexFromRenderList | ( | CTessFarVertex * | fv | ) | [private] |
Definition at line 1067 of file patch.cpp.
References decRefTessBlocks(), NL3D::CTessBlock::FarVertexList, FVMasterBlock, FVTessBlockEdge, getNumTessBlock(), MasterBlock, NL3D::CTessFarVertex::OwnerBlock, NL3D::CTessFarVertex::PCoord, NL3D::CTessList< T >::remove(), and TessBlocks.
Referenced by NL3D::CTessFace::doMerge().
| void NL3D::CPatch::removeNearVertexFromRenderList | ( | CTileMaterial * | tileMat, | |
| CTessNearVertex * | nv | |||
| ) | [private] |
Definition at line 1104 of file patch.cpp.
References computeTbTm(), decRefTessBlocks(), nlassert, NL3D::CTessNearVertex::OwnerBlock, TessBlocks, NL3D::CTileMaterial::TileS, and NL3D::CTileMaterial::TileT.
Referenced by NL3D::CTessFace::deleteTileUv().
| void NL3D::CPatch::removeTileMaterialFromRenderList | ( | CTileMaterial * | tm | ) | [private] |
Definition at line 1003 of file patch.cpp.
References computeTbTm(), decRefDLMContext(), decRefTessBlocks(), getLandscape(), NL3D::CLandscape::getTileCallbacks(), MasterBlock, nlassert, releaseVegetableBlock(), TessBlocks, NL3D::CTessBlock::TileMaterialRefCount, NL3D::CTileMaterial::TileS, and NL3D::CTileMaterial::TileT.
Referenced by NL3D::CTessFace::releaseTileMaterial().
| void NL3D::CPatch::renderFar0 | ( | ) |
Render this patch, if not clipped. Call PatchCurrentDriver->renderSimpleTriangles().
Definition at line 570 of file patch_render.cpp.
References _PatchRdrPassFar0, NL3D::CTessBlock::Far0FaceVector, isRenderClipped(), MasterBlock, NL3D_PROFILE_LAND_ADD, NL3D_PROFILE_LAND_ADD_FACE_VECTOR, nlassert, NL3D::ProfNPatchRdrFar0, NL3D::ProfNRdrFar0, NL3D::renderFaceVector(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and NL3D::CTessBlock::visibleFar0().
Referenced by NL3D::CLandscape::render().
| void NL3D::CPatch::renderFar1 | ( | ) |
Definition at line 602 of file patch_render.cpp.
References _PatchRdrPassFar1, NL3D::CTessBlock::Far1FaceVector, isRenderClipped(), MasterBlock, NL3D_PROFILE_LAND_ADD, NL3D_PROFILE_LAND_ADD_FACE_VECTOR, nlassert, NL3D::ProfNPatchRdrFar1, NL3D::ProfNRdrFar1, NL3D::renderFaceVector(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and NL3D::CTessBlock::visibleFar1().
Referenced by NL3D::CLandscape::render().
| void NL3D::CPatch::resetCompressedLumels | ( | ) |
Rebuild the packed lumels without shadow.
Only the interpolated color will be used.
Definition at line 1381 of file patch_lightmap.cpp.
References CompressedLumels, NL_LUMEL_BY_TILE, nlassert, OrderS, and OrderT.
Referenced by NL3D::CZone::build().
| void NL3D::CPatch::resetMasterBlock | ( | ) | [private] |
Definition at line 707 of file patch.cpp.
References NL3D::CTessList< T >::clear(), NL3D::CTessBlock::FarFaceList, NL3D::CTessBlock::FarVertexList, isRenderClipped(), MasterBlock, NL3D::CTessBlock::NearVertexList, nlassert, NumRenderableFaces, and NL3D::CTessList< T >::size().
Referenced by makeRoots(), and release().
| void NL3D::CPatch::resetRenderFar | ( | ) |
Definition at line 1560 of file patch.cpp.
References _PatchRdrPassFar0, _PatchRdrPassFar1, Far0, Far1, NL3D::CLandscape::freeFarRenderPass(), NL3D::CZone::Landscape, and Zone.
Referenced by release().
| void NL3D::CPatch::resetTileLightInfluences | ( | ) |
make a valid empty array of TileLightInfluences (ie resized to good size, but with empty light influences
Definition at line 1526 of file patch_lightmap.cpp.
References OrderS, OrderT, and TileLightInfluences.
Referenced by NL3D::CZone::build(), NL3D::CLandscape::removeAllPointLights(), and serial().
| void NL3D::CPatch::serial | ( | NLMISC::IStream & | f | ) |
Definition at line 1581 of file patch.cpp.
References _CornerSmoothFlag, _Version, NL3D::CTileElement::AboveWater, NL3D::CTileColor::Color565, CompressedLumels, Flags, Interiors, NLMISC::IStream::isReading(), NL_PATCH_SMOOTH_FLAG_MASK, nlassert, NoiseRotation, OrderS, OrderT, resetTileLightInfluences(), NLMISC::IStream::serial(), NLMISC::IStream::serialCont(), NLMISC::IStream::serialVersion(), Tangents, TileColors, TileLightInfluences, Tiles, Vertices, NLMISC::IStream::xmlPop(), NLMISC::IStream::xmlPush(), and NLMISC::IStream::xmlSerial().
setup Smooth flags for Noise on corner: used for Noise geometry and for lighting.
NB: convention: corner0==A, corner1==B ...
Definition at line 949 of file patch_noise.cpp.
References _CornerSmoothFlag, and nlassert.
Referenced by NL3D::CZone::build(), and NL3D::CZoneCornerSmoother::computeAllCornerSmoothFlags().
Set the smooth flag for the n-th edge.
flag is false if this edge must by smoothed, true else.
Definition at line 560 of file patch.h.
References Flags, and NL_PATCH_SMOOTH_FLAG_SHIFT.
| void NL3D::CPatch::setupColorsFromTileFlags | ( | const NLMISC::CRGBA | colors[4] | ) |
Debug purpose only : setup the colors of this patch so that it shows which tiles have vegetable disabled, or are above, below water.
debug coloring
User provides a table with 4 colors for each state : color 0 = above water color 1 = underwater color 2 = intersect water color 3 = vegetable disabled
Definition at line 2253 of file patch.cpp.
References min, OrderS, OrderT, TileColors, and Tiles.
| void NL3D::CPatch::unbind | ( | ) |
unbind the patch from All neighbors.
neighbors patchs links are modified too. The tesselation is forcemerged.
Definition at line 1729 of file patch.cpp.
References _BindZoneNeighbor, NL3D::CTessFace::FLeft, NL3D::CTessFace::forceMerge(), NL3D::CTessFace::FRight, NL3D::CTessFace::isLeaf(), nlassert, Son0, Son1, and NL3D::CTessFace::unbind().
Referenced by NL3D::CZone::bindPatch(), and NL3D::CZone::unbindPatch().
| void NL3D::CPatch::unlinkNearUL | ( | ) |
For lighting update, unlink (CiruclarList).
Definition at line 1894 of file patch_lightmap.cpp.
References _ULNearNext, and _ULNearPrec.
Referenced by NL3D::CLandscape::unlinkPatchFromNearUL().
| void NL3D::CPatch::unpack | ( | CBezierPatch & | p | ) | const |
Definition at line 190 of file patch.cpp.
References NL3D::CZone::getPatchBias(), NL3D::CZone::getPatchScale(), NL3D::CBezierPatch::Interiors, Interiors, NL3D::CBezierPatch::Tangents, Tangents, NL3D::CBezierPatch::Vertices, Vertices, and Zone.
Referenced by unpackIntoCache().
| CBezierPatch * NL3D::CPatch::unpackIntoCache | ( | ) | const |
Definition at line 180 of file patch.cpp.
References CachePatch, LastPatch, and unpack().
Referenced by addPatchBlocksInBBox(), addTrianglesInBBox(), appendTileMaterialToRenderList(), buildBBox(), NL3D::CZoneLighter::buildZoneInformation(), computeDefaultErrorSize(), computeNoise(), computeNormalCornerSmooth(), computeNormalEdgeSmooth(), computeNormalOnNeighbor(), computeVertex(), createVegetableBlock(), NL3D::CPatchDLMContext::generate(), generateTileVegetable(), NL3D::CLandscapeVegetableBlock::init(), and NL3D::CZoneLighter::processZonePointLightRT().
Unpack a 4x4 lumel block.
Definition at line 68 of file patch_lightmap.cpp.
References NLMISC::n.
Referenced by computeTileLightmapPrecomputed(), getTileLumelmapPrecomputed(), packShadowMap(), and unpackShadowMap().
| void NL3D::CPatch::unpackShadowMap | ( | uint8 * | pShadow | ) |
Unpack the lumels of the patches.
Lumels are classes that describe the lighting environnement at a given texel of the lightmap. It is used to compute the shadow map of the patch, compress it and uncompress it. This method uncompress the lumels stored in its Lumels member.
| pShadow | is a pointer on the destination lumel buffer. Size must be ((OrderS*4/ratio)+1)*((OrderT*4/ratio)+1). | |
| ratio | is the one over the ratio of the texture destination. Must be 1 or 2. |
Definition at line 168 of file patch_lightmap.cpp.
References CompressedLumels, NL_BLOCK_LUMEL_COMPRESSED_SIZE, NL_LUMEL_BY_TILE, nlassert, OrderS, OrderT, and unpackLumelBlock().
Referenced by NL3D::CTextureFar::rebuildPatch(), and NL3D::CZone::retrieve().
| void NL3D::CPatch::updateClipPatchVB | ( | bool | renderClipped | ) |
Definition at line 1538 of file patch_render.cpp.
References allocateVBAndFaceVector(), deleteVBAndFaceVector(), NLMISC::CObjectVector< T, EnableObjectBehavior >::empty(), fillVB(), NL3D::CTessBlock::forceClip(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), and TessBlocks.
| void NL3D::CPatch::updateFar0VBAlloc | ( | CTessList< CTessFarVertex > & | vertList, | |
| bool | alloc | |||
| ) | [private] |
Definition at line 786 of file patch_render.cpp.
References NL3D::CLandscapeVBAllocator::allocateVertex(), NL3D::CTessList< T >::begin(), NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeVBAllocator::deleteVertex(), NL3D::CTessFarVertex::Index0, and NL3D::CTessNodeList::Next.
Referenced by preRender(), and updateVBAlloc().
| void NL3D::CPatch::updateFar1VBAlloc | ( | CTessList< CTessFarVertex > & | vertList, | |
| bool | alloc | |||
| ) | [private] |
Definition at line 801 of file patch_render.cpp.
References NL3D::CLandscapeVBAllocator::allocateVertex(), NL3D::CTessList< T >::begin(), NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, NL3D::CLandscapeVBAllocator::deleteVertex(), NL3D::CTessFarVertex::Index1, and NL3D::CTessNodeList::Next.
Referenced by allocateVBAndFaceVectorFar1Only(), deleteVBAndFaceVectorFar1Only(), preRender(), and updateVBAlloc().
recompute the near lightmap of tessBlock "numTb".
return the number of pixels updated by computing of this tessBlock. Actually 0 if the tessBlock lightmap is not computed, or 100 (NL_TILE_LIGHTMAP_SIZE*NL_TILE_LIGHTMAP_SIZE) pixels.
Definition at line 1906 of file patch_lightmap.cpp.
References computeNearBlockLightmap(), NL3D::CZone::Landscape, NL3D::CTessBlock::LightMapId, NL3D::CTessBlock::LightMapRefCount, NL_TILE_LIGHTMAP_SIZE, nlassert, OrderS, NL3D::CLandscape::refillTileLightMap(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, and Zone.
Referenced by NL3D::CLandscape::updateLightingTextureNear().
| void NL3D::CPatch::updateTextureFarOnly | ( | const NLMISC::CBSphere & | patchSphere | ) |
Definition at line 224 of file patch_render.cpp.
References computeNewFar(), Far0, and Far1.
| void NL3D::CPatch::updateTileVBAlloc | ( | CTessList< CTessNearVertex > & | vertList, | |
| bool | alloc | |||
| ) | [private] |
Definition at line 816 of file patch_render.cpp.
References NL3D::CLandscapeVBAllocator::allocateVertex(), NL3D::CTessList< T >::begin(), NL3D::CLandscapeGlobals::CurrentTileVBAllocator, NL3D::CLandscapeVBAllocator::deleteVertex(), NL3D::CTessNearVertex::Index, and NL3D::CTessNodeList::Next.
Referenced by preRender(), and updateVBAlloc().
| void NL3D::CPatch::updateVBAlloc | ( | bool | alloc | ) | [private] |
Definition at line 831 of file patch_render.cpp.
References Far0, Far1, NL3D::CTessBlock::FarVertexList, MasterBlock, NL3D::CTessBlock::NearVertexList, NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), TessBlocks, updateFar0VBAlloc(), updateFar1VBAlloc(), updateTileVBAlloc(), NL3D::CTessBlock::visibleFar0(), NL3D::CTessBlock::visibleFar1(), and NL3D::CTessBlock::visibleTile().
Referenced by allocateVBAndFaceVector(), and deleteVBAndFaceVector().
friend class CLandscapeVegetableBlock [friend] |
friend class CPatchRdrPass [friend] |
CZone* NL3D::CPatch::_BindZoneNeighbor[4] [private] |
uint8 NL3D::CPatch::_CornerSmoothFlag [private] |
Put here for packing with NoiseRotation.
Definition at line 351 of file patch.h.
Referenced by CPatch(), getCornerSmoothFlag(), serial(), and setCornerSmoothFlag().
CPatchDLMContext* NL3D::CPatch::_DLMContext [private] |
The Dynamic LightMap context.
created only when compiled, AND (when in Near OR (when in Far AND touched by pointLight)) else NULL.
Definition at line 1209 of file patch.h.
Referenced by addRefDLMContext(), beginDLMLighting(), CPatch(), decRefDLMContext(), endDLMLighting(), fillFar0DLMUvOnlyVertexListVB(), fillFar0VertexVB(), fillFar1DLMUvOnlyVertexListVB(), fillFar1VertexVB(), generateTileVegetable(), NL3D::CTessFace::initTileUvDLM(), processDLMLight(), and release().
sint NL3D::CPatch::_DLMContextRefCount [private] |
The reference count for DLMContext.
Each TileMaterial created add a reference. Each pointLight wich touch the patch too.
Definition at line 1214 of file patch.h.
Referenced by addRefDLMContext(), CPatch(), decRefDLMContext(), and release().
CPatch* NL3D::CPatch::_NextRdrFar0 [private] |
Definition at line 865 of file patch.h.
Referenced by NL3D::CPatchRdrPass::appendRdrPatchFar0(), CPatch(), and getNextFar0ToRdr().
CPatch* NL3D::CPatch::_NextRdrFar1 [private] |
Definition at line 867 of file patch.h.
Referenced by NL3D::CPatchRdrPass::appendRdrPatchFar1(), CPatch(), and getNextFar1ToRdr().
CPatchRdrPass* NL3D::CPatch::_PatchRdrPassFar0 [private] |
Definition at line 864 of file patch.h.
Referenced by computeNewFar(), CPatch(), preRender(), renderFar0(), and resetRenderFar().
CPatchRdrPass* NL3D::CPatch::_PatchRdrPassFar1 [private] |
Definition at line 866 of file patch.h.
Referenced by computeNewFar(), CPatch(), preRender(), renderFar1(), and resetRenderFar().
CPatch* NL3D::CPatch::_ULNearNext [private] |
Definition at line 1198 of file patch.h.
Referenced by compile(), CPatch(), getNextNearUL(), linkBeforeNearUL(), release(), and unlinkNearUL().
CPatch* NL3D::CPatch::_ULNearPrec [private] |
Definition at line 1197 of file patch.h.
Referenced by compile(), CPatch(), linkBeforeNearUL(), release(), and unlinkNearUL().
uint32 NL3D::CPatch::_Version = 7 [static, private] |
CTessFarVertex NL3D::CPatch::BaseFarVertices[4] [private] |
Definition at line 815 of file patch.h.
Referenced by makeRoots().
CTessVertex* NL3D::CPatch::BaseVertices[4] [private] |
Definition at line 813 of file patch.h.
Referenced by averageTesselationVertices(), bind(), compile(), computeContinousVertex(), computeVertexButCorner(), getCornerVertex(), makeRoots(), and refreshTesselationGeometry().
CBezierPatch NL3D::CPatch::CachePatch [static, private] |
Definition at line 1228 of file patch.h.
Referenced by unpackIntoCache().
| std::vector<uint8> NL3D::CPatch::CompressedLumels |
Definition at line 326 of file patch.h.
Referenced by computeTileLightmapEdgePrecomputed(), computeTileLightmapPixelPrecomputed(), computeTileLightmapPrecomputed(), getTileLumelmapPixelPrecomputed(), getTileLumelmapPrecomputed(), packShadowMap(), resetCompressedLumels(), serial(), and unpackShadowMap().
float NL3D::CPatch::ErrorSize [private] |
Definition at line 809 of file patch.h.
Referenced by compile(), computeDefaultErrorSize(), getErrorSize(), and makeRoots().
bool NL3D::CPatch::ExcludeFromRefineAll [private] |
Definition at line 800 of file patch.h.
Referenced by CPatch(), and NL3D::CZone::refineAll().
sint NL3D::CPatch::Far0 [private] |
Definition at line 860 of file patch.h.
Referenced by checkCreateVertexVBFar(), checkCreateVertexVBNear(), checkDeleteVertexVBFar(), checkDeleteVertexVBNear(), checkFillVertexVBFar(), checkFillVertexVBNear(), computeNewFar(), computeSoftwareGeomorphAndAlpha(), CPatch(), createFaceVectorFar0OrTile(), deleteFaceVectorFar0OrTile(), fillVB(), fillVBFar0Only(), fillVBFarsDLMUvOnly(), getFar0(), preRender(), recreateTessBlockFaceVector(), resetRenderFar(), updateTextureFarOnly(), and updateVBAlloc().
float NL3D::CPatch::Far0UBias [private] |
Definition at line 820 of file patch.h.
Referenced by computeNewFar(), and fillFar0VertexVB().
float NL3D::CPatch::Far0UScale [private] |
Definition at line 820 of file patch.h.
Referenced by computeNewFar(), and fillFar0VertexVB().
float NL3D::CPatch::Far0VBias [private] |
Definition at line 820 of file patch.h.
Referenced by computeNewFar(), and fillFar0VertexVB().
float NL3D::CPatch::Far0VScale [private] |
Definition at line 820 of file patch.h.
Referenced by computeNewFar(), and fillFar0VertexVB().
sint NL3D::CPatch::Far1 [private] |
Definition at line 861 of file patch.h.
Referenced by allocateVBAndFaceVectorFar1Only(), checkCreateVertexVBFar(), checkDeleteVertexVBFar(), checkFillVertexVBFar(), computeNewFar(), computeSoftwareGeomorphAndAlpha(), CPatch(), createFaceVectorFar1(), deleteFaceVectorFar1(), deleteVBAndFaceVectorFar1Only(), fillVB(), fillVBFar1Only(), fillVBFarsDLMUvOnly(), getFar1(), preRender(), recreateTessBlockFaceVector(), resetRenderFar(), updateTextureFarOnly(), and updateVBAlloc().
float NL3D::CPatch::Far1UBias [private] |
Definition at line 821 of file patch.h.
Referenced by computeNewFar(), and fillFar1VertexVB().
float NL3D::CPatch::Far1UScale [private] |
Definition at line 821 of file patch.h.
Referenced by computeNewFar(), and fillFar1VertexVB().
float NL3D::CPatch::Far1VBias [private] |
Definition at line 821 of file patch.h.
Referenced by computeNewFar(), and fillFar1VertexVB().
float NL3D::CPatch::Far1VScale [private] |
Definition at line 821 of file patch.h.
Referenced by computeNewFar(), and fillFar1VertexVB().
uint8 NL3D::CPatch::Flags [private] |
Flags NL_PATCH_FAR0_ROTATED and NL_PATCH_FAR1_ROTATED NL_PATCH_FAR0_ROTATED for Far0, NL_PATCH_FAR1_ROTATED for Far1 If the flag is set, the far texture of the patch is rotated of 1 (to the left of course).
Flags NL_PATCH_SMOOTH_FLAG_MASK 4 flag for smooth edge. Same as CPatchInfo::CBindInfo shifted by (<<NL_PATCH_SMOOTH_FLAG_SHIFT). See CPatchInfo::CBindInfo::Flags for details.
Definition at line 833 of file patch.h.
Referenced by NL3D::CZone::build(), computeNewFar(), fillFar0VertexVB(), fillFar1VertexVB(), getSmoothFlag(), NL3D::CZone::retrieve(), serial(), and setSmoothFlag().
Definition at line 323 of file patch.h.
Referenced by NL3D::CZone::applyHeightField(), NL3D::CZone::build(), NL3D::CZone::retrieve(), serial(), and unpack().
const CPatch * NL3D::CPatch::LastPatch = NULL [static, private] |
Definition at line 1230 of file patch.h.
Referenced by unpackIntoCache().
Definition at line 878 of file patch.h.
Referenced by allocateVBAndFaceVectorFar1Only(), appendFaceToRenderList(), appendFarVertexToRenderList(), appendTileMaterialToRenderList(), compile(), computeSoftwareGeomorphAndAlpha(), countNumTriFar0(), countNumTriFar1(), CPatch(), createFaceVectorFar0OrTile(), createFaceVectorFar1(), debugAllocationMarkIndices(), deleteFaceVectorFar0OrTile(), deleteFaceVectorFar1(), deleteVBAndFaceVectorFar1Only(), fillVB(), fillVBFar0Only(), fillVBFar1Only(), fillVBFarsDLMUvOnly(), getTileMaterialRefCount(), recreateTessBlockFaceVector(), removeFaceFromRenderList(), removeFarVertexFromRenderList(), removeTileMaterialFromRenderList(), renderFar0(), renderFar1(), resetMasterBlock(), and updateVBAlloc().
Noise Data.
The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap.
Definition at line 341 of file patch.h.
Referenced by NL3D::CZone::build(), computeDisplaceRawCoordinates(), CPatch(), NL3D::CZone::retrieve(), and serial().
sint NL3D::CPatch::NumRenderableFaces [private] |
Definition at line 872 of file patch.h.
Referenced by appendFaceToRenderList(), NL3D::CPatchRdrPass::appendRdrPatchFar0(), NL3D::CPatchRdrPass::appendRdrPatchFar1(), CPatch(), preRender(), removeFaceFromRenderList(), and resetMasterBlock().
float NL3D::CPatch::OOTransitionSqrDelta [private] |
Definition at line 838 of file patch.h.
Referenced by computeGeomorphAlphaFar1VertexListVB(), computeNewFar(), and fillFar1VertexVB().
uint8 NL3D::CPatch::OrderS [private] |
Definition at line 797 of file patch.h.
Referenced by addPatchBlocksInBBox(), addPatchBlocksInBBoxRecurs(), addRefTessBlocks(), addTileTrianglesInBBox(), addTrianglesInBBox(), appendTileLightInfluences(), appendTileMaterialToRenderList(), bind(), NL3D::CZone::build(), changeEdgeNeighbor(), NL3D::CZone::compile(), compile(), computeCurrentTLILightmapDiv2(), computeDisplaceCornerSmooth(), computeDisplaceEdgeSmooth(), computeDisplaceRawInteger(), computeDisplaceRawOnNeighbor(), computeNearBlockLightmap(), computeNoise(), computeNormalOnNeighbor(), computeTbTm(), computeTileLightmapEdgePrecomputed(), computeTileLightmapPixelAroundCorner(), computeTileLightmapPixelAutomatic(), computeTileLightmapPixelPrecomputed(), computeTileLightmapPrecomputed(), NL3D::CTessFace::computeTileMaterial(), copyTileFlagsFromPatch(), CPatch(), createVegetableBlock(), fillPatchQuadBlock(), generateTileVegetable(), getCurrentTLIColor(), getLumel(), getNumTessBlock(), getOrderForEdge(), getOrderS(), getRootFaceForEdge(), getRootVertexForEdge(), getTileElement(), getTileLumelmapPixelPrecomputed(), getTileLumelmapPrecomputed(), getTileTileColors(), makeRoots(), packShadowMap(), recreateAllVegetableIgs(), release(), resetCompressedLumels(), resetTileLightInfluences(), NL3D::CZone::retrieve(), serial(), setupColorsFromTileFlags(), unpackShadowMap(), and updateTessBlockLighting().
uint8 NL3D::CPatch::OrderT [private] |
Definition at line 797 of file patch.h.
Referenced by addPatchBlocksInBBox(), addPatchBlocksInBBoxRecurs(), addRefTessBlocks(), addTileTrianglesInBBox(), addTrianglesInBBox(), appendTileLightInfluences(), appendTileMaterialToRenderList(), bind(), NL3D::CZone::build(), changeEdgeNeighbor(), NL3D::CZone::compile(), compile(), computeCurrentTLILightmapDiv2(), computeDisplaceCornerSmooth(), computeDisplaceEdgeSmooth(), computeDisplaceRawInteger(), computeDisplaceRawOnNeighbor(), computeNearBlockLightmap(), computeNoise(), computeNormalOnNeighbor(), computeTileLightmapPixelAroundCorner(), computeTileLightmapPixelAutomatic(), NL3D::CTessFace::computeTileMaterial(), copyTileFlagsFromPatch(), CPatch(), createVegetableBlock(), fillPatchQuadBlock(), generateTileVegetable(), getLumel(), getNumTessBlock(), getOrderForEdge(), getOrderT(), getRootFaceForEdge(), getRootVertexForEdge(), getTileElement(), makeRoots(), packShadowMap(), release(), resetCompressedLumels(), resetTileLightInfluences(), NL3D::CZone::retrieve(), serial(), setupColorsFromTileFlags(), and unpackShadowMap().
uint16 NL3D::CPatch::PatchId [private] |
Definition at line 795 of file patch.h.
Referenced by compile(), getBindNeighbor(), getPatchId(), isRenderClipped(), and release().
CTessFace* NL3D::CPatch::Son0 [private] |
Definition at line 811 of file patch.h.
Referenced by appendTessellationLeaves(), averageTesselationVertices(), bind(), changeEdgeNeighbor(), CPatch(), deleteTileUvs(), forceMergeAtTileLevel(), getRootFaceForEdge(), getRootVertexForEdge(), getTesselatedPos(), linkTessFaceWithEdge(), makeRoots(), recreateTileUvs(), refineAll(), refreshTesselationGeometry(), release(), and unbind().
CTessFace * NL3D::CPatch::Son1 [private] |
Definition at line 811 of file patch.h.
Referenced by appendTessellationLeaves(), averageTesselationVertices(), bind(), changeEdgeNeighbor(), CPatch(), deleteTileUvs(), forceMergeAtTileLevel(), getRootFaceForEdge(), getRootVertexForEdge(), getTesselatedPos(), linkTessFaceWithEdge(), makeRoots(), recreateTileUvs(), refineAll(), refreshTesselationGeometry(), release(), and unbind().
sint NL3D::CPatch::SquareLimitLevel [private] |
Definition at line 807 of file patch.h.
Referenced by compile(), and NL3D::CTessFace::isRectangular().
Definition at line 322 of file patch.h.
Referenced by NL3D::CZone::applyHeightField(), NL3D::CZone::build(), NL3D::CZone::retrieve(), serial(), and unpack().
sint NL3D::CPatch::TessBlockLimitLevel [private] |
Definition at line 803 of file patch.h.
Referenced by appendFaceToRenderList(), compile(), extendTessBlockWithEndPos(), and removeFaceFromRenderList().
sint NL3D::CPatch::TessBlockRefCount [private] |
Definition at line 881 of file patch.h.
Referenced by addRefTessBlocks(), clearTessBlocks(), CPatch(), and decRefTessBlocks().
Definition at line 875 of file patch.h.
Referenced by addRefTessBlocks(), allocateVBAndFaceVectorFar1Only(), appendFaceToRenderList(), appendFaceToTileRenderList(), appendFarVertexToRenderList(), appendNearVertexToRenderList(), appendTileMaterialToRenderList(), clearTessBlocks(), computeSoftwareGeomorphAndAlpha(), countNumTriFar0(), countNumTriFar1(), createFaceVectorFar0OrTile(), createFaceVectorFar1(), createVegetableBlock(), debugAllocationMarkIndices(), deleteAllVegetableIgs(), deleteFaceVectorFar0OrTile(), deleteFaceVectorFar1(), deleteVBAndFaceVectorFar1Only(), extendTessBlockWithEndPos(), fillVB(), fillVBFar0Only(), fillVBFar1Only(), fillVBFarsDLMUvOnly(), getNumNearTessBlocks(), getTileLightMap(), getTileLightMapUvInfo(), preRender(), recreateAllVegetableIgs(), recreateTileUvs(), releaseTileLightMap(), releaseVegetableBlock(), removeFaceFromRenderList(), removeFaceFromTileRenderList(), removeFarVertexFromRenderList(), removeNearVertexFromRenderList(), removeTileMaterialFromRenderList(), renderFar0(), renderFar1(), updateClipPatchVB(), updateTessBlockLighting(), and updateVBAlloc().
| std::vector<CTileColor> NL3D::CPatch::TileColors |
Definition at line 332 of file patch.h.
Referenced by NL3D::CZone::build(), NL3D::CPatchDLMContext::compileLighting(), NL3D::CPatchDLMContext::computeTextureFar(), NL3D::CPatchDLMContext::generate(), getTileTileColors(), NL3D::CTextureFar::rebuildPatch(), NL3D::CZone::retrieve(), serial(), and setupColorsFromTileFlags().
| std::vector<CTileLightInfluence> NL3D::CPatch::TileLightInfluences |
Definition at line 335 of file patch.h.
Referenced by appendTileLightInfluences(), NL3D::CZone::build(), getCurrentTLIColor(), resetTileLightInfluences(), NL3D::CZone::retrieve(), and serial().
sint NL3D::CPatch::TileLimitLevel [private] |
Definition at line 805 of file patch.h.
Referenced by compile(), NL3D::CTessFace::computeNearLimit(), NL3D::CTessFace::computeTileMaterial(), NL3D::CTessFace::deleteTileUvs(), NL3D::CTessFace::doMerge(), NL3D::CTessFace::forceMergeAtTileLevel(), NL3D::CTessFace::recreateTileUvs(), NL3D::CTessFace::refineAll(), NL3D::CTessFace::releaseTileMaterial(), NL3D::CTessFace::split(), NL3D::CTessFace::splitRectangular(), NL3D::CTessFace::updateRefineMerge(), and NL3D::CTessFace::updateRefineSplit().
| std::vector<CTileElement> NL3D::CPatch::Tiles |
Definition at line 329 of file patch.h.
Referenced by NL3D::CZone::build(), computeDisplaceRawInteger(), NL3D::CPatchDLMContext::computeTextureFar(), copyTileFlagsFromPatch(), generateTileVegetable(), getTileElement(), getTileRenderPass(), getTileUvInfo(), NL3D::CTextureFar::rebuildPatch(), NL3D::CZone::retrieve(), serial(), and setupColorsFromTileFlags().
float NL3D::CPatch::TransitionSqrMin [private] |
Definition at line 837 of file patch.h.
Referenced by computeGeomorphAlphaFar1VertexListVB(), computeNewFar(), and fillFar1VertexVB().
std::vector<CVegetableClipBlock*> NL3D::CPatch::VegetableClipBlocks [private] |
list of vegetable clipBlocks, created/destroyed at same time as TessBlocks.
Definition at line 888 of file patch.h.
Referenced by addRefTessBlocks(), clearTessBlocks(), and createVegetableBlock().
The patch coordinates (see CBezierPatch).
Definition at line 321 of file patch.h.
Referenced by NL3D::CZone::applyHeightField(), NL3D::CZone::build(), NL3D::CZone::retrieve(), serial(), and unpack().
CZone* NL3D::CPatch::Zone [private] |
Definition at line 792 of file patch.h.
Referenced by addRefDLMContext(), clearTessBlocks(), compile(), computeContinousVertex(), computeNewFar(), computeVertexButCorner(), CPatch(), decRefDLMContext(), getLandscape(), getTileLightMap(), getTileLightMapUvInfo(), getTileRenderPass(), getTileUvInfo(), getZone(), isRenderClipped(), release(), releaseTileLightMap(), resetRenderFar(), unpack(), and updateTessBlockLighting().
1.6.1