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

A block of vegetable instance groups. More...

#include <vegetable_sort_block.h>

Inheritance diagram for NL3D::CVegetableSortBlock:

NL3D::CTessNodeList List of all members.

Public Methods

 CVegetableSortBlock ()
 Constructor. More...

const CVector & getCenter () const
void updateSortBlock (CVegetableManager &vegetManager)
 After adding some instance to any instance group of a sorted block, you must recall this method NB: CVegetableManager::addInstance() and CVegetableManager::deleteIg() flag this SB as Dirty, when needed only. More...


Private Attributes

CVegetableClipBlock_Owner
bool _Dirty
bool _UnderWater
CTessList< CVegetableInstanceGroup_InstanceGroupList
bool ZSortHardMode
Fast sorting.
CVector _Center
 center of the sort block. More...

float _Radius
 approximate Radius of the sort block. More...

float _SortKey
 Positive value used for sort. (square of distance to viewer + threshold). temp computed at each render(). More...

uint _QuadrantId
 current quadrant used. computed at each render. More...

NLMISC::CObjectVector< uint32,
false > 
_SortedTriangleArray
 Quadrants. the big array of indices, for the NL3D_VEGETABLE_NUM_QUADRANT quadrants. More...

uint32_SortedTriangleIndices [NL3D_VEGETABLE_NUM_QUADRANT]
 start ptr. More...

uint _NTriangles
 number of triangles. More...

uint _NIndices
 number of indeices= numTriangles*3. More...


Friends

class CVegetableManager
class CSortVSB
class CVegetableClipBlock
class CVegetableBlendLayerModel

Detailed Description

A block of vegetable instance groups.

CVegetableSortBlock are sorted in Z order. NB: for speed and convenience, only the RdrPass NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT is sorted. A block have a number of quadrants (8). Each quadrant has an array of triangles to render. Internal to VegetableManager. Just an Handle for public.

Author:
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 56 of file vegetable_sort_block.h.


Constructor & Destructor Documentation

NL3D::CVegetableSortBlock::CVegetableSortBlock  
 

Constructor.

Definition at line 45 of file vegetable_sort_block.cpp.

References _Dirty, _NIndices, _NTriangles, _UnderWater, and ZSortHardMode.


Member Function Documentation

const CVector& NL3D::CVegetableSortBlock::getCenter   const [inline]
 

Definition at line 64 of file vegetable_sort_block.h.

References _Center.

void NL3D::CVegetableSortBlock::updateSortBlock CVegetableManager   vegetManager
 

After adding some instance to any instance group of a sorted block, you must recall this method NB: CVegetableManager::addInstance() and CVegetableManager::deleteIg() flag this SB as Dirty, when needed only.

if !Dirty, updateSortBlock() is a no-op. /see CVegetableManager::addInstance() CVegetableManager::deleteIg() Warning! Use OptFastFloor()! So call must be enclosed with a OptFastFloorBegin()/OptFastFloorEnd().

Definition at line 73 of file vegetable_sort_block.cpp.

References _Dirty, _InstanceGroupList, _NIndices, _NTriangles, _SortedTriangleArray, _SortedTriangleIndices, NLMISC::CObjectVector< uint32, false >::clear, NLMISC::CObjectVector< uint32, false >::getPtr, NL3D_VEGETABLE_NUM_QUADRANT, NL3D_VEGETABLE_RDRPASS_UNLIT_2SIDED_ZSORT, nlassert, and NLMISC::CObjectVector< uint32, false >::resize.


Friends And Related Function Documentation

friend class CSortVSB [friend]
 

Definition at line 78 of file vegetable_sort_block.h.

friend class CVegetableBlendLayerModel [friend]
 

Definition at line 80 of file vegetable_sort_block.h.

friend class CVegetableClipBlock [friend]
 

Definition at line 79 of file vegetable_sort_block.h.

friend class CVegetableManager [friend]
 

Definition at line 77 of file vegetable_sort_block.h.


Member Data Documentation

CVector NL3D::CVegetableSortBlock::_Center [private]
 

center of the sort block.

Definition at line 96 of file vegetable_sort_block.h.

Referenced by getCenter.

bool NL3D::CVegetableSortBlock::_Dirty [private]
 

Definition at line 88 of file vegetable_sort_block.h.

Referenced by CVegetableSortBlock, and updateSortBlock.

CTessList<CVegetableInstanceGroup> NL3D::CVegetableSortBlock::_InstanceGroupList [private]
 

Definition at line 118 of file vegetable_sort_block.h.

Referenced by updateSortBlock.

uint NL3D::CVegetableSortBlock::_NIndices [private]
 

number of indeices= numTriangles*3.

Definition at line 113 of file vegetable_sort_block.h.

Referenced by CVegetableSortBlock, and updateSortBlock.

uint NL3D::CVegetableSortBlock::_NTriangles [private]
 

number of triangles.

Definition at line 111 of file vegetable_sort_block.h.

Referenced by CVegetableSortBlock, and updateSortBlock.

CVegetableClipBlock* NL3D::CVegetableSortBlock::_Owner [private]
 

Definition at line 84 of file vegetable_sort_block.h.

uint NL3D::CVegetableSortBlock::_QuadrantId [private]
 

current quadrant used. computed at each render.

Definition at line 103 of file vegetable_sort_block.h.

float NL3D::CVegetableSortBlock::_Radius [private]
 

approximate Radius of the sort block.

Definition at line 98 of file vegetable_sort_block.h.

NLMISC::CObjectVector<uint32, false> NL3D::CVegetableSortBlock::_SortedTriangleArray [private]
 

Quadrants. the big array of indices, for the NL3D_VEGETABLE_NUM_QUADRANT quadrants.

Definition at line 107 of file vegetable_sort_block.h.

Referenced by updateSortBlock.

uint32* NL3D::CVegetableSortBlock::_SortedTriangleIndices[NL3D_VEGETABLE_NUM_QUADRANT] [private]
 

start ptr.

Definition at line 109 of file vegetable_sort_block.h.

Referenced by updateSortBlock.

float NL3D::CVegetableSortBlock::_SortKey [private]
 

Positive value used for sort. (square of distance to viewer + threshold). temp computed at each render().

Definition at line 101 of file vegetable_sort_block.h.

bool NL3D::CVegetableSortBlock::_UnderWater [private]
 

Definition at line 91 of file vegetable_sort_block.h.

Referenced by CVegetableSortBlock.

bool NL3D::CVegetableSortBlock::ZSortHardMode [private]
 

Definition at line 122 of file vegetable_sort_block.h.

Referenced by CVegetableSortBlock.


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