NL3D::CPatchRdrPass Class Reference

#include <patch_rdr_pass.h>

Inheritance diagram for NL3D::CPatchRdrPass:

NLMISC::CRefCount

Detailed Description

A render pass for a landscape material (tile or texture far). Has list of Patch / TileId.

Definition at line 46 of file patch_rdr_pass.h.

Public Member Functions

 CPatchRdrPass ()
const sintgetRefCount () const
bool operator< (const CPatchRdrPass &o) const
The Patch/Tile List for this pass.. updated at each render(), (in CPatch::preRender() and CLandscape::render()).
void appendRdrPatchFar0 (CPatch *rdrPatch)
void appendRdrPatchFar1 (CPatch *rdrPatch)
void appendRdrPatchTile (uint pass, CRdrTileId *rdrTile, uint maxRenderedFaces)
void clearAllRenderList ()
uint getMaxRenderedFaces () const
CPatchgetRdrPatchFar0 ()
CPatchgetRdrPatchFar1 ()
CRdrTileIdgetRdrTileRoot (uint pass)

Data Fields

sint crefs
CPtrInfo * pinfo
sint RefCount
The Tiny material for this pass.
NLMISC::CSmartPtr< ITextureTextureAlpha
NLMISC::CSmartPtr< ITextureTextureDiffuse

Static Public Attributes

CPtrInfo NullPtrInfo

Private Attributes

CPatch_Far0ListRoot
CPatch_Far1ListRoot
uint _MaxRenderedFaces
CRdrTileId_TileListRoot [NL3D_MAX_TILE_PASS]

Friends

struct CPtrInfo


Constructor & Destructor Documentation

NL3D::CPatchRdrPass::CPatchRdrPass  ) 
 

Definition at line 46 of file patch_rdr_pass.cpp.

References clearAllRenderList().

00047 {
00048         RefCount= 0;
00049 
00050         clearAllRenderList();
00051 }


Member Function Documentation

void NL3D::CPatchRdrPass::appendRdrPatchFar0 CPatch rdrPatch  )  [inline]
 

Definition at line 69 of file patch_rdr_pass.h.

References _Far0ListRoot, _MaxRenderedFaces, NL3D::CPatch::_NextRdrFar0, and NL3D::CPatch::NumRenderableFaces.

Referenced by NL3D::CPatch::preRender().

00070         {
00071                 _MaxRenderedFaces+= rdrPatch->NumRenderableFaces;
00072                 rdrPatch->_NextRdrFar0= _Far0ListRoot;
00073                 _Far0ListRoot= rdrPatch;
00074         }

void NL3D::CPatchRdrPass::appendRdrPatchFar1 CPatch rdrPatch  )  [inline]
 

Definition at line 75 of file patch_rdr_pass.h.

References _Far1ListRoot, _MaxRenderedFaces, NL3D::CPatch::_NextRdrFar1, and NL3D::CPatch::NumRenderableFaces.

Referenced by NL3D::CPatch::preRender().

00076         {
00077                 _MaxRenderedFaces+= rdrPatch->NumRenderableFaces;
00078                 rdrPatch->_NextRdrFar1= _Far1ListRoot;
00079                 _Far1ListRoot= rdrPatch;
00080         }

void NL3D::CPatchRdrPass::appendRdrPatchTile uint  pass,
CRdrTileId rdrTile,
uint  maxRenderedFaces
[inline]
 

Definition at line 81 of file patch_rdr_pass.h.

References _MaxRenderedFaces, NL3D::CRdrTileId::_Next, _TileListRoot, and uint.

Referenced by NL3D::CTileMaterial::appendTileToEachRenderPass().

00082         {
00083                 _MaxRenderedFaces+= maxRenderedFaces;
00084                 rdrTile->_Next= _TileListRoot[pass];
00085                 _TileListRoot[pass]= rdrTile;
00086         }

void NL3D::CPatchRdrPass::clearAllRenderList  ) 
 

maxRenderedFaces is used to over-estimate the number of faces that will be rendered in this pass. Since all Far0/Far1/Tiles are added, this is REALLY over-estimated because in CLandscape::render(), Far0/Far1/Tiles render are split.

Definition at line 55 of file patch_rdr_pass.cpp.

References _Far0ListRoot, _Far1ListRoot, _MaxRenderedFaces, _TileListRoot, NL3D_MAX_TILE_PASS, and uint.

Referenced by CPatchRdrPass(), and NL3D::CLandscape::render().

00056 {
00057         _MaxRenderedFaces= 0;
00058         _Far0ListRoot= NULL;
00059         _Far1ListRoot= NULL;
00060         for(uint i=0;i<NL3D_MAX_TILE_PASS; i++)
00061         {
00062                 _TileListRoot[i]= NULL;
00063         }
00064 }

uint NL3D::CPatchRdrPass::getMaxRenderedFaces  )  const [inline]
 

Definition at line 90 of file patch_rdr_pass.h.

References _MaxRenderedFaces, and uint.

Referenced by NL3D::initPassTriArray().

00090 {return _MaxRenderedFaces;}

CPatch* NL3D::CPatchRdrPass::getRdrPatchFar0  )  [inline]
 

Definition at line 87 of file patch_rdr_pass.h.

References _Far0ListRoot.

Referenced by NL3D::CLandscape::render().

00087 {return _Far0ListRoot;}

CPatch* NL3D::CPatchRdrPass::getRdrPatchFar1  )  [inline]
 

Definition at line 88 of file patch_rdr_pass.h.

References _Far1ListRoot.

Referenced by NL3D::CLandscape::render().

00088 {return _Far1ListRoot;}

CRdrTileId* NL3D::CPatchRdrPass::getRdrTileRoot uint  pass  )  [inline]
 

Definition at line 89 of file patch_rdr_pass.h.

References _TileListRoot, and uint.

Referenced by NL3D::CLandscape::render().

00089 {return _TileListRoot[pass];}

const sint& NLMISC::CRefCount::getRefCount  )  const [inline, inherited]
 

Definition at line 70 of file smart_ptr.h.

References NLMISC::CRefCount::crefs, and sint.

00071         {
00072                 return  crefs;
00073         }

bool NL3D::CPatchRdrPass::operator< const CPatchRdrPass o  )  const [inline]
 

Definition at line 98 of file patch_rdr_pass.h.

References TextureAlpha, and TextureDiffuse.

00099         {
00100                 // Compare first the Alphatext, so minmum changes are made during render...
00101                 if(TextureAlpha!=o.TextureAlpha)
00102                         return (void*)TextureAlpha<(void*)o.TextureAlpha;
00103                 else
00104                         return (void*)TextureDiffuse<(void*)o.TextureDiffuse;
00105         }


Friends And Related Function Documentation

friend struct CPtrInfo [friend, inherited]
 

Definition at line 67 of file smart_ptr.h.


Field Documentation

CPatch* NL3D::CPatchRdrPass::_Far0ListRoot [private]
 

Definition at line 113 of file patch_rdr_pass.h.

Referenced by appendRdrPatchFar0(), clearAllRenderList(), and getRdrPatchFar0().

CPatch* NL3D::CPatchRdrPass::_Far1ListRoot [private]
 

Definition at line 114 of file patch_rdr_pass.h.

Referenced by appendRdrPatchFar1(), clearAllRenderList(), and getRdrPatchFar1().

uint NL3D::CPatchRdrPass::_MaxRenderedFaces [private]
 

Definition at line 111 of file patch_rdr_pass.h.

Referenced by appendRdrPatchFar0(), appendRdrPatchFar1(), appendRdrPatchTile(), clearAllRenderList(), and getMaxRenderedFaces().

CRdrTileId* NL3D::CPatchRdrPass::_TileListRoot[NL3D_MAX_TILE_PASS] [private]
 

Definition at line 116 of file patch_rdr_pass.h.

Referenced by appendRdrPatchTile(), clearAllRenderList(), and getRdrTileRoot().

sint NLMISC::CRefCount::crefs [mutable, inherited]
 

Definition at line 79 of file smart_ptr.h.

Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount().

CRefCount::CPtrInfo NLMISC::CRefCount::NullPtrInfo [static, inherited]
 

Referenced by NLMISC::CRefCount::CRefCount().

CPtrInfo* NLMISC::CRefCount::pinfo [mutable, inherited]
 

Definition at line 80 of file smart_ptr.h.

Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount().

sint NL3D::CPatchRdrPass::RefCount
 

Definition at line 50 of file patch_rdr_pass.h.

Referenced by NL3D::CLandscape::releaseTile().

NLMISC::CSmartPtr<ITexture> NL3D::CPatchRdrPass::TextureAlpha
 

Definition at line 57 of file patch_rdr_pass.h.

Referenced by NL3D::CLandscape::flushTiles(), NL3D::CLandscape::getTileTexture(), NL3D::CLandscape::loadTile(), operator<(), and NL3D::CLandscape::render().

NLMISC::CSmartPtr<ITexture> NL3D::CPatchRdrPass::TextureDiffuse
 

Definition at line 55 of file patch_rdr_pass.h.

Referenced by NL3D::CLandscape::clearFarRenderPass(), NL3D::CLandscape::flushTiles(), NL3D::CLandscape::freeFarRenderPass(), NL3D::CLandscape::getFarRenderPass(), NL3D::CLandscape::getTileLightMap(), NL3D::CLandscape::getTileTexture(), NL3D::CLandscape::loadTile(), operator<(), NL3D::CLandscape::refillTileLightMap(), NL3D::CLandscape::releaseTileLightMap(), and NL3D::CLandscape::render().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 07:01:12 2004 for NeL by doxygen 1.3.6