![]() |
VR-Forces Developer's Guide
|
Spatial object manager which uses an octree. This manager behaves better than the spatial subdivision-based manager for scenarios which have uneven distribution of their entities across the available terrain.

Public Member Functions | |
| DtSpatialVrfObjectManagerOctree (const DtManagedObjectListConstPtr &vrfObjList) | |
| virtual | ~DtSpatialVrfObjectManagerOctree () override |
| virtual void | addVrfObjects (const DtManagedObjectListConstPtr &vrfObjects) override |
| virtual void | removeVrfObject (const DtSimObject *vrfObject) override |
| virtual bool | setResolutions (unsigned int xRes, unsigned int yRes, unsigned int zRes) override |
| virtual void | clearVrfObjects () override |
| virtual void | reset (const DtManagedObjectListConstPtr &vrfObjects) override |
| virtual bool | getVrfObjects (const DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const override |
| virtual bool | getVrfObjects (DtVrfObjectPredicate &predicate, const DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const |
| virtual bool | getVrfObjects (DtChord &chord, std::list< const DtSimObject * > &objects) const |
| virtual bool | getVrfObjects (DtVrfObjectPredicate &predicate, DtChord &chord, std::list< const DtSimObject * > &objects) const |
| virtual void | visitVrfObjects (const DtExtent &extent, DtSpatialSelectionFunctor &callback) const override |
| virtual void | visitVrfObjects (const DtChord &chord, DtSpatialSelectionFunctor &callback) const override |
| virtual unsigned int | numObjects () const override |
Public Member Functions inherited from DtSpatialVrfObjectManagerInterface | |
| virtual | ~DtSpatialVrfObjectManagerInterface () |
| virtual bool | getVrfObjects (const DtVrfObjectPredicate &predicate, const DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const =0 |
| virtual bool | getVrfObjects (const DtChord &chord, std::list< const DtSimObject * > &objects) const =0 |
| virtual bool | getVrfObjects (const DtVrfObjectPredicate &predicate, const DtChord &chord, std::list< const DtSimObject * > &objects) const =0 |
Protected Attributes | |
| DtExtent | myRootExtent |
| DtOctree< const DtSimObject > * | myOctree |
Private Member Functions | |
| DtSpatialVrfObjectManagerOctree () | |
| DtSpatialVrfObjectManagerOctree (const DtSpatialVrfObjectManagerOctree &orig) | |
| DtSpatialVrfObjectManagerOctree & | operator= (const DtSpatialVrfObjectManagerOctree &orig) |
Additional Inherited Members | |
Public Types inherited from DtSpatialVrfObjectManagerInterface | |
| typedef std::vector< const DtSimObject * > | DtVrfObjectUniqueContainer |
| typedef std::vector< const DtSimObject * > | DtVrfConstObjectUniqueContainer |
| typedef std::vector< const DtSimObject * > | DtVrfObjectContainer |
|
private |
Not implemented.
|
private |
Not implemented.
| DtSpatialVrfObjectManagerOctree::DtSpatialVrfObjectManagerOctree | ( | const DtManagedObjectListConstPtr & | vrfObjList | ) |
|
overridevirtual |
|
private |
Not implemented.
|
overridevirtual |
Spatially sorts the vrfObjects associated in the vrfObjects.
Implements DtSpatialVrfObjectManagerInterface.
|
overridevirtual |
Removes vrfObject from the set of vrfObjects we are maintaining.
| vrfObject | Pointer to the object to be removed. |
Implements DtSpatialVrfObjectManagerInterface.
|
overridevirtual |
Doesn't do anything. Only here for interface compatibility.
Implements DtSpatialVrfObjectManagerInterface.
|
overridevirtual |
Clears all managed objects from the manager. Does not affect the spatial container, other than to empty its cells of any elements.
Implements DtSpatialVrfObjectManagerInterface.
|
overridevirtual |
Clears out the current subdivision, sets it to have the minimum extent, that contains all of the DtSimObjects specified, and adds the specified DtSimObjects.
Implements DtSpatialVrfObjectManagerInterface.
|
overridevirtual |
Functions that call the specified functor for every object intersecting the requested region (whether chord or extent). The functor should return false while additional processing should be done, and true if processing is complete and visitVrfObjects() should return. Note that processing is not guaranteed to stop immediately when the functor returns true; it is only a recommendation that processing can stop at any time.
Implements DtSpatialVrfObjectManagerInterface.
|
overridevirtual |
Implements DtSpatialVrfObjectManagerInterface.
Number of objects in the octree.
Implements DtSpatialVrfObjectManagerInterface.
|
protected |
The extent of the octree.
|
protected |
The octree being used to store the objects.