# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CPatch Class Reference

A landscape patch. More...

#include <patch.h>

List of all members.

[NOHEADER]

void setCornerSmoothFlag (uint corner, bool smooth)
 setup Smooth flags for Noise on corner: used for Noise geometry and for lighting. More...

bool getCornerSmoothFlag (uint corner) const
uint8 NoiseRotation
 The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap. More...

uint8 _CornerSmoothFlag
 Put here for packing with NoiseRotation. More...


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)

[NOHEADER]

CTessFacelinkTessFaceWithEdge (const NLMISC::CVector2f &uv0, const NLMISC::CVector2f &uv1, CTessFace *linkTo)
 Used by bind(). More...

CZone_BindZoneNeighbor [4]
 The 4 neighbors zone of this patch (setuped at bind() time). NB: NULL if zone not loaded, or if no patch near us. More...


Dynamic Lighting Management

void addRefDLMContext ()
 Add a ref count to the DLMContext, creating it if necessary. More...

void decRefDLMContext (uint count=1)
 Dec a ref count to the DLMContext, deleting it if refCount== 0. More...

CPatchDLMContext_DLMContext
 The Dynamic LightMap context. More...

sint _DLMContextRefCount
 The reference count for DLMContext. More...


Public Methods

 CPatch ()
 Constructor. More...

 ~CPatch ()
 dtor. More...

void compile (CZone *z, uint patchId, uint8 orderS, uint8 orderT, CTessVertex *baseVertices[4], float errorSize=0)
 compile a valid patch. More...

void release ()
 Un-compile a patch. Tesselation is deleted. if patch is not compiled, no - op. More...

CLandscapegetLandscape () const
 Get the landscape in which is placed this patch. More...

CZonegetZone () 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. More...

CAABBox buildBBox () const
 Build the bbox of the patch, according to ctrl points, and displacement map max value. More...

const CBSphere & getBSphere () const
 Return the bounding sphere. Work only when zone compiled. More...

CVector computeVertex (float s, float t) const
 Compute a vertex. More...

CVector computeContinousVertex (float s, float t) const
 Same as computeVertex, but special accurate version for CVisualCollisionEntity. More...

void unbind ()
 unbind the patch from All neighbors. More...

void bind (CBindInfo Edges[4], bool rebind)
 bind the patch to 4 neighbors, given in this patch edge order (0,1,2,3). More...

void forceMergeAtTileLevel ()
 For changing TileMaxSubdivision. force tesselation to be under tile. More...

void averageTesselationVertices ()
 This is especially for Pacs. More...

void forceNoClip ()
 Classify this patch as UnClipped. More...

void forceClip ()
 Classify this patch as Clipped. More...

void forceNoRenderClip ()
 Classify this patch as Render UnClipped. More...

void forceRenderClip ()
 Classify this patch as RenderClipped. More...

void clip (const std::vector< CPlane > &pyramid)
 Classify this patch. More...

void refineAll ()
 Refine this patch. Even if clipped. Refine all nodes. More...

void resetRenderFar ()
void deleteTileUvs ()
void recreateTileUvs ()
void refreshTesselationGeometry ()
void serial (NLMISC::IStream &f)
void unpack (CBezierPatch &p) const
void unpackShadowMap (uint8 *pShadow)
 Unpack the lumels of the patches. More...

void packShadowMap (const uint8 *pLumel)
 Pack the lumels of the patches. More...

void resetCompressedLumels ()
 Rebuild the packed lumels without shadow. More...

void setupColorsFromTileFlags (const NLMISC::CRGBA colors[4])
 debug coloring. More...

void copyTileFlagsFromPatch (const CPatch *src)
 Set this patch flags from an other one. More...

void setSmoothFlag (uint edge, bool flag)
 Set the smooth flag for the n-th edge. More...

bool getSmoothFlag (uint edge) const
 Get the smooth flag for the n-th edge. More...

bool isClipped () const
bool isRenderClipped () const
const CTessVertexgetCornerVertex (uint corner)
uint getTileMaterialRefCount () const
 Get number of TileMaterial created in this Patch. More...

CBezierPatchunpackIntoCache () const
Render
void preRender ()
 preRender this patch. no-op if(RenderClipped). Build Max faces / pass etc... More...

void updateTextureFarOnly ()
void renderFar0 ()
 Render this patch, if not clipped. Call PatchCurrentDriver->renderSimpleTriangles(). More...

void renderFar1 ()
void computeSoftwareGeomorphAndAlpha ()
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. More...

void fillPatchQuadBlock (CPatchQuadBlock &quadBlock) const
 Fill a CPatchQuadBlock, from its required PatchId. More...

void addPatchBlocksInBBox (CPatchIdent paId, const CAABBox &bbox, std::vector< CPatchBlockIdent > &paBlockIds) const
 Add CPatchBlockIdent to CPatchBlockIdent array which intersect the bbox. More...

CVector getTesselatedPos (CUV uv) const
 From the current tesselation of this patch, and a UV in this patch, return tesselated position. More...

void appendTessellationLeaves (std::vector< const CTessFace * > &leaves) const
 From the current tesselation of this patch, append to the list of leaves faces. More...

Lightmap get interface.
uint8 getLumel (const CUV &uv) const
 Get the lumel under the position. More...

void appendTileLightInfluences (const CUV &uv, std::vector< CPointLightInfluence > &pointLightList) const
 Append lights under the position to pointLightList. More...

void computeCurrentTLILightmap (NLMISC::CRGBA *array) const
 For CTextureFar, compute current TLI Lightmap at tile level. More...

Tiles get interface.
CTileElementgetTileElement (const CUV &uv)
 Get the lumel under the position. More...

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 updateClipPatchVB ()
void debugAllocationMarkIndices (uint marker)
void recreateTessBlockFaceVector (CTessBlock &block)
MicroVegetation
void deleteAllVegetableIgs ()
 Delete any vegetable Ig still existing in this patch. More...

void recreateAllVegetableIgs ()
 Recreate any vegetable block (as possible) in this patch. (usefull for edition). More...

TileLightInfluences
void resetTileLightInfluences ()
 make a valid empty array of TileLightInfluences (ie resized to good size, but with empty light influences. More...

UpdateLighting Management
void linkBeforeNearUL (CPatch *patchNext)
 For lighting update, insert this before patchNext (CiruclarList). textNext must be !NULL. More...

void unlinkNearUL ()
 For lighting update, unlink (CiruclarList). More...

CPatch * getNextNearUL () const
 For lighting update, get Next (CiruclarList). If ==this, then list is empty. More...

uint getNumNearTessBlocks () const
 get the number of Near TessBlocks. Actually OrderS/2*OrderT/2. More...

uint updateTessBlockLighting (uint numTb)
 recompute the near lightmap of tessBlock "numTb". More...

Dynamic Lighting Management
void beginDLMLighting ()
 begin Dynamic light Process. More...

void processDLMLight (CPatchDLMPointLight &pl)
 Process a Dynamic light, creating the DLMContext if necessary. More...

void endDLMLighting ()
 end Dynamic light Process, deleting the DLMContext if necessary. More...


Public Attributes

CVector3s Vertices [4]
 The patch coordinates (see CBezierPatch). More...

CVector3s Tangents [8]
CVector3s Interiors [4]
std::vector< uint8CompressedLumels
std::vector< CTileElementTiles
std::vector< CTileColorTileColors
std::vector< CTileLightInfluenceTileLightInfluences

Private Types


Private Methods

void packLumelBlock (uint8 *dest, const uint8 *source, uint8 alpha0, uint8 alpha1)
 Pack a 4x4 lumel block. More...

uint evalLumelBlock (const uint8 *original, const uint8 *unCompressed, uint width, uint height)
 Eval an uncompressed 4x4 block against the original. More...

void unpackLumelBlock (uint8 *dest, const uint8 *src)
 Unpack a 4x4 lumel block. More...

void computeDefaultErrorSize ()
void makeRoots ()
CTessFacegetRootFaceForEdge (sint edge) const
CTessVertexgetRootVertexForEdge (sint edge) const
void changeEdgeNeighbor (sint edge, CTessFace *to)
void computeNewFar (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.
CPatchRdrPassgetTileRenderPass (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 CPatch::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. More...

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. More...

void addTileTrianglesInBBox (CPatchIdent paId, const CAABBox &bbox, std::vector< CTrianglePatch > &triangles, uint8 tessLevel, uint8 s0, uint8 t0) const
 called by addTrianglesInBBoxRecurs(). More...

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. More...

CVector computeVertexButCorner (float s, float t, bool &onCorner) const
 Used by computeContinousVertex(). More...

float computeDisplaceRawInteger (sint ts, sint tt, sint ms, sint mt) const
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. More...

float computeDisplaceRawOnNeighbor (float sTile, float tTile, float s, float t) const
 usefull only for computeDisplaceCornerSmooth(). More...

float computeDisplaceInteriorSmooth (float s, float t) const
 compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). More...

float computeDisplaceEdgeSmooth (float s, float t, sint8 smoothBorderX, sint8 smoothBorderY) const
 compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). More...

float computeDisplaceCornerSmooth (float s, float t, sint8 smoothBorderX, sint8 smoothBorderY) const
 compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]). More...

CVector computeNormalEdgeSmooth (float s, float t, sint8 smoothBorderX, sint8 smoothBorderY) const
 compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]). More...

CVector computeNormalCornerSmooth (float s, float t, sint8 smoothBorderX, sint8 smoothBorderY) const
 compute the smoothed normal for s,t ([0;OrderS], [0;OrderT]). More...

CVector computeNormalOnNeighbor (float s, float t, uint edgeExclude) const
 same reasoning as in computeDisplaceRawOnNeighbor(). More...

void computeNoise (float s, float t, CVector &displace) const
 compute the Final displacement for s,t ([0;1], [0;1]). More...

void createVegetableBlock (uint numTb, uint ts, uint tt)
 Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist. More...

void releaseVegetableBlock (uint numTb)
 release the vegetableBlock in the corresponding TessBlock. TessBlocks must exist. More...

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. More...


Private Attributes

CZoneZone
uint16 PatchId
uint8 OrderS
uint8 OrderT
bool ExcludeFromRefineAll
sint TessBlockLimitLevel
sint TileLimitLevel
sint SquareLimitLevel
float ErrorSize
CTessFaceSon0
CTessFaceSon1
CTessVertexBaseVertices [4]
CTessFarVertex BaseFarVertices [4]
CBSphere BSphere
sint Far0
sint Far1
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). More...

bool Clipped
bool RenderClipped
bool OldRenderClipped
CRdrPatchId Pass0
CRdrPatchId Pass1
float TransitionSqrMin
float OOTransitionSqrDelta
Block renders.
CTessBlock MasterBlock
std::vector< CTessBlockTessBlocks
sint TessBlockRefCount
sint NumRenderableFaces
Vegetables.
std::vector< CVegetableClipBlock * > VegetableClipBlocks
 list of vegetable clipBlocks, created/destroyed at same time as TessBlocks. More...

UpdateLighting Management
CPatch * _ULNearPrec
CPatch * _ULNearNext

Static Private Attributes

uint32 _Version = 7
 Stream version of the class. More...

CBezierPatch CachePatch
const CPatch * LastPatch = NULL

Friends

class CTessFace
class CZone
class CLandscapeVegetableBlock


Detailed Description

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:

  • 0: AB.
  • 1: BC.
  • 2: CD.
  • 3: DA.
Author:
Lionel Berenguier , Nevrax France
Date:
2000

Definition at line 299 of file patch.h.


Member Enumeration Documentation

enum NL3D::CPatch::TFarVertType [private]
 

Enumeration values:
FVMasterBlock 
FVTessBlock 
FVTessBlockEdge 

Definition at line 922 of file patch.h.

Referenced by appendFarVertexToRenderList, and removeFarVertexFromRenderList.


Constructor & Destructor Documentation

NL3D::CPatch::CPatch  
 

Constructor.

Definition at line 57 of file patch.cpp.

References _BindZoneNeighbor, _CornerSmoothFlag, _DLMContext, _DLMContextRefCount, _ULNearNext, _ULNearPrec, Clipped, ExcludeFromRefineAll, Far0, Far1, MasterBlock, NoiseRotation, NumRenderableFaces, OldRenderClipped, OrderS, OrderT, RenderClipped, Son0, Son1, TessBlockRefCount, and Zone.

Referenced by bind, computeContinousVertex, computeDisplaceCornerSmooth, computeDisplaceEdgeSmooth, computeDisplaceRawOnNeighbor, computeNearBlockLightmap, computeNormalCornerSmooth, computeNormalEdgeSmooth, computeNormalOnNeighbor, computeTileLightmapPixelAroundCorner, and getNextNearUL.

NL3D::CPatch::~CPatch  
 

dtor.

Definition at line 102 of file patch.cpp.

References release.


Member Function Documentation

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.

Parameters:
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 497 of file patch.cpp.

References addPatchBlocksInBBoxRecurs, OrderS, OrderT, and unpackIntoCache.

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 507 of file patch.cpp.

References buildBBoxFromBezierPatch, NL_PATCH_BLOCK_MAX_QUAD, nlassert, OrderS, and OrderT.

Referenced by addPatchBlocksInBBox.

void NL3D::CPatch::addRefDLMContext   [private]
 

Add a ref count to the DLMContext, creating it if necessary.

Definition at line 1896 of file patch_lightmap.cpp.

References _DLMContext, _DLMContextRefCount, fillVBFarsDLMUvOnly, getLandscape, nlassert, RenderClipped, and Zone.

Referenced by appendTileMaterialToRenderList, and processDLMLight.

void NL3D::CPatch::addRefTessBlocks   [private]
 

Definition at line 594 of file patch.cpp.

References getLandscape, NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK, NL3D_PATCH_VEGETABLE_NUM_TESSBLOCK_PER_CLIPBLOCK_SHIFT, NL3D_TESSBLOCK_TILESIZE, nlassert, OrderS, OrderT, 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 1707 of file patch_lightmap.cpp.

References NL3D::bilinearColorAndAdd, getCurrentTileTLIColors, NL_LUMEL_BY_TILE, stride, x, and y.

Referenced by computeTileLightmapEdge.

void NL3D::CPatch::addTileLightmapPixelWithTLI uint    ts,
uint    tt,
uint    s,
uint    t,
NLMISC::CRGBA   dest
[private]
 

Definition at line 1742 of file patch_lightmap.cpp.

References NL3D::bilinearColorAndAdd, getCurrentTileTLIColors, s, and t.

Referenced by computeTileLightmapPixel.

void NL3D::CPatch::addTileLightmapWithTLI uint    ts,
uint    tt,
NLMISC::CRGBA   dest,
uint    stride
[private]
 

Definition at line 1688 of file patch_lightmap.cpp.

References NL3D::bilinearColorAndAdd, getCurrentTileTLIColors, NL_LUMEL_BY_TILE, stride, x, and y.

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 328 of file patch.cpp.

References computeVertex, nlassert, OrderS, and OrderT.

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.

Parameters:
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 263 of file patch.cpp.

References addTrianglesInBBoxRecurs, OrderS, OrderT, and unpackIntoCache.

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 273 of file patch.cpp.

References addTileTrianglesInBBox, buildBBoxFromBezierPatch, and nlassert.

Referenced by addTrianglesInBBox.

void NL3D::CPatch::allocateVBAndFaceVector  
 

Definition at line 881 of file patch_render.cpp.

References createFaceVectorFar0OrTile, createFaceVectorFar1, and updateVBAlloc.

Referenced by preRender, and updateClipPatchVB.

void NL3D::CPatch::allocateVBAndFaceVectorFar1Only  
 

Definition at line 909 of file patch_render.cpp.

References createFaceVectorFar1, Far1, MasterBlock, TessBlocks, and updateFar1VBAlloc.

Referenced by preRender.

void NL3D::CPatch::appendFaceToRenderList CTessFace   face [private]
 

Definition at line 783 of file patch.cpp.

References addRefTessBlocks, appendFaceToTileRenderList, dirtTessBlockFaceVector, getNumTessBlock, MasterBlock, NumRenderableFaces, TessBlockLimitLevel, and TessBlocks.

Referenced by makeRoots.

void NL3D::CPatch::appendFaceToTileRenderList CTessFace   face [private]
 

Definition at line 867 of file patch.cpp.

References dirtTessBlockFaceVector, getNumTessBlock, NL3D_MAX_TILE_FACE, nlassert, and TessBlocks.

Referenced by appendFaceToRenderList.

void NL3D::CPatch::appendFarVertexToRenderList CTessFarVertex   fv [private]
 

Definition at line 995 of file patch.cpp.

References addRefTessBlocks, FVMasterBlock, FVTessBlockEdge, getNumTessBlock, MasterBlock, TessBlocks, TFarVertType, and type.

Referenced by makeRoots.

void NL3D::CPatch::appendNearVertexToRenderList CTileMaterial   tileMat,
CTessNearVertex   nv
[private]
 

Definition at line 1041 of file patch.cpp.

References addRefTessBlocks, computeTbTm, nlassert, and TessBlocks.

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 2153 of file patch.cpp.

References nlassert, Son0, and Son1.

void NL3D::CPatch::appendTileLightInfluences const CUV &    uv,
std::vector< CPointLightInfluence > &    pointLightList
const
 

Append lights under the position to pointLightList.

Definition at line 1496 of file patch_lightmap.cpp.

References NLMISC::clamp, getZone, nlassert, NL3D::OptFastFloor, OrderS, OrderT, TileLightInfluences, w, x, and y.

Referenced by generateTileVegetable.

void NL3D::CPatch::appendTileMaterialToRenderList CTileMaterial   tm [private]
 

Definition at line 932 of file patch.cpp.

References addRefDLMContext, addRefTessBlocks, computeTbTm, createVegetableBlock, getLandscape, MasterBlock, nlassert, and TessBlocks.

void NL3D::CPatch::averageTesselationVertices  
 

This is especially for Pacs.

see CLandscape desc.

Definition at line 1469 of file patch.cpp.

References BaseVertices, computeVertex, nlassert, Son0, and Son1.

void NL3D::CPatch::beginDLMLighting  
 

begin Dynamic light Process.

reset texture To Black (if needed) Called by CLandscape. _DLMContext must exist

Definition at line 1951 of file patch_lightmap.cpp.

References _DLMContext, nlassert, and RenderClipped.

void NL3D::CPatch::bind CBindInfo    Edges[4],
bool    rebind
 

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 1824 of file patch.cpp.

References _BindZoneNeighbor, BaseVertices, bind, changeEdgeNeighbor, checkFillVertexVBFar, computeVertex, CPatch, CTessFace, getBindNeighbor, getRootFaceForEdge, nlassert, OrderS, OrderT, Son0, and Son1.

Referenced by bind.

CAABBox NL3D::CPatch::buildBBox   const
 

Build the bbox of the patch, according to ctrl points, and displacement map max value.

Definition at line 250 of file patch.cpp.

References buildBBoxFromBezierPatch, and unpackIntoCache.

Referenced by 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 214 of file patch.cpp.

References NL3D_NOISE_MAX.

Referenced by addPatchBlocksInBBoxRecurs, addTrianglesInBBoxRecurs, and buildBBox.

void NL3D::CPatch::changeEdgeNeighbor sint    edge,
CTessFace   to
[private]
 

Definition at line 1782 of file patch.cpp.

References nlassert, OrderS, OrderT, Son0, and Son1.

Referenced by bind.

void NL3D::CPatch::checkCreateVertexVBFar CTessFarVertex   pVert [private]
 

Definition at line 1545 of file patch_render.cpp.

References Far0, Far1, nlassert, and RenderClipped.

void NL3D::CPatch::checkCreateVertexVBNear CTessNearVertex   pVert [private]
 

Definition at line 1586 of file patch_render.cpp.

References Far0, nlassert, and RenderClipped.

void NL3D::CPatch::checkDeleteVertexVBFar CTessFarVertex   pVert [private]
 

Definition at line 1614 of file patch_render.cpp.

References Far0, Far1, nlassert, and RenderClipped.

void NL3D::CPatch::checkDeleteVertexVBNear CTessNearVertex   pVert [private]
 

Definition at line 1632 of file patch_render.cpp.

References Far0, nlassert, and RenderClipped.

void NL3D::CPatch::checkFillVertexVBFar CTessFarVertex   pVert [private]
 

Definition at line 1565 of file patch_render.cpp.

References Far0, Far1, fillFar0VertexVB, fillFar1VertexVB, nlassert, and RenderClipped.

Referenced by bind.

void NL3D::CPatch::checkFillVertexVBNear CTessNearVertex   pVert [private]
 

Definition at line 1599 of file patch_render.cpp.

References Far0, fillTileVertexVB, nlassert, and RenderClipped.

void NL3D::CPatch::clearTessBlocks   [private]
 

Definition at line 652 of file patch.cpp.

References NLMISC::contReset, deleteAllVegetableIgs, getLandscape, TessBlockRefCount, TessBlocks, and VegetableClipBlocks.

Referenced by decRefTessBlocks, makeRoots, and release.

void NL3D::CPatch::clip const std::vector< CPlane > &    pyramid
 

Classify this patch.

Definition at line 1520 of file patch.cpp.

References BSphere, Clipped, and RenderClipped.

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.

Parameters:
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 1238 of file patch.cpp.

References _ULNearNext, _ULNearPrec, BaseVertices, BSphere, buildBBox, computeDefaultErrorSize, ErrorSize, NLMISC::getPowerOf2, makeRoots, MasterBlock, min, nlassert, OrderS, OrderT, Pass0, Pass1, PatchId, SquareLimitLevel, TessBlockLimitLevel, TileLimitLevel, z, and Zone.

CVector NL3D::CPatch::computeContinousVertex float    s,
float    t
const
 

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 1327 of file patch.cpp.

References BaseVertices, computeVertex, CPatch, getBindNeighbor, getOrderS, getOrderT, nlassert, nlstop, s, t, and Zone.

void NL3D::CPatch::computeCurrentTLILightmap 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 1754 of file patch_lightmap.cpp.

References OrderS, OrderT, x, and y.

void NL3D::CPatch::computeDefaultErrorSize   [private]
 

Definition at line 199 of file patch.cpp.

References ErrorSize, and unpackIntoCache.

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::computeDisplaceBilinear, computeDisplaceInteriorSmooth, computeDisplaceRaw, CPatch, getBindNeighbor, nlassert, nlstop, NL3D::noiseFloor, OrderS, OrderT, s, and t.

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::computeDisplaceBilinear, computeDisplaceInteriorSmooth, computeDisplaceRaw, CPatch, getBindNeighbor, nlassert, nlstop, NL3D::noiseFloor, OrderS, OrderT, s, and t.

Referenced by computeNoise.

float NL3D::CPatch::computeDisplaceInteriorSmooth float    s,
float    t
const [private]
 

compute the smoothed displacement for s,t ([0;OrderS], [0;OrderT]).

Definition at line 256 of file patch_noise.cpp.

References NL3D::computeDisplaceBilinear, computeDisplaceRawCoordinates, computeDisplaceRawInteger, s, and t.

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, computeDisplaceRawInteger, s, and t.

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, s, t, and v.

Referenced by computeDisplaceInteriorSmooth, and computeDisplaceRaw.

float NL3D::CPatch::computeDisplaceRawInteger sint    ts,
sint    tt,
sint    ms,
sint    mt
const [private]
 

Definition at line 136 of file patch_noise.cpp.

References NLMISC::clamp, getZone, NL3D_NOISE_MAX, NL3D_TILE_NOISE_MAP_SIZE, OrderS, OrderT, and Tiles.

Referenced by computeDisplaceInteriorSmooth, and computeDisplaceRaw.

float NL3D::CPatch::computeDisplaceRawOnNeighbor float    sTile,
float    tTile,
float    s,
float    t
const [private]
 

usefull 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 computeDisplaceRaw, CPatch, getBindNeighbor, OrderS, OrderT, s, and t.

void NL3D::CPatch::computeGeomorphAlphaFar1VertexListVB CTessList< CTessFarVertex > &    vertList [private]
 

Definition at line 1365 of file patch_render.cpp.

References NLMISC::clamp, OOTransitionSqrDelta, and TransitionSqrMin.

Referenced by computeSoftwareGeomorphAndAlpha.

void NL3D::CPatch::computeGeomorphFar0VertexListVB CTessList< CTessFarVertex > &    vertList [private]
 

Definition at line 1347 of file patch_render.cpp.

Referenced by computeSoftwareGeomorphAndAlpha.

void NL3D::CPatch::computeGeomorphTileVertexListVB CTessList< CTessNearVertex > &    vertList [private]
 

Definition at line 1395 of file patch_render.cpp.

Referenced by computeSoftwareGeomorphAndAlpha.

void NL3D::CPatch::computeGeomorphVertexList CTessList< CTessFarVertex > &    vertList [private]
 

Definition at line 1334 of file patch_render.cpp.

Referenced by computeSoftwareGeomorphAndAlpha.

void NL3D::CPatch::computeNearBlockLightmap uint    ts,
uint    tt,
NLMISC::CRGBA   lightText
[private]
 

Definition at line 817 of file patch_lightmap.cpp.

References computeTileLightmap, computeTileLightmapEdge, computeTileLightmapPixel, CPatch, getBindNeighbor, getCornerSmoothFlag, getSmoothFlag, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, NL_TILE_LIGHTMAP_SIZE, nlassert, OrderS, OrderT, src, stride, and v.

Referenced by getTileLightMap, and updateTessBlockLighting.

void NL3D::CPatch::computeNewFar sint   newFar0,
sint   newFar1
[private]
 

Definition at line 54 of file patch_render.cpp.

References BSphere, Far0, Far0UBias, Far0UScale, Far0VBias, Far0VScale, Far1, Far1UBias, Far1UScale, Far1VBias, Far1VScale, Flags, NL_PATCH_FAR0_ROTATED, NL_PATCH_FAR1_ROTATED, nlassert, nlstop, OOTransitionSqrDelta, Pass0, Pass1, r, NLMISC::sqr, TransitionSqrMin, and Zone.

Referenced by preRender, and updateTextureFarOnly.

void NL3D::CPatch::computeNoise float    s,
float    t,
CVector &    displace
const [private]
 

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, OrderS, OrderT, s, t, 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 computeNormalEdgeSmooth, CPatch, getBindNeighbor, getCornerSmoothFlag, getOrderS, getOrderT, nlassert, nlstop, NL3D::noiseCeilF, NL3D::noiseFloorF, s, t, and unpackIntoCache.

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 CPatch, getBindNeighbor, getOrderS, getOrderT, getSmoothFlag, nlassert, nlstop, NL3D::noiseCeilF, NL3D::noiseFloorF, s, t, and unpackIntoCache.

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 CPatch, getBindNeighbor, getOrderS, getOrderT, OrderS, OrderT, s, t, and unpackIntoCache.

void NL3D::CPatch::computeSoftwareGeomorphAndAlpha  
 

Definition at line 1414 of file patch_render.cpp.

References computeGeomorphAlphaFar1VertexListVB, computeGeomorphFar0VertexListVB, computeGeomorphTileVertexListVB, computeGeomorphVertexList, Far0, Far1, MasterBlock, and TessBlocks.

void NL3D::CPatch::computeTbTm uint   numtb,
uint   numtm,
uint    ts,
uint    tt
[private]
 

Definition at line 919 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 703 of file patch_lightmap.cpp.

References addTileLightmapWithTLI, computeTileLightmapAutomatic, computeTileLightmapPrecomputed, getLandscape, modulateTileLightmapWithTileColors, and stride.

Referenced by computeNearBlockLightmap.

void NL3D::CPatch::computeTileLightmapAutomatic uint    ts,
uint    tt,
NLMISC::CRGBA   dest,
uint    stride
[private]
 

Definition at line 510 of file patch_lightmap.cpp.

References computeTileLightmapPixelAutomatic, NL_LUMEL_BY_TILE, stride, x, and y.

Referenced by computeTileLightmap.

void NL3D::CPatch::computeTileLightmapEdge uint    ts,
uint    tt,
uint    edge,
NLMISC::CRGBA   dest,
uint    stride,
bool    inverse
[private]
 

Definition at line 718 of file patch_lightmap.cpp.

References addTileLightmapEdgeWithTLI, computeTileLightmapEdgeAutomatic, computeTileLightmapEdgePrecomputed, getLandscape, modulateTileLightmapEdgeWithTileColors, and stride.

Referenced by computeNearBlockLightmap.

void NL3D::CPatch::computeTileLightmapEdgeAutomatic uint    ts,
uint    tt,
uint    edge,
NLMISC::CRGBA   dest,
uint    stride,
bool    inverse
[private]
 

Definition at line 524 of file patch_lightmap.cpp.

References computeTileLightmapPixelAutomatic, NL_LUMEL_BY_TILE, stride, x, and y.

Referenced by computeTileLightmapEdge.

void NL3D::CPatch::computeTileLightmapEdgePrecomputed uint    ts,
uint    tt,
uint    edge,
NLMISC::CRGBA   dest,
uint    stride,
bool    inverse
[private]
 

Definition at line 657 of file patch_lightmap.cpp.

References CompressedLumels, getLandscape, NL3D::getUnpackLumelBlock, NL3D::NL3DDeltaLumel, NL3D::NL3DPixelStartLumel, NL_BLOCK_LUMEL_COMPRESSED_SIZE, OrderS, src, stride, and x.

Referenced by computeTileLightmapEdge.

void NL3D::CPatch::computeTileLightmapPixel uint    ts,
uint    tt,
uint    s,
uint    t,
NLMISC::CRGBA   dest
[private]
 

Definition at line 735 of file patch_lightmap.cpp.

References addTileLightmapPixelWithTLI, computeTileLightmapPixelAutomatic, computeTileLightmapPixelPrecomputed, getLandscape, modulateTileLightmapPixelWithTileColors, s, and t.

Referenced by computeNearBlockLightmap, and computeTileLightmapPixelAroundCorner.

void NL3D::CPatch::computeTileLightmapPixelAroundCorner const NLMISC::CVector2f   stIn,
NLMISC::CRGBA   dest,
bool    lookAround
[private]
 

Definition at line 752 of file patch_lightmap.cpp.

References computeTileLightmapPixel, CPatch, getBindNeighbor, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, OrderS, OrderT, and v.

void NL3D::CPatch::computeTileLightmapPixelAutomatic uint    ts,
uint    tt,
uint    s,
uint    t,
NLMISC::CRGBA   dest
[private]
 

Definition at line 554 of file patch_lightmap.cpp.

References NLMISC::clamp, computeVertex, getLandscape, NL_LUMEL_BY_TILE, OrderS, OrderT, s, t, and v.

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 691 of file patch_lightmap.cpp.

References CompressedLumels, getLandscape, NL3D::getUnpackLumelBlock, NL_BLOCK_LUMEL_COMPRESSED_SIZE, OrderS, s, and t.

Referenced by computeTileLightmapPixel.

void NL3D::CPatch::computeTileLightmapPrecomputed uint    ts,
uint    tt,
NLMISC::CRGBA   dest,
uint    stride
[private]
 

Definition at line 631 of file patch_lightmap.cpp.

References CompressedLumels, getLandscape, NL_BLOCK_LUMEL_COMPRESSED_SIZE, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, OrderS, stride, unpackLumelBlock, x, and y.

Referenced by computeTileLightmap.

CVector NL3D::CPatch::computeVertex float    s,
float    t
const
 

Compute a vertex.

Compute a vertex according to:

  • s,t
  • patch control points uncompressed with zone Bias/Scale.
Patch UV geometric correction.
  • Patch noise (and noise of Patch neighbor).

Definition at line 1302 of file patch.cpp.

References computeNoise, getLandscape, s, t, and unpackIntoCache.

Referenced by addTileTrianglesInBBox, averageTesselationVertices, bind, computeContinousVertex, computeTileLightmapPixelAutomatic, computeVertexButCorner, makeRoots, and refreshTesselationGeometry.

CVector NL3D::CPatch::computeVertexButCorner float    s,
float    t,
bool &    onCorner
const [private]
 

Used by computeContinousVertex().

Definition at line 1420 of file patch.cpp.

References BaseVertices, computeVertex, nlassert, nlstop, s, t, and Zone.

void NL3D::CPatch::copyTileFlagsFromPatch const CPatch *    src
 

Set this patch flags from an other one.

The patchs must match

Definition at line 2222 of file patch.cpp.

References nlassert, OrderS, OrderT, src, and Tiles.

CRGBA NL3D::CPatch::CPatch::getCurrentTLIColor uint    x,
uint    y
const [private]
 

void NL3D::CPatch::createFaceVectorFar0OrTile   [private]
 

Definition at line 699 of file patch_render.cpp.

References Far0, getLandscape, MasterBlock, and TessBlocks.

Referenced by allocateVBAndFaceVector.

void NL3D::CPatch::createFaceVectorFar1   [private]
 

Definition at line 677 of file patch_render.cpp.

References Far1, getLandscape, MasterBlock, and TessBlocks.

Referenced by allocateVBAndFaceVector, and allocateVBAndFaceVectorFar1Only.

void NL3D::CPatch::createVegetableBlock uint    numTb,
uint    ts,
uint    tt
[private]
 

Create / init the vegetableBlock in the corresponding TessBlock. TessBlocks must exist.

Definition at line 293 of file patch_vegetable.cpp.

References CLandscapeVegetableBlock, getLandscape, 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 950 of file patch_render.cpp.

References debugAllocationMarkIndicesFarList, debugAllocationMarkIndicesNearList, MasterBlock, and TessBlocks.

void NL3D::CPatch::debugAllocationMarkIndicesFarList CTessList< CTessFarVertex > &    vertList,
uint    marker
[private]
 

Definition at line 929 of file patch_render.cpp.

Referenced by debugAllocationMarkIndices.

void NL3D::CPatch::debugAllocationMarkIndicesNearList CTessList< CTessNearVertex > &    vertList,
uint    marker
[private]
 

Definition at line 940 of file patch_render.cpp.

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 1923 of file patch_lightmap.cpp.

References _DLMContext, _DLMContextRefCount, fillVBFarsDLMUvOnly, nlassert, RenderClipped, and Zone.

Referenced by endDLMLighting, and removeTileMaterialFromRenderList.

void NL3D::CPatch::decRefTessBlocks   [private]
 

Definition at line 641 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 281 of file patch_vegetable.cpp.

References releaseVegetableBlock, and TessBlocks.

Referenced by clearTessBlocks.

void NL3D::CPatch::deleteFaceVectorFar0OrTile   [private]
 

Definition at line 719 of file patch_render.cpp.

References Far0, getLandscape, MasterBlock, and TessBlocks.

Referenced by deleteVBAndFaceVector.

void NL3D::CPatch::deleteFaceVectorFar1   [private]
 

Definition at line 688 of file patch_render.cpp.

References Far1, getLandscape, MasterBlock, and TessBlocks.

Referenced by deleteVBAndFaceVector, and deleteVBAndFaceVectorFar1Only.

void NL3D::CPatch::deleteTileUvs  
 

Definition at line 2119 of file patch.cpp.

References Son0, and Son1.

void NL3D::CPatch::deleteVBAndFaceVector  
 

Definition at line 873 of file patch_render.cpp.

References deleteFaceVectorFar0OrTile, deleteFaceVectorFar1, and updateVBAlloc.

Referenced by preRender, release, and updateClipPatchVB.

void NL3D::CPatch::deleteVBAndFaceVectorFar1Only  
 

Definition at line 890 of file patch_render.cpp.

References deleteFaceVectorFar1, Far1, MasterBlock, TessBlocks, and updateFar1VBAlloc.

Referenced by preRender.

void NL3D::CPatch::dirtTessBlockFaceVector CTessBlock   block [private]
 

Definition at line 766 of file patch.cpp.

References getLandscape, and RenderClipped.

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 1981 of file patch_lightmap.cpp.

References _DLMContext, decRefDLMContext, and nlassert.

uint NL3D::CPatch::evalLumelBlock const uint8   original,
const uint8   unCompressed,
uint    width,
uint    height
[private]
 

Eval an uncompressed 4x4 block against the original.

See also:
packShadowMap(), unpackShadowMap()

Definition at line 244 of file patch_lightmap.cpp.

References height, v, and width.

Referenced by packShadowMap.

void NL3D::CPatch::extendTessBlockWithEndPos CTessFace   face [private]
 

Definition at line 749 of file patch.cpp.

References getNumTessBlock, TessBlockLimitLevel, and TessBlocks.

void NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB CTessList< CTessFarVertex > &    vertList
 

Definition at line 1652 of file patch_render.cpp.

References _DLMContext, and nlassert.

Referenced by fillVBFarsDLMUvOnly.

void NL3D::CPatch::fillFar0VertexListVB CTessList< CTessFarVertex > &    vertList [private]
 

Definition at line 1197 of file patch_render.cpp.

References fillFar0VertexVB.

Referenced by fillVB, fillVBFar0Only, and preRender.

void NL3D::CPatch::fillFar0VertexVB CTessFarVertex   pVert [inline, private]
 

Definition at line 982 of file patch_render.cpp.

References _DLMContext, Far0UBias, Far0UScale, Far0VBias, Far0VScale, Flags, NL_PATCH_FAR0_ROTATED, and nlassert.

Referenced by checkFillVertexVBFar, and fillFar0VertexListVB.

void NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB CTessList< CTessFarVertex > &    vertList
 

Definition at line 1707 of file patch_render.cpp.

References _DLMContext, and nlassert.

Referenced by fillVBFarsDLMUvOnly.

void NL3D::CPatch::fillFar1VertexListVB CTessList< CTessFarVertex > &    vertList [private]
 

Definition at line 1209 of file patch_render.cpp.

References fillFar1VertexVB.

Referenced by fillVB, fillVBFar1Only, and preRender.

void NL3D::CPatch::fillFar1VertexVB CTessFarVertex   pVert [inline, private]
 

Definition at line 1058 of file patch_render.cpp.

References _DLMContext, Far1UBias, Far1UScale, Far1VBias, Far1VScale, Flags, NL_PATCH_FAR1_ROTATED, nlassert, OOTransitionSqrDelta, and TransitionSqrMin.

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 453 of file patch.cpp.

References NL_PATCH_BLOCK_MAX_QUAD, NL_PATCH_BLOCK_MAX_VERTEX, and nlassert.

void NL3D::CPatch::fillTileVertexListVB CTessList< CTessNearVertex > &    vertList [private]
 

Definition at line 1221 of file patch_render.cpp.

References fillTileVertexVB.

Referenced by fillVB, and preRender.

void NL3D::CPatch::fillTileVertexVB CTessNearVertex   pVert [inline, private]
 

Definition at line 1145 of file patch_render.cpp.

References nlassert.

Referenced by checkFillVertexVBNear, and fillTileVertexListVB.

void NL3D::CPatch::fillVB  
 

Definition at line 1234 of file patch_render.cpp.

References Far0, Far1, fillFar0VertexListVB, fillFar1VertexListVB, fillTileVertexListVB, MasterBlock, and TessBlocks.

Referenced by fillVBIfVisible, preRender, and updateClipPatchVB.

void NL3D::CPatch::fillVBFar0Only  
 

Definition at line 1292 of file patch_render.cpp.

References Far0, fillFar0VertexListVB, MasterBlock, and TessBlocks.

Referenced by preRender.

void NL3D::CPatch::fillVBFar1Only  
 

Definition at line 1310 of file patch_render.cpp.

References Far1, fillFar1VertexListVB, MasterBlock, and TessBlocks.

Referenced by preRender.

void NL3D::CPatch::fillVBFarsDLMUvOnly  
 

Definition at line 1763 of file patch_render.cpp.

References Far0, Far1, fillFar0DLMUvOnlyVertexListVB, fillFar1DLMUvOnlyVertexListVB, MasterBlock, and TessBlocks.

Referenced by addRefDLMContext, and decRefDLMContext.

void NL3D::CPatch::fillVBIfVisible  
 

Definition at line 1284 of file patch_render.cpp.

References fillVB, and RenderClipped.

void NL3D::CPatch::forceClip   [inline]
 

Classify this patch as Clipped.

Definition at line 445 of file patch.h.

References Clipped.

void NL3D::CPatch::forceMergeAtTileLevel  
 

For changing TileMaxSubdivision. force tesselation to be under tile.

Definition at line 1999 of file patch.cpp.

References nlassert, Son0, and Son1.

void NL3D::CPatch::forceNoClip   [inline]
 

Classify this patch as UnClipped.

Definition at line 443 of file patch.h.

References Clipped.

void NL3D::CPatch::forceNoRenderClip   [inline]
 

Classify this patch as Render UnClipped.

Definition at line 447 of file patch.h.

References RenderClipped.

void NL3D::CPatch::forceRenderClip   [inline]
 

Classify this patch as RenderClipped.

Definition at line 449 of file patch.h.

References RenderClipped.

void NL3D::CPatch::generateTileVegetable CVegetableInstanceGroup   vegetIg,
uint    distType,
uint    ts,
uint    tt,
CLandscapeVegetableBlockCreateContext   vbCreateCtx
[private]
 

Definition at line 50 of file patch_vegetable.cpp.

References _DLMContext, appendTileLightInfluences, NLMISC::clamp, NLMISC::contReset, getLandscape, getTileLumelmapPrecomputed, min, NL3D_PATCH_TILE_AREA, NL3D_VEGETABLE_BLOCK_ELTDIST, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, nlassert, NL3D::OptFastFloor, OrderS, OrderT, size, Tiles, unpackIntoCache, x, and y.

void NL3D::CPatch::getBindNeighbor uint    edge,
CBindInfo   neighborEdge
const
 

return neighborhood information.

Definition at line 2190 of file patch.cpp.

References _BindZoneNeighbor, getZone, nlassert, and PatchId.

Referenced by bind, computeContinousVertex, computeDisplaceCornerSmooth, computeDisplaceEdgeSmooth, computeDisplaceRawOnNeighbor, computeNearBlockLightmap, computeNormalCornerSmooth, computeNormalEdgeSmooth, computeNormalOnNeighbor, and computeTileLightmapPixelAroundCorner.

const CBSphere& NL3D::CPatch::getBSphere   const [inline]
 

Return the bounding sphere. Work only when zone compiled.

Definition at line 403 of file patch.h.

References BSphere.

bool NL3D::CPatch::getCornerSmoothFlag uint    corner const
 

Definition at line 960 of file patch_noise.cpp.

References _CornerSmoothFlag, and nlassert.

Referenced by computeNearBlockLightmap, and computeNormalCornerSmooth.

const CTessVertex* NL3D::CPatch::getCornerVertex uint    corner [inline]
 

Definition at line 660 of file patch.h.

References BaseVertices.

void NL3D::CPatch::getCurrentTileTLIColors uint    ts,
uint    tt,
NLMISC::CRGBA    corners[4]
[private]
 

Definition at line 1604 of file patch_lightmap.cpp.

References getZone, x, and y.

Referenced by addTileLightmapEdgeWithTLI, addTileLightmapPixelWithTLI, and addTileLightmapWithTLI.

float NL3D::CPatch::getErrorSize   const [inline]
 

Definition at line 392 of file patch.h.

References ErrorSize.

sint NL3D::CPatch::getFar0   const [inline]
 

Definition at line 393 of file patch.h.

References Far0.

sint NL3D::CPatch::getFar1   const [inline]
 

Definition at line 394 of file patch.h.

References Far1.

CLandscape * NL3D::CPatch::getLandscape   const
 

Get the landscape in which is placed this patch.

Definition at line 2163 of file patch.cpp.

References Zone.

Referenced by addRefDLMContext, addRefTessBlocks, appendTileMaterialToRenderList, clearTessBlocks, computeTileLightmap, computeTileLightmapEdge, computeTileLightmapEdgePrecomputed, computeTileLightmapPixel, computeTileLightmapPixelAutomatic, computeTileLightmapPixelPrecomputed, computeTileLightmapPrecomputed, computeVertex, createFaceVectorFar0OrTile, createFaceVectorFar1, createVegetableBlock, deleteFaceVectorFar0OrTile, deleteFaceVectorFar1, dirtTessBlockFaceVector, generateTileVegetable, makeRoots, recreateAllVegetableIgs, recreateTessBlockFaceVector, release, and releaseVegetableBlock.

uint8 NL3D::CPatch::getLumel const CUV &    uv const
 

Get the lumel under the position.

Definition at line 1452 of file patch_lightmap.cpp.

References NLMISC::clamp, getTileLumelmapPixelPrecomputed, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, NL3D::OptFastFloor, OrderS, OrderT, and w.

CPatch* NL3D::CPatch::getNextNearUL   const [inline]
 

For lighting update, get Next (CiruclarList). If ==this, then list is empty.

Definition at line 755 of file patch.h.

References _ULNearNext, and CPatch.

uint NL3D::CPatch::getNumNearTessBlocks   const [inline]
 

get the number of Near TessBlocks. Actually OrderS/2*OrderT/2.

Definition at line 758 of file patch.h.

References TessBlocks.

void NL3D::CPatch::getNumTessBlock CParamCoord    pc,
TFarVertType   type,
uint   numtb
[private]
 

Definition at line 721 of file patch.cpp.

References FVMasterBlock, FVTessBlock, FVTessBlockEdge, OrderS, OrderT, and type.

uint NL3D::CPatch::getNumTessBlock CTessFace   face [private]
 

Definition at line 705 of file patch.cpp.

References OrderS, and OrderT.

Referenced by appendFaceToRenderList, appendFaceToTileRenderList, appendFarVertexToRenderList, extendTessBlockWithEndPos, removeFaceFromRenderList, removeFaceFromTileRenderList, and removeFarVertexFromRenderList.

uint8 NL3D::CPatch::getOrderForEdge sint8    edge const
 

Definition at line 2173 of file patch.cpp.

References OrderS, and OrderT.

uint8 NL3D::CPatch::getOrderS   const [inline]
 

Definition at line 389 of file patch.h.

References OrderS.

Referenced by computeContinousVertex, computeNormalCornerSmooth, computeNormalEdgeSmooth, and computeNormalOnNeighbor.

uint8 NL3D::CPatch::getOrderT   const [inline]
 

Definition at line 390 of file patch.h.

References OrderT.

Referenced by computeContinousVertex, computeNormalCornerSmooth, computeNormalEdgeSmooth, and computeNormalOnNeighbor.

uint16 NL3D::CPatch::getPatchId   const [inline]
 

Definition at line 395 of file patch.h.

References PatchId.

CTessFace * NL3D::CPatch::getRootFaceForEdge sint    edge const [private]
 

Definition at line 1728 of file patch.cpp.

References nlassert, OrderS, OrderT, Son0, and Son1.

Referenced by bind.

CTessVertex * NL3D::CPatch::getRootVertexForEdge sint    edge const [private]
 

Definition at line 1750 of file patch.cpp.

References nlassert, OrderS, OrderT, Son0, and Son1.

bool NL3D::CPatch::getSmoothFlag uint    edge const [inline]
 

Get the smooth flag for the n-th edge.

Return false if this edge must by smoothed, true else.

Definition at line 580 of file patch.h.

References Flags, and NL_PATCH_SMOOTH_FLAG_SHIFT.

Referenced by computeNearBlockLightmap, and computeNormalEdgeSmooth.

CVector NL3D::CPatch::getTesselatedPos CUV    uv const
 

From the current tesselation of this patch, and a UV in this patch, return tesselated position.

Definition at line 572 of file patch.cpp.

References NLMISC::clamp, Son0, and Son1.

CTileElement * NL3D::CPatch::getTileElement const CUV &    uv
 

Get the lumel under the position.

Definition at line 2242 of file patch.cpp.

References NLMISC::clamp, NL3D::OptFastFloor, OrderS, OrderT, and Tiles.

void NL3D::CPatch::getTileLightMap uint    ts,
uint    tt,
CPatchRdrPass *&    rdrpass
[private]
 

Definition at line 1144 of file patch_lightmap.cpp.

References computeNearBlockLightmap, computeTbTm, NL_TILE_LIGHTMAP_SIZE, nlassert, TessBlocks, and Zone.

void NL3D::CPatch::getTileLightMapUvInfo uint    ts,
uint    tt,
CVector &    uvScaleBias
[private]
 

Definition at line 1178 of file patch_lightmap.cpp.

References computeTbTm, nlassert, TessBlocks, and Zone.

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 623 of file patch_lightmap.cpp.

References CompressedLumels, NL3D::getUnpackLumelBlock, NL_BLOCK_LUMEL_COMPRESSED_SIZE, OrderS, s, and t.

Referenced by getLumel.

void NL3D::CPatch::getTileLumelmapPrecomputed uint    ts,
uint    tt,
uint8   dest,
uint    stride
[private]
 

Definition at line 603 of file patch_lightmap.cpp.

References CompressedLumels, NL_BLOCK_LUMEL_COMPRESSED_SIZE, NL_LUMEL_BY_TILE, NL_LUMEL_BY_TILE_SHIFT, OrderS, stride, unpackLumelBlock, x, and y.

Referenced by generateTileVegetable.

uint NL3D::CPatch::getTileMaterialRefCount   const [inline]
 

Get number of TileMaterial created in this Patch.

Definition at line 793 of file patch.h.

References MasterBlock.

CPatchRdrPass * NL3D::CPatch::getTileRenderPass sint    tileId,
sint    pass
[private]
 

Definition at line 2017 of file patch.cpp.

References NL3D_TILE_PASS_ADD, NL3D_TILE_PASS_RGB0, NL3D_TILE_PASS_RGB1, NL3D_TILE_PASS_RGB2, nlassert, Tiles, and Zone.

void NL3D::CPatch::getTileTileColors uint    ts,
uint    tt,
NLMISC::CRGBA    corners[4]
[private]
 

Definition at line 345 of file patch_lightmap.cpp.

References OrderS, 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 2057 of file patch.cpp.

References alpha, NL3D_TILE_PASS_ADD, NL3D_TILE_PASS_RGB0, NL3D_TILE_PASS_RGB1, NL3D_TILE_PASS_RGB2, nlassert, Tiles, type, and Zone.

CZone* NL3D::CPatch::getZone   const [inline]
 

Definition at line 388 of file patch.h.

References CZone, and Zone.

Referenced by appendTileLightInfluences, computeDisplaceRawInteger, getBindNeighbor, and getCurrentTileTLIColors.

bool NL3D::CPatch::isClipped   const [inline]
 

Definition at line 654 of file patch.h.

References Clipped.

bool NL3D::CPatch::isRenderClipped   const [inline]
 

Definition at line 656 of file patch.h.

References RenderClipped.

void NL3D::CPatch::linkBeforeNearUL CPatch *    patchNext
 

For lighting update, insert this before patchNext (CiruclarList). textNext must be !NULL.

Definition at line 1826 of file patch_lightmap.cpp.

References _ULNearNext, _ULNearPrec, and nlassert.

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 1811 of file patch.cpp.

References CTessFace, nlassert, Son0, and Son1.

void NL3D::CPatch::makeRoots   [private]
 

Definition at line 1079 of file patch.cpp.

References appendFaceToRenderList, appendFarVertexToRenderList, BaseFarVertices, BaseVertices, clearTessBlocks, computeVertex, ErrorSize, getLandscape, nlassert, OrderS, OrderT, RenderClipped, resetMasterBlock, Son0, and Son1.

Referenced by compile.

void NL3D::CPatch::modulateTileLightmapEdgeWithTileColors uint    ts,
uint    tt,
uint    edge,
NLMISC::CRGBA   dest,
uint    stride,
bool    inverse
[private]
 

Definition at line 461 of file patch_lightmap.cpp.

References NL3D::bilinearColorAndModulate, getTileTileColors, NL_LUMEL_BY_TILE, stride, x, and y.

Referenced by computeTileLightmapEdge.

void NL3D::CPatch::modulateTileLightmapPixelWithTileColors uint    ts,
uint    tt,
uint    s,
uint    t,
NLMISC::CRGBA   dest
[private]
 

Definition at line 497 of file patch_lightmap.cpp.

References NL3D::bilinearColorAndModulate, getTileTileColors, s, and t.

Referenced by computeTileLightmapPixel.

void NL3D::CPatch::modulateTileLightmapWithTileColors uint    ts,
uint    tt,
NLMISC::CRGBA   dest,
uint    stride
[private]
 

Definition at line 441 of file patch_lightmap.cpp.

References NL3D::bilinearColorAndModulate, getTileTileColors, NL_LUMEL_BY_TILE, stride, x, and y.

Referenced by computeTileLightmap.

void NL3D::CPatch::packLumelBlock uint8   dest,
const uint8   source,
uint8    alpha0,
uint8    alpha1
[private]
 

Pack a 4x4 lumel block.

See also:
packShadowMap(), unpackShadowMap()

Definition at line 261 of file patch_lightmap.cpp.

References NL3D::NL3DDecompressLumelFactor0Case0, NL3D::NL3DDecompressLumelFactor0Case1, NL3D::NL3DDecompressLumelFactor1Case0, NL3D::NL3DDecompressLumelFactor1Case1, and value.

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.

Parameters:
pShadow  is a pointer on the destination lumel buffer. Size must be (OrderS*4+1)*(OrderS*4+1).
See also:
unpackShadowMap(), resetCompressedLumels()

Definition at line 1220 of file patch_lightmap.cpp.

References CompressedLumels, evalLumelBlock, NL_BLOCK_LUMEL_COMPRESSED_SIZE, NL_LUMEL_BY_TILE, nlassert, OrderS, OrderT, packLumelBlock, unpackLumelBlock, and v.

void NL3D::CPatch::preRender  
 

preRender this patch. no-op if(RenderClipped). Build Max faces / pass etc...

Definition at line 253 of file patch_render.cpp.

References allocateVBAndFaceVector, allocateVBAndFaceVectorFar1Only, computeNewFar, deleteVBAndFaceVector, deleteVBAndFaceVectorFar1Only, Far0, Far1, fillFar0VertexListVB, fillFar1VertexListVB, fillTileVertexListVB, fillVB, fillVBFar0Only, fillVBFar1Only, NL3D_TESSBLOCK_TILESIZE, NumRenderableFaces, Pass0, Pass1, TessBlocks, updateFar0VBAlloc, updateFar1VBAlloc, and updateTileVBAlloc.

void NL3D::CPatch::processDLMLight CPatchDLMPointLight   pl
 

Process a Dynamic light, creating the DLMContext if necessary.

Increment RefCount. Called by CLandscape.

Definition at line 1967 of file patch_lightmap.cpp.

References _DLMContext, addRefDLMContext, and RenderClipped.

void NL3D::CPatch::recreateAllVegetableIgs  
 

Recreate any vegetable block (as possible) in this patch. (usefull for edition).

Definition at line 259 of file patch_vegetable.cpp.

References createVegetableBlock, getLandscape, OrderS, and TessBlocks.

void NL3D::CPatch::recreateTessBlockFaceVector CTessBlock   block
 

Definition at line 741 of file patch_render.cpp.

References Far0, Far1, getLandscape, MasterBlock, and RenderClipped.

void NL3D::CPatch::recreateTileUvs  
 

Definition at line 2127 of file patch.cpp.

References NL3D_MAX_TILE_FACE, NL3D_TESSBLOCK_TILESIZE, Son0, Son1, and TessBlocks.

void NL3D::CPatch::refineAll  
 

Refine this patch. Even if clipped. Refine all nodes.

Definition at line 1457 of file patch.cpp.

References nlassert, Son0, and Son1.

void NL3D::CPatch::refreshTesselationGeometry  
 

Definition at line 1495 of file patch.cpp.

References BaseVertices, computeVertex, nlassert, Son0, and Son1.

void NL3D::CPatch::release  
 

Un-compile a patch. Tesselation is deleted. if patch is not compiled, no - op.

Definition at line 108 of file patch.cpp.

References _DLMContext, _DLMContextRefCount, _ULNearNext, _ULNearPrec, clearTessBlocks, Clipped, deleteVBAndFaceVector, getLandscape, nlassert, OldRenderClipped, OrderS, OrderT, Pass0, Pass1, RenderClipped, resetMasterBlock, resetRenderFar, Son0, Son1, and Zone.

Referenced by ~CPatch.

void NL3D::CPatch::releaseTileLightMap uint    ts,
uint    tt
[private]
 

Definition at line 1200 of file patch_lightmap.cpp.

References computeTbTm, nlassert, TessBlocks, and Zone.

void NL3D::CPatch::releaseVegetableBlock uint    numTb [private]
 

release the vegetableBlock in the corresponding TessBlock. TessBlocks must exist.

Definition at line 325 of file patch_vegetable.cpp.

References getLandscape, and TessBlocks.

Referenced by deleteAllVegetableIgs, and removeTileMaterialFromRenderList.

void NL3D::CPatch::removeFaceFromRenderList CTessFace   face [private]
 

Definition at line 831 of file patch.cpp.

References decRefTessBlocks, dirtTessBlockFaceVector, getNumTessBlock, MasterBlock, nlassert, NumRenderableFaces, removeFaceFromTileRenderList, TessBlockLimitLevel, and TessBlocks.

void NL3D::CPatch::removeFaceFromTileRenderList CTessFace   face [private]
 

Definition at line 893 of file patch.cpp.

References dirtTessBlockFaceVector, getNumTessBlock, NL3D_MAX_TILE_FACE, nlassert, and TessBlocks.

Referenced by removeFaceFromRenderList.

void NL3D::CPatch::removeFarVertexFromRenderList CTessFarVertex   fv [private]
 

Definition at line 1017 of file patch.cpp.

References decRefTessBlocks, FVMasterBlock, FVTessBlockEdge, getNumTessBlock, MasterBlock, TessBlocks, TFarVertType, and type.

void NL3D::CPatch::removeNearVertexFromRenderList CTileMaterial   tileMat,
CTessNearVertex   nv
[private]
 

Definition at line 1054 of file patch.cpp.

References computeTbTm, decRefTessBlocks, nlassert, and TessBlocks.

void NL3D::CPatch::removeTileMaterialFromRenderList CTileMaterial   tm [private]
 

Definition at line 963 of file patch.cpp.

References computeTbTm, decRefDLMContext, decRefTessBlocks, MasterBlock, nlassert, releaseVegetableBlock, and TessBlocks.

void NL3D::CPatch::renderFar0  
 

Render this patch, if not clipped. Call PatchCurrentDriver->renderSimpleTriangles().

Definition at line 526 of file patch_render.cpp.

References MasterBlock, NL3D_PROFILE_LAND_ADD_FACE_VECTOR, nlassert, Pass0, NL3D::ProfNRdrFar0, RenderClipped, NL3D::renderFaceVector, t, TessBlocks, and Zone.

void NL3D::CPatch::renderFar1  
 

Definition at line 577 of file patch_render.cpp.

References MasterBlock, NL3D_PROFILE_LAND_ADD_FACE_VECTOR, nlassert, Pass1, NL3D::ProfNRdrFar1, RenderClipped, NL3D::renderFaceVector, t, TessBlocks, and Zone.

void NL3D::CPatch::resetCompressedLumels  
 

Rebuild the packed lumels without shadow.

Only the interpolated color will be used.

See also:
packShadowMap(), unpackShadowMap()

Definition at line 1337 of file patch_lightmap.cpp.

References CompressedLumels, NL_LUMEL_BY_TILE, nlassert, OrderS, and OrderT.

void NL3D::CPatch::resetMasterBlock   [private]
 

Definition at line 692 of file patch.cpp.

References MasterBlock, nlassert, NumRenderableFaces, and RenderClipped.

Referenced by makeRoots, and release.

void NL3D::CPatch::resetRenderFar  
 

Definition at line 1539 of file patch.cpp.

References Far0, Far1, Pass0, Pass1, 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 1482 of file patch_lightmap.cpp.

References OrderS, OrderT, and TileLightInfluences.

Referenced by serial.

void NL3D::CPatch::serial NLMISC::IStream   f
 

Definition at line 1560 of file patch.cpp.

References _CornerSmoothFlag, _Version, 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.

void NL3D::CPatch::setCornerSmoothFlag uint    corner,
bool    smooth
 

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.

void NL3D::CPatch::setSmoothFlag uint    edge,
bool    flag
[inline]
 

Set the smooth flag for the n-th edge.

flag is false if this edge must by smoothed, true else.

Definition at line 568 of file patch.h.

References Flags, and NL_PATCH_SMOOTH_FLAG_SHIFT.

void NL3D::CPatch::setupColorsFromTileFlags const NLMISC::CRGBA    colors[4]
 

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 2208 of file patch.cpp.

References index, min, s, and t.

void NL3D::CPatch::unbind  
 

unbind the patch from All neighbors.

neighbors patchs links are modified too. The tesselation is forcemerged.

Definition at line 1701 of file patch.cpp.

References _BindZoneNeighbor, nlassert, Son0, and Son1.

void NL3D::CPatch::unlinkNearUL  
 

For lighting update, unlink (CiruclarList).

Definition at line 1843 of file patch_lightmap.cpp.

References _ULNearNext, and _ULNearPrec.

void NL3D::CPatch::unpack CBezierPatch   p const
 

Definition at line 185 of file patch.cpp.

References Interiors, Tangents, Vertices, and Zone.

Referenced by unpackIntoCache.

CBezierPatch * NL3D::CPatch::unpackIntoCache   const
 

Definition at line 175 of file patch.cpp.

References CachePatch, LastPatch, and unpack.

Referenced by addPatchBlocksInBBox, addTrianglesInBBox, buildBBox, computeDefaultErrorSize, computeNoise, computeNormalCornerSmooth, computeNormalEdgeSmooth, computeNormalOnNeighbor, computeVertex, createVegetableBlock, and generateTileVegetable.

void NL3D::CPatch::unpackLumelBlock uint8   dest,
const uint8   src
[private]
 

Unpack a 4x4 lumel block.

See also:
packShadowMap(), unpackShadowMap()

Definition at line 70 of file patch_lightmap.cpp.

References src.

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.

Parameters:
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.
See also:
packShadowMap(), resetCompressedLumels()

Definition at line 170 of file patch_lightmap.cpp.

References CompressedLumels, NL_BLOCK_LUMEL_COMPRESSED_SIZE, NL_LUMEL_BY_TILE, nlassert, OrderS, OrderT, unpackLumelBlock, and v.

void NL3D::CPatch::updateClipPatchVB  
 

Definition at line 1500 of file patch_render.cpp.

References allocateVBAndFaceVector, deleteVBAndFaceVector, fillVB, OldRenderClipped, RenderClipped, and TessBlocks.

void NL3D::CPatch::updateFar0VBAlloc CTessList< CTessFarVertex > &    vertList,
bool    alloc
[private]
 

Definition at line 780 of file patch_render.cpp.

Referenced by preRender, and updateVBAlloc.

void NL3D::CPatch::updateFar1VBAlloc CTessList< CTessFarVertex > &    vertList,
bool    alloc
[private]
 

Definition at line 795 of file patch_render.cpp.

Referenced by allocateVBAndFaceVectorFar1Only, deleteVBAndFaceVectorFar1Only, preRender, and updateVBAlloc.

uint NL3D::CPatch::updateTessBlockLighting uint    numTb
 

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 1855 of file patch_lightmap.cpp.

References computeNearBlockLightmap, NL_TILE_LIGHTMAP_SIZE, nlassert, OrderS, TessBlocks, and Zone.

void NL3D::CPatch::updateTextureFarOnly  
 

Definition at line 226 of file patch_render.cpp.

References computeNewFar, Far0, Far1, and RenderClipped.

void NL3D::CPatch::updateTileVBAlloc CTessList< CTessNearVertex > &    vertList,
bool    alloc
[private]
 

Definition at line 810 of file patch_render.cpp.

Referenced by preRender, and updateVBAlloc.

void NL3D::CPatch::updateVBAlloc bool    alloc [private]
 

Definition at line 825 of file patch_render.cpp.

References Far0, Far1, MasterBlock, TessBlocks, updateFar0VBAlloc, updateFar1VBAlloc, and updateTileVBAlloc.

Referenced by allocateVBAndFaceVector, and deleteVBAndFaceVector.


Friends And Related Function Documentation

friend class CLandscapeVegetableBlock [friend]
 

Definition at line 801 of file patch.h.

Referenced by createVegetableBlock.

friend class CTessFace [friend]
 

Definition at line 799 of file patch.h.

Referenced by bind, and linkTessFaceWithEdge.

friend class CZone [friend]
 

Definition at line 800 of file patch.h.

Referenced by getZone.


Member Data Documentation

CZone* NL3D::CPatch::_BindZoneNeighbor[4] [private]
 

The 4 neighbors zone of this patch (setuped at bind() time). NB: NULL if zone not loaded, or if no patch near us.

Definition at line 1101 of file patch.h.

Referenced by bind, CPatch, getBindNeighbor, and unbind.

uint8 NL3D::CPatch::_CornerSmoothFlag [private]
 

Put here for packing with NoiseRotation.

Definition at line 359 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 1205 of file patch.h.

Referenced by addRefDLMContext, beginDLMLighting, CPatch, decRefDLMContext, endDLMLighting, fillFar0DLMUvOnlyVertexListVB, fillFar0VertexVB, fillFar1DLMUvOnlyVertexListVB, fillFar1VertexVB, generateTileVegetable, 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 1210 of file patch.h.

Referenced by addRefDLMContext, CPatch, decRefDLMContext, and release.

CPatch* NL3D::CPatch::_ULNearNext [private]
 

Definition at line 1194 of file patch.h.

Referenced by compile, CPatch, getNextNearUL, linkBeforeNearUL, release, and unlinkNearUL.

CPatch* NL3D::CPatch::_ULNearPrec [private]
 

Definition at line 1193 of file patch.h.

Referenced by compile, CPatch, linkBeforeNearUL, release, and unlinkNearUL.

uint32 NL3D::CPatch::_Version = 7 [static, private]
 

Stream version of the class.

Definition at line 53 of file patch.cpp.

Referenced by serial.

CTessFarVertex NL3D::CPatch::BaseFarVertices[4] [private]
 

Definition at line 826 of file patch.h.

Referenced by makeRoots.

CTessVertex* NL3D::CPatch::BaseVertices[4] [private]
 

Definition at line 824 of file patch.h.

Referenced by averageTesselationVertices, bind, compile, computeContinousVertex, computeVertexButCorner, getCornerVertex, makeRoots, and refreshTesselationGeometry.

CBSphere NL3D::CPatch::BSphere [private]
 

Definition at line 828 of file patch.h.

Referenced by clip, compile, computeNewFar, and getBSphere.

CBezierPatch NL3D::CPatch::CachePatch [static, private]
 

Definition at line 51 of file patch.cpp.

Referenced by unpackIntoCache.

bool NL3D::CPatch::Clipped [private]
 

Definition at line 853 of file patch.h.

Referenced by clip, CPatch, forceClip, forceNoClip, isClipped, and release.

std::vector<uint8> NL3D::CPatch::CompressedLumels
 

Definition at line 334 of file patch.h.

Referenced by computeTileLightmapEdgePrecomputed, computeTileLightmapPixelPrecomputed, computeTileLightmapPrecomputed, getTileLumelmapPixelPrecomputed, getTileLumelmapPrecomputed, packShadowMap, resetCompressedLumels, serial, and unpackShadowMap.

float NL3D::CPatch::ErrorSize [private]
 

Definition at line 820 of file patch.h.

Referenced by compile, computeDefaultErrorSize, getErrorSize, and makeRoots.

bool NL3D::CPatch::ExcludeFromRefineAll [private]
 

Definition at line 811 of file patch.h.

Referenced by CPatch.

sint NL3D::CPatch::Far0 [private]
 

Definition at line 833 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 835 of file patch.h.

Referenced by computeNewFar, and fillFar0VertexVB.

float NL3D::CPatch::Far0UScale [private]
 

Definition at line 835 of file patch.h.

Referenced by computeNewFar, and fillFar0VertexVB.

float NL3D::CPatch::Far0VBias [private]
 

Definition at line 835 of file patch.h.

Referenced by computeNewFar, and fillFar0VertexVB.

float NL3D::CPatch::Far0VScale [private]
 

Definition at line 835 of file patch.h.

Referenced by computeNewFar, and fillFar0VertexVB.

sint NL3D::CPatch::Far1 [private]
 

Definition at line 834 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 836 of file patch.h.

Referenced by computeNewFar, and fillFar1VertexVB.

float NL3D::CPatch::Far1UScale [private]
 

Definition at line 836 of file patch.h.

Referenced by computeNewFar, and fillFar1VertexVB.

float NL3D::CPatch::Far1VBias [private]
 

Definition at line 836 of file patch.h.

Referenced by computeNewFar, and fillFar1VertexVB.

float NL3D::CPatch::Far1VScale [private]
 

Definition at line 836 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 850 of file patch.h.

Referenced by computeNewFar, fillFar0VertexVB, fillFar1VertexVB, getSmoothFlag, serial, and setSmoothFlag.

CVector3s NL3D::CPatch::Interiors[4]
 

Definition at line 326 of file patch.h.

Referenced by serial, and unpack.

const CPatch * NL3D::CPatch::LastPatch = NULL [static, private]
 

Definition at line 52 of file patch.cpp.

Referenced by unpackIntoCache.

CTessBlock NL3D::CPatch::MasterBlock [private]
 

Definition at line 870 of file patch.h.

Referenced by allocateVBAndFaceVectorFar1Only, appendFaceToRenderList, appendFarVertexToRenderList, appendTileMaterialToRenderList, compile, computeSoftwareGeomorphAndAlpha, CPatch, createFaceVectorFar0OrTile, createFaceVectorFar1, debugAllocationMarkIndices, deleteFaceVectorFar0OrTile, deleteFaceVectorFar1, deleteVBAndFaceVectorFar1Only, fillVB, fillVBFar0Only, fillVBFar1Only, fillVBFarsDLMUvOnly, getTileMaterialRefCount, recreateTessBlockFaceVector, removeFaceFromRenderList, removeFarVertexFromRenderList, removeTileMaterialFromRenderList, renderFar0, renderFar1, resetMasterBlock, and updateVBAlloc.

uint8 NL3D::CPatch::NoiseRotation
 

The orientation of the NoiseMap. 0,1,2,3. This represent a CCW rotation of the NoiseMap.

Definition at line 349 of file patch.h.

Referenced by computeDisplaceRawCoordinates, CPatch, and serial.

sint NL3D::CPatch::NumRenderableFaces [private]
 

Definition at line 877 of file patch.h.

Referenced by appendFaceToRenderList, CPatch, preRender, removeFaceFromRenderList, and resetMasterBlock.

bool NL3D::CPatch::OldRenderClipped [private]
 

Definition at line 857 of file patch.h.

Referenced by CPatch, release, and updateClipPatchVB.

float NL3D::CPatch::OOTransitionSqrDelta [private]
 

Definition at line 865 of file patch.h.

Referenced by computeGeomorphAlphaFar1VertexListVB, computeNewFar, and fillFar1VertexVB.

uint8 NL3D::CPatch::OrderS [private]
 

Definition at line 808 of file patch.h.

Referenced by addPatchBlocksInBBox, addPatchBlocksInBBoxRecurs, addRefTessBlocks, addTileTrianglesInBBox, addTrianglesInBBox, appendTileLightInfluences, bind, changeEdgeNeighbor, compile, computeCurrentTLILightmap, computeDisplaceCornerSmooth, computeDisplaceEdgeSmooth, computeDisplaceRawInteger, computeDisplaceRawOnNeighbor, computeNearBlockLightmap, computeNoise, computeNormalOnNeighbor, computeTbTm, computeTileLightmapEdgePrecomputed, computeTileLightmapPixelAroundCorner, computeTileLightmapPixelAutomatic, computeTileLightmapPixelPrecomputed, computeTileLightmapPrecomputed, copyTileFlagsFromPatch, CPatch, createVegetableBlock, generateTileVegetable, getLumel, getNumTessBlock, getOrderForEdge, getOrderS, getRootFaceForEdge, getRootVertexForEdge, getTileElement, getTileLumelmapPixelPrecomputed, getTileLumelmapPrecomputed, getTileTileColors, makeRoots, packShadowMap, recreateAllVegetableIgs, release, resetCompressedLumels, resetTileLightInfluences, serial, unpackShadowMap, and updateTessBlockLighting.

uint8 NL3D::CPatch::OrderT [private]
 

Definition at line 808 of file patch.h.

Referenced by addPatchBlocksInBBox, addPatchBlocksInBBoxRecurs, addRefTessBlocks, addTileTrianglesInBBox, addTrianglesInBBox, appendTileLightInfluences, bind, changeEdgeNeighbor, compile, computeCurrentTLILightmap, computeDisplaceCornerSmooth, computeDisplaceEdgeSmooth, computeDisplaceRawInteger, computeDisplaceRawOnNeighbor, computeNearBlockLightmap, computeNoise, computeNormalOnNeighbor, computeTileLightmapPixelAroundCorner, computeTileLightmapPixelAutomatic, copyTileFlagsFromPatch, CPatch, createVegetableBlock, generateTileVegetable, getLumel, getNumTessBlock, getOrderForEdge, getOrderT, getRootFaceForEdge, getRootVertexForEdge, getTileElement, makeRoots, packShadowMap, release, resetCompressedLumels, resetTileLightInfluences, serial, and unpackShadowMap.

CRdrPatchId NL3D::CPatch::Pass0 [private]
 

Definition at line 862 of file patch.h.

Referenced by compile, computeNewFar, preRender, release, renderFar0, and resetRenderFar.

CRdrPatchId NL3D::CPatch::Pass1 [private]
 

Definition at line 862 of file patch.h.

Referenced by compile, computeNewFar, preRender, release, renderFar1, and resetRenderFar.

uint16 NL3D::CPatch::PatchId [private]
 

Definition at line 806 of file patch.h.

Referenced by compile, getBindNeighbor, and getPatchId.

bool NL3D::CPatch::RenderClipped [private]
 

Definition at line 855 of file patch.h.

Referenced by addRefDLMContext, beginDLMLighting, checkCreateVertexVBFar, checkCreateVertexVBNear, checkDeleteVertexVBFar, checkDeleteVertexVBNear, checkFillVertexVBFar, checkFillVertexVBNear, clip, CPatch, decRefDLMContext, dirtTessBlockFaceVector, fillVBIfVisible, forceNoRenderClip, forceRenderClip, isRenderClipped, makeRoots, processDLMLight, recreateTessBlockFaceVector, release, renderFar0, renderFar1, resetMasterBlock, updateClipPatchVB, and updateTextureFarOnly.

CTessFace* NL3D::CPatch::Son0 [private]
 

Definition at line 822 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 822 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 818 of file patch.h.

Referenced by compile.

CVector3s NL3D::CPatch::Tangents[8]
 

Definition at line 325 of file patch.h.

Referenced by serial, and unpack.

sint NL3D::CPatch::TessBlockLimitLevel [private]
 

Definition at line 814 of file patch.h.

Referenced by appendFaceToRenderList, compile, extendTessBlockWithEndPos, and removeFaceFromRenderList.

sint NL3D::CPatch::TessBlockRefCount [private]
 

Definition at line 875 of file patch.h.

Referenced by addRefTessBlocks, clearTessBlocks, CPatch, and decRefTessBlocks.

std::vector<CTessBlock> NL3D::CPatch::TessBlocks [private]
 

Definition at line 873 of file patch.h.

Referenced by addRefTessBlocks, allocateVBAndFaceVectorFar1Only, appendFaceToRenderList, appendFaceToTileRenderList, appendFarVertexToRenderList, appendNearVertexToRenderList, appendTileMaterialToRenderList, clearTessBlocks, computeSoftwareGeomorphAndAlpha, 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 340 of file patch.h.

Referenced by getTileTileColors, and serial.

std::vector<CTileLightInfluence> NL3D::CPatch::TileLightInfluences
 

Definition at line 343 of file patch.h.

Referenced by appendTileLightInfluences, resetTileLightInfluences, and serial.

sint NL3D::CPatch::TileLimitLevel [private]
 

Definition at line 816 of file patch.h.

Referenced by compile.

std::vector<CTileElement> NL3D::CPatch::Tiles
 

Definition at line 337 of file patch.h.

Referenced by computeDisplaceRawInteger, copyTileFlagsFromPatch, generateTileVegetable, getTileElement, getTileRenderPass, getTileUvInfo, and serial.

float NL3D::CPatch::TransitionSqrMin [private]
 

Definition at line 864 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 884 of file patch.h.

Referenced by addRefTessBlocks, clearTessBlocks, and createVegetableBlock.

CVector3s NL3D::CPatch::Vertices[4]
 

The patch coordinates (see CBezierPatch).

Definition at line 324 of file patch.h.

Referenced by serial, and unpack.

CZone* NL3D::CPatch::Zone [private]
 

Definition at line 803 of file patch.h.

Referenced by addRefDLMContext, compile, computeContinousVertex, computeNewFar, computeVertexButCorner, CPatch, decRefDLMContext, getLandscape, getTileLightMap, getTileLightMapUvInfo, getTileRenderPass, getTileUvInfo, getZone, release, releaseTileLightMap, renderFar0, renderFar1, resetRenderFar, unpack, and updateTessBlockLighting.


The documentation for this class was generated from the following files: