# 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::CPatchRdrPass Class Reference

A render pass for a landscape material (tile or texture far). More...

#include <patch_rdr_pass.h>

Inheritance diagram for NL3D::CPatchRdrPass

Inheritance graph
[legend]
Collaboration diagram for NL3D::CPatchRdrPass:

Collaboration graph
[legend]
List of all members.

Public Methods

 CPatchRdrPass ()
void resetMaxTriList ()
void addMaxTris (sint ntris)
void computeStartIndex ()
void resetTriList ()
void addTri (uint32 idx0, uint32 idx1, uint32 idx2)
uint32getStartPointer ()
bool operator< (const CPatchRdrPass &o) const

Public Attributes

sint RefCount
NLMISC::CSmartPtr<ITextureTextureDiffuse
NLMISC::CSmartPtr<ITextureTextureAlpha
sint NMaxTris
sint StartIndex
sint NTris
sint CurIndex

Static Public Methods

void resetGlobalIndex ()

Static Private Attributes

sint MaxGlobalIndex = GlobalTriListBlockRealloc
std::vector<uint32GlobalTriList

Detailed Description

A render pass for a landscape material (tile or texture far).

A Primitive Block is not used, for speed improvement: must not realloc at each face or at each patch...

How does it work: class CPatchRdrPass maintain a GlobalTriList array, where tri indices are stored. Since Tris may be added in a interleaved fashion (33 tris indices for material 0, then 12 tris indices for material 1, then 60 tris indices for material 0 etc...), this GlobalTriList is so interleaved (with some indices used for interleaving).

NB: GlobalTriList is a "grow only" vector, even across frames.... So reallocation never happens, but at begin of program.

Definition at line 50 of file patch_rdr_pass.h.


Constructor & Destructor Documentation

NL3D::CPatchRdrPass::CPatchRdrPass ( )
 

Definition at line 46 of file patch_rdr_pass.cpp.


Member Function Documentation

void NL3D::CPatchRdrPass::addMaxTris ( sint ntris )
 

Definition at line 62 of file patch_rdr_pass.cpp.

void NL3D::CPatchRdrPass::addTri ( uint32 idx0,
uint32 idx1,
uint32 idx2 ) [inline]
 

Definition at line 127 of file patch_rdr_pass.h.

void NL3D::CPatchRdrPass::computeStartIndex ( )
 

Definition at line 75 of file patch_rdr_pass.cpp.

uint32 * NL3D::CPatchRdrPass::getStartPointer ( ) [inline]
 

Definition at line 103 of file patch_rdr_pass.h.

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

Definition at line 106 of file patch_rdr_pass.h.

void NL3D::CPatchRdrPass::resetGlobalIndex ( ) [static]
 

Definition at line 91 of file patch_rdr_pass.cpp.

void NL3D::CPatchRdrPass::resetMaxTriList ( )
 

Definition at line 55 of file patch_rdr_pass.cpp.

void NL3D::CPatchRdrPass::resetTriList ( )
 

Definition at line 83 of file patch_rdr_pass.cpp.


Member Data Documentation

sint NL3D::CPatchRdrPass::CurIndex
 

Definition at line 74 of file patch_rdr_pass.h.

std::vector< uint32 > NL3D::CPatchRdrPass::GlobalTriList [static, private]
 

Definition at line 120 of file patch_rdr_pass.h.

sint NL3D::CPatchRdrPass::MaxGlobalIndex = GlobalTriListBlockRealloc [static, private]
 

Definition at line 40 of file patch_rdr_pass.cpp.

sint NL3D::CPatchRdrPass::NMaxTris
 

Definition at line 68 of file patch_rdr_pass.h.

sint NL3D::CPatchRdrPass::NTris
 

Definition at line 72 of file patch_rdr_pass.h.

sint NL3D::CPatchRdrPass::RefCount
 

Definition at line 54 of file patch_rdr_pass.h.

sint NL3D::CPatchRdrPass::StartIndex
 

Definition at line 70 of file patch_rdr_pass.h.

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

Definition at line 61 of file patch_rdr_pass.h.

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

Definition at line 59 of file patch_rdr_pass.h.


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