NL3D::CVegetableInstanceGroup Class Reference

#include <vegetable_instance_group.h>

Inheritance diagram for NL3D::CVegetableInstanceGroup:

NL3D::CTessNodeList

Detailed Description

A block of vegetable instances. Instaces are added to an IG, and deleted when the ig is deleted. Internal to VegetableManager. Just an Handle for public.
Author:
Lionel Berenguier

Nevrax France

Date:
2001

Definition at line 59 of file vegetable_instance_group.h.

UpdateLighting management

void linkBeforeUL (CVegetableInstanceGroup *igNext)
 insert this before igNext.

void unlinkUL ()
 unlink

CVegetableInstanceGroup_ULNext
 insert this before igNext.

uint _ULNumVertices
 insert this before igNext.

CVegetableInstanceGroup_ULPrec
 insert this before igNext.


Public Member Functions

 CVegetableInstanceGroup ()
 Constructor.

bool isEmpty () const
 tells if the instanceGroup has no faces at all.

 ~CVegetableInstanceGroup ()

Data Fields

CTessNodeListNext
CTessNodeListPrec
CVegetableLightEx VegetableLightEx

Private Attributes

CVegetableClipBlock_ClipOwner
bool _HasZSortPassInstances
CVegetableRdrPass _RdrPass [NL3D_VEGETABLE_NRDRPASS]
CVegetableSortBlock_SortOwner
NLMISC::CObjectVector< sint16,
false > 
_TriangleQuadrantOrderArray
uint _TriangleQuadrantOrderNumTriangles
sint16_TriangleQuadrantOrders [NL3D_VEGETABLE_NUM_QUADRANT]

Friends

class CVegetableClipBlock
class CVegetableManager
class CVegetableSortBlock


Constructor & Destructor Documentation

NL3D::CVegetableInstanceGroup::CVegetableInstanceGroup  ) 
 

Constructor.

Definition at line 36 of file vegetable_instance_group.cpp.

References _ClipOwner, _HasZSortPassInstances, _SortOwner, _TriangleQuadrantOrderNumTriangles, and _ULNumVertices.

00037 {
00038         _ClipOwner= NULL;
00039         _SortOwner= NULL;
00040         _HasZSortPassInstances= false;
00041         _TriangleQuadrantOrderNumTriangles= 0;
00042         _ULPrec= this;
00043         _ULNext= this;
00044         _ULNumVertices= 0;
00045 }

NL3D::CVegetableInstanceGroup::~CVegetableInstanceGroup  ) 
 

Definition at line 49 of file vegetable_instance_group.cpp.

References unlinkUL().

00050 {
00051         unlinkUL();
00052 }


Member Function Documentation

bool NL3D::CVegetableInstanceGroup::isEmpty  )  const
 

tells if the instanceGroup has no faces at all.

Definition at line 90 of file vegetable_instance_group.cpp.

References _RdrPass, NL3D_VEGETABLE_NRDRPASS, NL3D::CVegetableInstanceGroup::CVegetableRdrPass::NTriangles, and uint.

00091 {
00092         for(uint i=0; i<NL3D_VEGETABLE_NRDRPASS; i++)
00093         {
00094                 const CVegetableRdrPass &vegetRdrPass= _RdrPass[i];
00095                 // If some triangles to render, the ig is not empty
00096                 if(vegetRdrPass.NTriangles != 0)
00097                         return false;
00098         }
00099 
00100         // for all pass, no triangles to render => the ig is empty.
00101         return true;
00102 }

void NL3D::CVegetableInstanceGroup::linkBeforeUL CVegetableInstanceGroup igNext  )  [private]
 

insert this before igNext.

Definition at line 56 of file vegetable_instance_group.cpp.

References _ULNext, _ULPrec, and nlassert.

Referenced by NL3D::CVegetableManager::addInstance().

00057 {
00058         nlassert(igNext);
00059 
00060         // first, unlink others from me. NB: works even if _ULPrec==_ULNext==this.
00061         _ULNext->_ULPrec= _ULPrec;
00062         _ULPrec->_ULNext= _ULNext;
00063         // link to igNext.
00064         _ULNext= igNext;
00065         _ULPrec= igNext->_ULPrec;
00066         // link others to me.
00067         _ULNext->_ULPrec= this;
00068         _ULPrec->_ULNext= this;
00069 }

void NL3D::CVegetableInstanceGroup::unlinkUL  )  [private]
 

unlink

Definition at line 72 of file vegetable_instance_group.cpp.

References _ULNext, and _ULPrec.

Referenced by NL3D::CVegetableManager::deleteIg(), and ~CVegetableInstanceGroup().

00073 {
00074         // unlink others from me. NB: works even if _ULPrec==_ULNext==this.
00075         _ULNext->_ULPrec= _ULPrec;
00076         _ULPrec->_ULNext= _ULNext;
00077         // reset
00078         _ULPrec= this;
00079         _ULNext= this;
00080 }


Friends And Related Function Documentation

friend class CVegetableClipBlock [friend]
 

Definition at line 78 of file vegetable_instance_group.h.

friend class CVegetableManager [friend]
 

Definition at line 77 of file vegetable_instance_group.h.

friend class CVegetableSortBlock [friend]
 

Definition at line 79 of file vegetable_instance_group.h.


Field Documentation

CVegetableClipBlock* NL3D::CVegetableInstanceGroup::_ClipOwner [private]
 

Definition at line 83 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::addInstance(), NL3D::CVegetableManager::createIg(), CVegetableInstanceGroup(), and NL3D::CVegetableManager::deleteIg().

bool NL3D::CVegetableInstanceGroup::_HasZSortPassInstances [private]
 

Definition at line 146 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::addInstance(), CVegetableInstanceGroup(), and NL3D::CVegetableManager::deleteIg().

CVegetableRdrPass NL3D::CVegetableInstanceGroup::_RdrPass[NL3D_VEGETABLE_NRDRPASS] [private]
 

Definition at line 138 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::addInstance(), NL3D::CVegetableManager::createIg(), NL3D::CVegetableManager::deleteIg(), isEmpty(), NL3D::CVegetableManager::render(), NL3D::CVegetableManager::reserveIgCompile(), NL3D::CVegetableManager::swapIgRdrPassHardMode(), NL3D::CVegetableManager::updateInstanceLighting(), NL3D::CVegetableManager::updateLightingIGPart(), and NL3D::CVegetableSortBlock::updateSortBlock().

CVegetableSortBlock* NL3D::CVegetableInstanceGroup::_SortOwner [private]
 

Definition at line 84 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::addInstance(), NL3D::CVegetableManager::createIg(), CVegetableInstanceGroup(), and NL3D::CVegetableManager::deleteIg().

NLMISC::CObjectVector<sint16, false> NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrderArray [private]
 

Definition at line 142 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::reserveIgCompile().

uint NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrderNumTriangles [private]
 

Definition at line 143 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::addInstance(), CVegetableInstanceGroup(), and NL3D::CVegetableManager::reserveIgCompile().

sint16* NL3D::CVegetableInstanceGroup::_TriangleQuadrantOrders[NL3D_VEGETABLE_NUM_QUADRANT] [private]
 

Definition at line 144 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::addInstance(), NL3D::CVegetableManager::reserveIgCompile(), and NL3D::CVegetableSortBlock::updateSortBlock().

CVegetableInstanceGroup* NL3D::CVegetableInstanceGroup::_ULNext [private]
 

insert this before igNext.

Definition at line 154 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::deleteIg(), NL3D::CVegetableManager::doUpdateLighting(), linkBeforeUL(), and unlinkUL().

uint NL3D::CVegetableInstanceGroup::_ULNumVertices [private]
 

insert this before igNext.

Definition at line 156 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::addInstance(), CVegetableInstanceGroup(), and NL3D::CVegetableManager::deleteIg().

CVegetableInstanceGroup* NL3D::CVegetableInstanceGroup::_ULPrec [private]
 

insert this before igNext.

Definition at line 153 of file vegetable_instance_group.h.

Referenced by linkBeforeUL(), and unlinkUL().

CTessNodeList* NL3D::CTessNodeList::Next [inherited]
 

Definition at line 44 of file tess_list.h.

Referenced by NL3D::CVegetableManager::addInstance(), NL3D::CLandscape::computeDynamicLighting(), NL3D::CPatch::computeGeomorphAlphaFar1VertexListVB(), NL3D::CPatch::computeGeomorphFar0VertexListVB(), NL3D::CPatch::computeGeomorphTileVertexListVB(), NL3D::CPatch::computeGeomorphVertexList(), NL3D::CPatch::debugAllocationMarkIndicesFarList(), NL3D::CPatch::debugAllocationMarkIndicesNearList(), NL3D::CPatch::fillFar0DLMUvOnlyVertexListVB(), NL3D::CPatch::fillFar0VertexListVB(), NL3D::CPatch::fillFar1DLMUvOnlyVertexListVB(), NL3D::CPatch::fillFar1VertexListVB(), NL3D::CPatch::fillTileVertexListVB(), NL3D::CLandscape::getDynamicLightingMemoryLoad(), NL3D::CTessBlock::refillFaceVectorFar0(), NL3D::CTessBlock::refillFaceVectorFar1(), NL3D::CTessBlock::refillFaceVectorTile(), NL3D::CLandscape::refine(), NL3D::CVegetableManager::render(), NL3D::CLandscape::render(), NL3D::CPatch::updateFar0VBAlloc(), NL3D::CPatch::updateFar1VBAlloc(), NL3D::CVegetableSortBlock::updateSortBlock(), and NL3D::CPatch::updateTileVBAlloc().

CTessNodeList* NL3D::CTessNodeList::Prec [inherited]
 

Definition at line 43 of file tess_list.h.

Referenced by NL3D::CTessNodeList::CTessNodeList().

CVegetableLightEx NL3D::CVegetableInstanceGroup::VegetableLightEx
 

The Vegetable Light Information. Contains list of PointLights which influence the vegetIg. NB: PointLights ptrs are kept so the ig must be deleted when the lights are deleted.

Definition at line 73 of file vegetable_instance_group.h.

Referenced by NL3D::CVegetableManager::addInstance(), NL3D::CPatch::generateTileVegetable(), NL3D::CVegetableManager::updateInstanceLighting(), and NL3D::CVegetableManager::updateLightingIGPart().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 08:21:18 2004 for NeL by doxygen 1.3.6