Home | nevrax.com |
|
NL3D::CQuadGrid Class Template ReferenceThis container is a simple grid, used to quickly find elements. More...
Detailed Descriptiontemplate<class T>
This container is a simple grid, used to quickly find elements.
|
|
Default constructor, use axes XY!!!, has a size of 16, and EltSize is 1.
Definition at line 412 of file 3d/quad_grid.h. References _ChangeBasis, _EltSize, _Size, _SizePower, and NLMISC::CMatrix::identity. |
|
dtor.
Definition at line 421 of file 3d/quad_grid.h. |
|
Definition at line 322 of file 3d/quad_grid.h. Referenced by select. |
|
Definition at line 303 of file 3d/quad_grid.h. Referenced by NL3D::CQuadGrid< CWaterShape * >::addQuadNodeToSelection. |
|
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 641 of file 3d/quad_grid.h. References _SelectedList, CIterator, and NL3D::CQuadGrid::CBaseNode::Next. Referenced by clear. |
|
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);
Definition at line 428 of file 3d/quad_grid.h. References _ChangeBasis. |
|
Clear the container. Elements are deleted, but the quadgrid is not erased. Speed is in O(Nelts) Definition at line 454 of file 3d/quad_grid.h. References _SelectedList, _UnSelectedList, begin, CIterator, end, erase, NL3D::CQuadGrid::CBaseNode::Next, and selectAll. Referenced by create, and ~CQuadGrid. |
|
Clear the selection list Speed is in O(Nelts).
Definition at line 567 of file 3d/quad_grid.h. References _SelectedList, _UnSelectedList, linkToRoot, and NL3D::CQuadGrid::CBaseNode::Next. Referenced by select. |
|
Init the container. container is first clear() ed.
Definition at line 433 of file 3d/quad_grid.h. References _EltSize, _Grid, _NodeListBlockMemory, _Size, _SizePower, clear, NLMISC::getPowerOf2, and nlassert. |
|
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 646 of file 3d/quad_grid.h. References CIterator. Referenced by clear. |
|
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.
Referenced by clear. |
|
Definition at line 119 of file 3d/quad_grid.h. |
|
Definition at line 121 of file 3d/quad_grid.h. |
|
Definition at line 120 of file 3d/quad_grid.h. |
|
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 90° 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);
Definition at line 516 of file 3d/quad_grid.h. References _ChangeBasis, _Grid, _NodeBlockMemory, _Size, _SizePower, _UnSelectedList, NLMISC::CBlockMemory< CNode >::allocate, CIterator, linkToRoot, selectQuads, x, and y. |
|
Definition at line 251 of file 3d/quad_grid.h. Referenced by NL3D::CQuadGrid< CWaterShape * >::addToSelection, clearSelection, insert, and selectAll. |
|
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
Definition at line 613 of file 3d/quad_grid.h. References _ChangeBasis, _Grid, _Size, _SizePower, addQuadNodeToSelection, clearSelection, selectQuads, x, and y. |
|
Select all the container. Speed is in O(Nelts) Definition at line 589 of file 3d/quad_grid.h. References _SelectedList, _UnSelectedList, linkToRoot, and NL3D::CQuadGrid::CBaseNode::Next. Referenced by clear. |
|
Definition at line 261 of file 3d/quad_grid.h. |
|
Definition at line 81 of file 3d/quad_grid.h. |
|
Definition at line 238 of file 3d/quad_grid.h. Referenced by changeBase, CQuadGrid, NL3D::CQuadGrid< CWaterShape * >::getBasis, insert, and select. |
|
Definition at line 237 of file 3d/quad_grid.h. Referenced by CQuadGrid, create, NL3D::CQuadGrid< CWaterShape * >::getEltSize, and NL3D::CQuadGrid< CWaterShape * >::selectQuads. |
|
Definition at line 234 of file 3d/quad_grid.h. Referenced by create, insert, select, and ~CQuadGrid. |
|
Definition at line 243 of file 3d/quad_grid.h. Referenced by insert. |
|
Definition at line 245 of file 3d/quad_grid.h. Referenced by create. |
|
Definition at line 240 of file 3d/quad_grid.h. Referenced by begin, clear, clearSelection, and selectAll. |
|
Definition at line 235 of file 3d/quad_grid.h. Referenced by CQuadGrid, create, NL3D::CQuadGrid< CWaterShape * >::getSize, insert, select, and NL3D::CQuadGrid< CWaterShape * >::selectQuads. |
|
Definition at line 236 of file 3d/quad_grid.h. |
|
Definition at line 241 of file 3d/quad_grid.h. Referenced by clear, clearSelection, insert, and selectAll. |