This container is a simple grid, used to quickly find elements. More...
#include <quad_grid.h>
Inherits NL3D::CQuadGridBase.
Classes | |
| class | CBaseNode |
| A base node (not circular) for the list of selected or unselected node. More... | |
| class | CIterator |
| class | CNode |
| An element inserted in the quadGrid. More... | |
| class | const_iterator |
| class | CQuadNode |
| A circular list node for the list of node per Quad element. More... | |
Public Types | |
| typedef std::vector< uint > | TSelectionShape |
Public Member Functions | |
| CQuadGrid (uint memoryBlockSize=NL3D_QUAD_GRID_ALLOC_BLOCKSIZE) | |
| Default constructor, use axes XY!!!, has a size of 16, and EltSize is 1. | |
| ~CQuadGrid () | |
| dtor. | |
| CQuadGrid< T > & | operator= (const CQuadGrid< T > &o) |
| CQuadGrid (const CQuadGrid< T > &o) | |
Initialization | |
| void | changeBase (const NLMISC::CMatrix &base) |
| Change the base matrix of the quad grid. | |
| void | create (uint size, float eltSize) |
| Init the container. | |
| const NLMISC::CMatrix & | getBasis () const |
| uint | getSize () const |
| float | getEltSize () const |
Container operation | |
| void | clear () |
| Clear the container. | |
| CIterator | erase (CIterator it) |
| Erase an interator from the container Speed is in O(1 * L*H) where L*H is the number of squares surrounded by the element. | |
| CIterator | insert (const NLMISC::CVector &bboxmin, const NLMISC::CVector &bboxmax, const T &val) |
| Insert a new element in the container. | |
Selection | |
| void | clearSelection () |
| Clear the selection list Speed is in O(Nelts). | |
| void | selectAll () |
| Select all the container. | |
| void | select (const NLMISC::CVector &bboxmin, const NLMISC::CVector &bboxmax) |
| Select element intersecting a bounding box. | |
| void | selectRay (const NLMISC::CVector &rayStart, const NLMISC::CVector &rayEnd) |
| void | buildSelectionShape (TSelectionShape &dest, const NLMISC::CPolygon2D &poly) const |
| Build a selection from a convex polygon. | |
| void | select (const TSelectionShape &shape) |
| Select element intersecting a selection shape. | |
| CIterator | begin () |
| Return the first iterator of the selected element list. | |
| CIterator | end () |
| Return the end iterator of the selected element list. | |
Private Member Functions | |
| void | initCons () |
| void | linkToRoot (CBaseNode &root, CBaseNode *ptr) |
| void | initSelectStamps () const |
| void | selectQuads (CVector bmin, CVector bmax, sint &x0, sint &x1, sint &y0, sint &y1) |
| void | addToSelection (CNode *ptr) |
| void | addQuadNodeToSelection (CQuadNode &quad) |
Private Attributes | |
| std::vector< CQuadNode > | _Grid |
| sint | _Size |
| sint | _SizePower |
| float | _EltSize |
| NLMISC::CMatrix | _ChangeBasis |
| CBaseNode | _SelectedList |
| CBaseNode | _UnSelectedList |
| NLMISC::CBlockMemory< CNode > | _NodeBlockMemory |
Friends | |
| class | CIterator |
This container is a simple grid, used to quickly find elements.
His purpose is similiar to CQuadTree, but it is a simple grid, so test are in O(1), not in O(log n). It is perfect for local lookup (like in collisions). Use it if you want to select small area, not large. Also, for best use, elements should have approximatively the same size, and this size should be little smaller than the size of a grid element...
By default, the quad grid is aligned on XY. (unlike the quadtree!!!)
Unlike the quadtree, the quadgrid is NOT geographicly delimited, ie, its limits "tiles"!! This is why no "center" is required. As a direct consequence, when you select something, you are REALLY not sure that what you select is not a mile away from your selection :) ....
Also, for memory optimisation, no bbox is stored in the quadgrid. Hence no particular selection is made on the Z components...
For maximum allocation speed Efficiency, it uses a CBlockMemory<CNode> to allocate elements at insert(). DefaultBlockSize is 16, but you can change it at construction.
Definition at line 87 of file quad_grid.h.
| typedef std::vector<uint> NL3D::CQuadGrid< T >::TSelectionShape |
Definition at line 95 of file quad_grid.h.
| NL3D::CQuadGrid< T >::CQuadGrid | ( | uint | memoryBlockSize = NL3D_QUAD_GRID_ALLOC_BLOCKSIZE |
) | [inline] |
Default constructor, use axes XY!!!, has a size of 16, and EltSize is 1.
Definition at line 479 of file quad_grid.h.
References NL3D::CQuadGrid< T >::initCons().
| NL3D::CQuadGrid< T >::~CQuadGrid | ( | ) | [inline] |
dtor.
Definition at line 580 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_Grid, and NL3D::CQuadGrid< T >::clear().
| NL3D::CQuadGrid< T >::CQuadGrid | ( | const CQuadGrid< T > & | o | ) | [inline] |
Definition at line 485 of file quad_grid.h.
References NL3D::CQuadGrid< T >::initCons(), and NL3D::CQuadGrid< T >::operator=().
| void NL3D::CQuadGrid< T >::addQuadNodeToSelection | ( | CQuadNode & | quad | ) | [inline, private] |
Definition at line 384 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::select(), and NL3D::CQuadGrid< T >::selectRay().
| void NL3D::CQuadGrid< T >::addToSelection | ( | CNode * | ptr | ) | [inline, private] |
Definition at line 365 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< CPatchIdentEx >::addQuadNodeToSelection().
| CQuadGrid< T >::CIterator NL3D::CQuadGrid< T >::begin | ( | void | ) | [inline] |
Return the first iterator of the selected element list.
begin and end are valid till the next insert. Speed is in O(1)
Definition at line 880 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_SelectedList, NL3D::CQuadGrid< T >::CIterator, and NL3D::CQuadGrid< T >::CBaseNode::Next.
Referenced by NL3D::CLightingManager::addDynamicLight(), NL3D::CStaticQuadGrid< T >::build(), NL3D::CLandscape::buildPatchBlocksInBBox(), NL3D::CLandscape::buildTrianglesInBBox(), NL3D::CQuadGrid< T >::clear(), NL3D::CZoneLighter::compilePointLightRT(), NL3D::CInstanceLighter::compilePointLightRT(), NL3D::CShadowPolyReceiver::computeClippedTrisWithPolyClip(), NL3D::CLandscape::computeDynamicLighting(), NL3D::CInstanceLighter::computeSunContribution(), NL3D::CZoneLighter::computeTileFlagsForPositionTowardWater(), NL3D::CScene::findCameraClusterSystemFromRay(), NL3D::CClipTrav::fullSearch(), NL3D::CVisualCollisionManager::getCameraCollision(), NL3D::CShadowPolyReceiver::getCameraCollision(), NL3D::CLightingManager::getDynamicPointLightList(), NL3D::CMiniCol::getFaces(), NL3D::CMiniCol::getGroundNormal(), NL3D::CVisualCollisionManager::getMeshs(), NL3D::CVisualCollisionManager::getRayCollision(), NL3D::CInstanceLighter::processIGPointLightRT(), NL3D::CZoneLighter::processZonePointLightRT(), NL3D::CVisualCollisionManager::receiveShadowMap(), NL3D::CMiniCol::removeLandScapePart(), NL3D::CLandscape::removeZone(), NL3D::CShadowPolyReceiver::render(), NL3D::CShadowMapManager::renderProject(), NL3D::CShadowPolyReceiver::renderSelection(), NL3D::CMiniCol::snapToGround(), and NL3D::CClipTrav::traverse().
| void NL3D::CQuadGrid< T >::buildSelectionShape | ( | TSelectionShape & | dest, | |
| const NLMISC::CPolygon2D & | poly | |||
| ) | const [inline] |
Build a selection from a convex polygon.
The resulting selection can then be used for a subsequent call to 'select'
Definition at line 808 of file quad_grid.h.
References NL3D::CQuadGridBase::_AlreadySelected, NL3D::CQuadGrid< T >::_ChangeBasis, NL3D::CQuadGrid< T >::_EltSize, NL3D::CQuadGridBase::_PolyBorders, NL3D::CQuadGridBase::_ScaledPoly, NL3D::CQuadGridBase::_SelectStamp, NL3D::CQuadGrid< T >::_Size, NL3D::CQuadGrid< T >::_SizePower, NLMISC::CPolygon2D::computeOuterBorders(), NL3D::CQuadGrid< T >::initSelectStamps(), nlassert, and NLMISC::CPolygon2D::Vertices.
Referenced by NL3D::CShadowPolyReceiver::selectPolygon().
| void NL3D::CQuadGrid< T >::changeBase | ( | const NLMISC::CMatrix & | base | ) | [inline] |
Change the base matrix of the quad grid.
For exemple this code init the grid tree in the plane XZ:
CQuadGrid grid; NLMISC::CMatrix tmp; NLMISC::CVector I(1,0,0); NLMISC::CVector J(0,0,1); NLMISC::CVector K(0,-1,0); tmp.identity(); tmp.setRot(I,J,K, true); quadTree.changeBase (tmp);
| base | Base of the quad grid |
Definition at line 586 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_ChangeBasis.
Referenced by NL3D::CCubeGrid< TCell >::CCubeGrid(), and NL3D::CInstanceLighter::computeSunContribution().
| void NL3D::CQuadGrid< T >::clear | ( | void | ) | [inline] |
Clear the container.
Elements are deleted, but the quadgrid is not erased. Speed is in O(Nelts)
Definition at line 618 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_SelectedList, NL3D::CQuadGrid< T >::_UnSelectedList, NL3D::CQuadGrid< T >::begin(), NL3D::CQuadGrid< T >::end(), NL3D::CQuadGrid< T >::erase(), NL3D::CQuadGrid< T >::CBaseNode::Next, and NL3D::CQuadGrid< T >::selectAll().
Referenced by NL3D::CLandscape::clear(), NL3D::CShadowMapManager::clearAllShadowCasters(), NL3D::CLightingManager::clearDynamicLights(), NL3D::CQuadGrid< T >::create(), and NL3D::CQuadGrid< T >::~CQuadGrid().
| void NL3D::CQuadGrid< T >::clearSelection | ( | ) | [inline] |
Clear the selection list Speed is in O(Nelts).
Definition at line 733 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_SelectedList, NL3D::CQuadGrid< T >::_UnSelectedList, NL3D::CQuadGrid< T >::linkToRoot(), NL3D::CQuadGrid< T >::CBaseNode::Next, and NL3D::CQuadGrid< T >::CBaseNode::Selected.
Referenced by NL3D::CStaticQuadGrid< T >::build(), NL3D::CLandscape::buildPatchBlocksInBBox(), NL3D::CLandscape::buildTrianglesInBBox(), NL3D::CLandscape::computeDynamicLighting(), NL3D::CZoneLighter::computeTileFlagsForPositionTowardWater(), NL3D::CLandscape::removeZone(), NL3D::CQuadGrid< T >::select(), and NL3D::CQuadGrid< T >::selectRay().
| void NL3D::CQuadGrid< T >::create | ( | uint | size, | |
| float | eltSize | |||
| ) | [inline] |
Init the container.
container is first clear() ed.
| size | is the width and the height of the initial quad tree, in number of square. For performance view, this should be a power of 2, and <=32768. (eg: 256,512, 8, 16 ...) | |
| eltSize | is the width and height of an element. Must be >0. Notice that the quadgrid MUST be square!! |
Definition at line 591 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_EltSize, NL3D::CQuadGrid< T >::_Grid, NL3D::CQuadGrid< T >::_Size, NL3D::CQuadGrid< T >::_SizePower, NL3D::CQuadGrid< T >::clear(), NLMISC::getPowerOf2(), NLMISC::isPowerOf2(), and nlassert.
Referenced by NL3D::CClipTrav::CClipTrav(), NL3D::CLightingManager::CLightingManager(), NL3D::CMiniCol::CMiniCol(), NL3D::CZoneLighter::compilePointLightRT(), NL3D::CInstanceLighter::compilePointLightRT(), NL3D::CInstanceLighter::computeSunContribution(), NL3D::CCubeGrid< TCell >::create(), NL3D::CShadowPolyReceiver::CShadowPolyReceiver(), NL3D::CVisualCollisionManager::CVisualCollisionManager(), NL3D::CLandscape::init(), NL3D::CQuadGrid< T >::initCons(), NL3D::CZoneLighter::makeQuadGridFromWaterShapes(), NL3D::CQuadGrid< T >::operator=(), and NL3D::CShadowMapManager::setQuadGridSize().
| CQuadGrid< T >::CIterator NL3D::CQuadGrid< T >::end | ( | void | ) | [inline] |
Return the end iterator of the selected element list.
begin and end are valid till the next insert. Speed is in O(1)
Definition at line 885 of file quad_grid.h.
References NL3D::CQuadGrid< T >::CIterator.
Referenced by NL3D::CStaticQuadGrid< T >::build(), NL3D::CLandscape::buildPatchBlocksInBBox(), NL3D::CLandscape::buildTrianglesInBBox(), NL3D::CQuadGrid< T >::clear(), NL3D::CZoneLighter::compilePointLightRT(), NL3D::CInstanceLighter::compilePointLightRT(), NL3D::CShadowPolyReceiver::computeClippedTrisWithPolyClip(), NL3D::CLandscape::computeDynamicLighting(), NL3D::CInstanceLighter::computeSunContribution(), NL3D::CZoneLighter::computeTileFlagsForPositionTowardWater(), NL3D::CQuadGrid< T >::erase(), NL3D::CScene::findCameraClusterSystemFromRay(), NL3D::CClipTrav::fullSearch(), NL3D::CVisualCollisionManager::getCameraCollision(), NL3D::CShadowPolyReceiver::getCameraCollision(), NL3D::CLightingManager::getDynamicPointLightList(), NL3D::CMiniCol::getFaces(), NL3D::CMiniCol::getGroundNormal(), NL3D::CVisualCollisionManager::getMeshs(), NL3D::CVisualCollisionManager::getRayCollision(), NL3D::CInstanceLighter::processIGPointLightRT(), NL3D::CZoneLighter::processZonePointLightRT(), NL3D::CVisualCollisionManager::receiveShadowMap(), NL3D::CMiniCol::removeLandScapePart(), NL3D::CShadowPolyReceiver::removeTriangle(), NL3D::CLandscape::removeZone(), NL3D::CShadowPolyReceiver::render(), NL3D::CShadowMapManager::renderProject(), NL3D::CShadowPolyReceiver::renderSelection(), NL3D::CMiniCol::snapToGround(), and NL3D::CClipTrav::traverse().
| CQuadGrid< T >::CIterator NL3D::CQuadGrid< T >::erase | ( | typename CQuadGrid< T >::CIterator | it | ) | [inline] |
Erase an interator from the container Speed is in O(1 * L*H) where L*H is the number of squares surrounded by the element.
| it | is the iterator to erase. |
Definition at line 632 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_NodeBlockMemory, NL3D::CQuadGrid< T >::const_iterator::_Ptr, NL3D::CQuadGrid< T >::CIterator, NLMISC::CObjectVector< T, EnableObjectBehavior >::clear(), NL3D::CQuadGrid< T >::end(), NLMISC::CBlockMemory< T, __ctor_dtor__ >::free(), NL3D::CQuadGrid< T >::CBaseNode::Next, NL3D::CQuadGrid< T >::CQuadNode::Next, NL3D::CQuadGrid< T >::CBaseNode::Prev, NL3D::CQuadGrid< T >::CQuadNode::Prev, NL3D::CQuadGrid< T >::CNode::QuadNodes, NL3D::CQuadGrid< T >::CBaseNode::Selected, and NLMISC::CObjectVector< T, EnableObjectBehavior >::size().
Referenced by NL3D::CQuadGrid< T >::clear(), NL3D::CLightingManager::eraseStaticLightedModel(), NL3D::CMiniCol::removeLandScapePart(), NL3D::CVisualCollisionManager::removeMeshCollision(), NL3D::CShadowPolyReceiver::removeTriangle(), NL3D::CLandscape::removeZone(), and NL3D::CClipTrav::unregisterCluster().
| const NLMISC::CMatrix& NL3D::CQuadGrid< T >::getBasis | ( | ) | const [inline] |
Definition at line 137 of file quad_grid.h.
Referenced by NL3D::CStaticQuadGrid< T >::build().
| float NL3D::CQuadGrid< T >::getEltSize | ( | ) | const [inline] |
Definition at line 139 of file quad_grid.h.
Referenced by NL3D::CStaticQuadGrid< T >::build().
| uint NL3D::CQuadGrid< T >::getSize | ( | void | ) | const [inline] |
Definition at line 138 of file quad_grid.h.
Referenced by NL3D::CStaticQuadGrid< T >::build().
| void NL3D::CQuadGrid< T >::initCons | ( | ) | [inline, private] |
Definition at line 494 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_ChangeBasis, NL3D::CQuadGrid< T >::create(), and NLMISC::CMatrix::identity().
Referenced by NL3D::CQuadGrid< T >::CQuadGrid().
| void NL3D::CQuadGrid< T >::initSelectStamps | ( | ) | const [inline, private] |
Definition at line 309 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::buildSelectionShape(), and NL3D::CQuadGrid< T >::selectRay().
| CQuadGrid< T >::CIterator NL3D::CQuadGrid< T >::insert | ( | const NLMISC::CVector & | bboxmin, | |
| const NLMISC::CVector & | bboxmax, | |||
| const T & | val | |||
| ) | [inline] |
Insert a new element in the container.
Speed is in O(1 * L*H) where L*H is the number of squares surrounded by the element
Warning! : bboxmin and bboxmax are multiplied by matrix setuped by changeBase. This work for any matrix with 90deg rotations (min and max are recomputed internally), but not with any rotation (43° ...) because of the nature of AABBox. To do this correclty you should compute the bbox min and max in the basis given in changeBase, and insert() with multiplying min and max with inverse of this basis. eg: CMatrix base= getSomeBase(); CMatrix invBase= base.inverted(); // create quadGrid. CQuadGrid<CTriangle> quadGrid; quadGrid.changeBase(base); quadGrid.create(...); // Insert a triangle tri correctly CAABBox bbox; bbox.setCenter(base * tri.V0); bbox.extend(base * tri.V1); bbox.extend(base * tri.V2); quadGrid.insert(invBase*bbox.getMin(), invBase*bbox.getMax(), tri);
| bboxmin | is the corner of the bounding box of the element to insert with minimal coordinates. | |
| bboxmax | is the corner of the bounding box of the element to insert with maximal coordinates. | |
| val | is a reference on the value to insert. |
Definition at line 669 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_ChangeBasis, NL3D::CQuadGrid< T >::_Grid, NL3D::CQuadGrid< T >::_NodeBlockMemory, NL3D::CQuadGrid< T >::_Size, NL3D::CQuadGrid< T >::_SizePower, NL3D::CQuadGrid< T >::_UnSelectedList, NLMISC::CBlockMemory< T, __ctor_dtor__ >::allocate(), NL3D::CQuadGrid< T >::CIterator, NL3D::CQuadGrid< T >::CNode::Elt, NL3D::CQuadGrid< T >::linkToRoot(), NL3D::CQuadGrid< T >::CQuadNode::Next, NL3D::CQuadGrid< T >::CBaseNode::Next, nlassert, NL3D::CQuadGrid< T >::CQuadNode::Prev, NL3D::CQuadGrid< T >::CNode::QuadNodes, NLMISC::CObjectVector< T, EnableObjectBehavior >::resize(), NL3D::CQuadGrid< T >::CBaseNode::Selected, and NL3D::CQuadGrid< T >::selectQuads().
Referenced by NL3D::CLightingManager::addDynamicLight(), NL3D::CMiniCol::addFaces(), NL3D::CVisualCollisionManager::addMeshInstanceCollision(), NL3D::CShadowMapManager::addShadowReceiver(), NL3D::CShadowPolyReceiver::addTriangle(), NL3D::CLandscape::addZone(), NL3D::CZoneLighter::compilePointLightRT(), NL3D::CInstanceLighter::compilePointLightRT(), NL3D::CInstanceLighter::computeSunContribution(), NL3D::CLightingManager::insertStaticLightedModel(), NL3D::CZoneLighter::makeQuadGridFromWaterShapes(), NL3D::CCubeGrid< TCell >::project(), and NL3D::CClipTrav::registerCluster().
| void NL3D::CQuadGrid< T >::linkToRoot | ( | CBaseNode & | root, | |
| CBaseNode * | ptr | |||
| ) | [inline, private] |
Definition at line 300 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< CPatchIdentEx >::addToSelection(), NL3D::CQuadGrid< T >::clearSelection(), NL3D::CQuadGrid< T >::insert(), NL3D::CQuadGrid< T >::operator=(), and NL3D::CQuadGrid< T >::selectAll().
| CQuadGrid< T > & NL3D::CQuadGrid< T >::operator= | ( | const CQuadGrid< T > & | o | ) | [inline] |
Definition at line 501 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_ChangeBasis, NL3D::CQuadGrid< T >::_EltSize, NL3D::CQuadGrid< T >::_Grid, NL3D::CQuadGrid< T >::_NodeBlockMemory, NL3D::CQuadGrid< T >::_SelectedList, NL3D::CQuadGrid< T >::_Size, NL3D::CQuadGrid< T >::_UnSelectedList, NLMISC::CBlockMemory< T, __ctor_dtor__ >::allocate(), NL3D::CQuadGrid< T >::create(), NL3D::CQuadGrid< T >::CNode::Elt, NL3D::CQuadGrid< T >::linkToRoot(), NL3D::CQuadGrid< T >::CQuadNode::Next, NL3D::CQuadGrid< T >::CBaseNode::Next, nlassert, NL3D::CQuadGrid< T >::CQuadNode::Node, NL3D::CQuadGrid< T >::CQuadNode::Prev, NL3D::CQuadGrid< T >::CNode::QuadNodes, NLMISC::CObjectVector< T, EnableObjectBehavior >::resize(), NL3D::CQuadGrid< T >::CBaseNode::Selected, and NLMISC::CObjectVector< T, EnableObjectBehavior >::size().
Referenced by NL3D::CQuadGrid< T >::CQuadGrid().
| void NL3D::CQuadGrid< T >::select | ( | const TSelectionShape & | shape | ) | [inline] |
Select element intersecting a selection shape.
Clear the selection first.
Definition at line 843 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_Grid, NL3D::CQuadGrid< T >::addQuadNodeToSelection(), and NL3D::CQuadGrid< T >::clearSelection().
| void NL3D::CQuadGrid< T >::select | ( | const NLMISC::CVector & | bboxmin, | |
| const NLMISC::CVector & | bboxmax | |||
| ) | [inline] |
Select element intersecting a bounding box.
Clear the selection first. Speed is in O(Nelts * L*H), where L*H is the number of squares surrounded by the selection
| bboxmin | is the corner of the bounding box used to select | |
| bboxmax | is the corner of the bounding box used to select |
Definition at line 779 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_ChangeBasis, NL3D::CQuadGrid< T >::_Grid, NL3D::CQuadGrid< T >::_Size, NL3D::CQuadGrid< T >::_SizePower, NL3D::CQuadGrid< T >::addQuadNodeToSelection(), NL3D::CQuadGrid< T >::clearSelection(), and NL3D::CQuadGrid< T >::selectQuads().
Referenced by NL3D::CLightingManager::addDynamicLight(), NL3D::CStaticQuadGrid< T >::build(), NL3D::CLandscape::buildPatchBlocksInBBox(), NL3D::CLandscape::buildTrianglesInBBox(), NL3D::CZoneLighter::compilePointLightRT(), NL3D::CInstanceLighter::compilePointLightRT(), NL3D::CLandscape::computeDynamicLighting(), NL3D::CInstanceLighter::computeSunContribution(), NL3D::CZoneLighter::computeTileFlagsForPositionTowardWater(), NL3D::CScene::findCameraClusterSystemFromRay(), NL3D::CClipTrav::fullSearch(), NL3D::CVisualCollisionManager::getCameraCollision(), NL3D::CShadowPolyReceiver::getCameraCollision(), NL3D::CLightingManager::getDynamicPointLightList(), NL3D::CMiniCol::getFaces(), NL3D::CMiniCol::getGroundNormal(), NL3D::CVisualCollisionManager::getMeshs(), NL3D::CVisualCollisionManager::getRayCollision(), NL3D::CInstanceLighter::processIGPointLightRT(), NL3D::CZoneLighter::processZonePointLightRT(), NL3D::CVisualCollisionManager::receiveShadowMap(), NL3D::CMiniCol::removeLandScapePart(), NL3D::CLandscape::removeZone(), NL3D::CShadowPolyReceiver::render(), NL3D::CShadowMapManager::renderProject(), NL3D::CShadowPolyReceiver::selectPolygon(), NL3D::CMiniCol::snapToGround(), and NL3D::CClipTrav::traverse().
| void NL3D::CQuadGrid< T >::selectAll | ( | ) | [inline] |
Select all the container.
Speed is in O(Nelts)
Definition at line 755 of file quad_grid.h.
References NL3D::CQuadGrid< T >::_SelectedList, NL3D::CQuadGrid< T >::_UnSelectedList, NL3D::CQuadGrid< T >::linkToRoot(), NL3D::CQuadGrid< T >::CBaseNode::Next, and NL3D::CQuadGrid< T >::CBaseNode::Selected.
Referenced by NL3D::CQuadGrid< T >::clear().
| void NL3D::CQuadGrid< T >::selectQuads | ( | CVector | bmin, | |
| CVector | bmax, | |||
| sint & | x0, | |||
| sint & | x1, | |||
| sint & | y0, | |||
| sint & | y1 | |||
| ) | [inline, private] |
Definition at line 323 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::insert(), and NL3D::CQuadGrid< T >::select().
| void NL3D::CQuadGrid< T >::selectRay | ( | const NLMISC::CVector & | rayStart, | |
| const NLMISC::CVector & | rayEnd | |||
| ) | [inline] |
Definition at line 854 of file quad_grid.h.
References NL3D::CQuadGridBase::_AlreadySelected, NL3D::CQuadGrid< T >::_ChangeBasis, NL3D::CQuadGrid< T >::_EltSize, NL3D::CQuadGrid< T >::_Grid, NL3D::CQuadGridBase::_SelectStamp, NL3D::CQuadGrid< T >::_Size, NL3D::CQuadGrid< T >::_SizePower, NL3D::CQuadGrid< T >::addQuadNodeToSelection(), NL3D::CQuadGrid< T >::clearSelection(), NL3D::CQuadGrid< T >::initSelectStamps(), NLMISC::CGridTraversal::startTraverse(), NLMISC::CGridTraversal::traverse(), NLMISC::CVector::x, and NLMISC::CVector::y.
Referenced by NL3D::CShadowPolyReceiver::getCameraCollision().
friend class CIterator [friend] |
Definition at line 91 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::begin(), NL3D::CQuadGrid< T >::end(), NL3D::CQuadGrid< T >::erase(), and NL3D::CQuadGrid< T >::insert().
NLMISC::CMatrix NL3D::CQuadGrid< T >::_ChangeBasis [private] |
Definition at line 285 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::buildSelectionShape(), NL3D::CQuadGrid< T >::changeBase(), NL3D::CQuadGrid< CPatchIdentEx >::getBasis(), NL3D::CQuadGrid< T >::initCons(), NL3D::CQuadGrid< T >::insert(), NL3D::CQuadGrid< T >::operator=(), NL3D::CQuadGrid< T >::select(), and NL3D::CQuadGrid< T >::selectRay().
float NL3D::CQuadGrid< T >::_EltSize [private] |
Definition at line 284 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::buildSelectionShape(), NL3D::CQuadGrid< T >::create(), NL3D::CQuadGrid< CPatchIdentEx >::getEltSize(), NL3D::CQuadGrid< T >::operator=(), NL3D::CQuadGrid< CPatchIdentEx >::selectQuads(), and NL3D::CQuadGrid< T >::selectRay().
std::vector<CQuadNode> NL3D::CQuadGrid< T >::_Grid [private] |
Definition at line 281 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::create(), NL3D::CQuadGrid< CPatchIdentEx >::initSelectStamps(), NL3D::CQuadGrid< T >::insert(), NL3D::CQuadGrid< T >::operator=(), NL3D::CQuadGrid< T >::select(), NL3D::CQuadGrid< T >::selectRay(), and NL3D::CQuadGrid< T >::~CQuadGrid().
NLMISC::CBlockMemory<CNode> NL3D::CQuadGrid< T >::_NodeBlockMemory [private] |
Definition at line 290 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::erase(), NL3D::CQuadGrid< T >::insert(), and NL3D::CQuadGrid< T >::operator=().
CBaseNode NL3D::CQuadGrid< T >::_SelectedList [private] |
Definition at line 287 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< CPatchIdentEx >::addToSelection(), NL3D::CQuadGrid< T >::begin(), NL3D::CQuadGrid< T >::clear(), NL3D::CQuadGrid< T >::clearSelection(), NL3D::CQuadGrid< T >::operator=(), and NL3D::CQuadGrid< T >::selectAll().
sint NL3D::CQuadGrid< T >::_Size [private] |
Definition at line 282 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::buildSelectionShape(), NL3D::CQuadGrid< T >::create(), NL3D::CQuadGrid< CPatchIdentEx >::getSize(), NL3D::CQuadGrid< T >::insert(), NL3D::CQuadGrid< T >::operator=(), NL3D::CQuadGrid< T >::select(), NL3D::CQuadGrid< CPatchIdentEx >::selectQuads(), and NL3D::CQuadGrid< T >::selectRay().
sint NL3D::CQuadGrid< T >::_SizePower [private] |
Definition at line 283 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::buildSelectionShape(), NL3D::CQuadGrid< T >::create(), NL3D::CQuadGrid< T >::insert(), NL3D::CQuadGrid< T >::select(), and NL3D::CQuadGrid< T >::selectRay().
CBaseNode NL3D::CQuadGrid< T >::_UnSelectedList [private] |
Definition at line 288 of file quad_grid.h.
Referenced by NL3D::CQuadGrid< T >::clear(), NL3D::CQuadGrid< T >::clearSelection(), NL3D::CQuadGrid< T >::insert(), NL3D::CQuadGrid< T >::operator=(), and NL3D::CQuadGrid< T >::selectAll().
1.6.1