![]() |
VR-Forces 4.7 Class Documentation
|
Implementation of a spatial object manager based on DtSpatialSubdivision. More...

Public Types | |
| typedef DtSpatialSubdivision < DtVrfObject * > | DtSpatialContainer |
| typedef std::vector < DtVrfObject * > | DtNonSpatialContainer |
| typedef DtNonSpatialContainer::iterator | DtNonSpatialVrfObjectIter |
| typedef DtNonSpatialContainer::const_iterator | DtNonSpatialVrfObjectConstIter |
Public Types inherited from DtSpatialVrfObjectManagerInterface | |
| typedef boost::unordered_set < DtVrfObject * > | DtVrfObjectUniqueContainer |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| typedef boost::unordered_set < const DtVrfObject * > | DtVrfConstObjectUniqueContainer |
| typedef std::list< DtVrfObject * > | DtVrfObjectContainer |
Public Member Functions | |
| DtSpatialVrfObjectManager (unsigned int xRes=1, unsigned int yRes=1, unsigned int zRes=1) | |
| Constructor Creates a default container, with a single cell unless the resolutions are otherwise specified. | |
| virtual | ~DtSpatialVrfObjectManager () |
| Destructor. | |
| virtual bool | initialize (const DtManagedObjectListConstPtr &vrfObjects, unsigned int cellCountX, unsigned int cellCountY, unsigned int cellCountZ) |
| Initializes the spatial object manager. | |
| virtual void | addVrfObjects (const DtManagedObjectListConstPtr &vrfObjects) |
| Spatially sorts the vrfObjects associated in the vrfObjects. | |
| virtual void | removeVrfObject (DtVrfObject *vrfObject) |
| Removes vrfObject from the set of vrfObjects we are maintaining. | |
| virtual void | clearVrfObjects () |
| Clears all managed objects from the manager. | |
| virtual bool | setResolutions (unsigned int xRes, unsigned int yRes, unsigned int zRes) |
| Deprecated – doesn't apply to octree manager. | |
| virtual unsigned int | xResolution () const |
| virtual unsigned int | yResolution () const |
| virtual unsigned int | zResolution () const |
| virtual void | resolutions (unsigned int &xRes, unsigned int &yRes, unsigned int &zRes) const |
| virtual void | reset (const DtManagedObjectListConstPtr &vrfObjects) |
| Clears out the current subdivision, sets it to have the minimum extent, that contains all of the DtVrfObjects specified, and adds the specified DtVrfObjects. | |
| bool | getVrfObjects (const DtExtent &extent, DtVrfObjectUniqueContainer &objects) |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (const DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const |
| bool | getVrfObjects (DtVrfObjectPredicate &predicate, const DtExtent &extent, DtVrfObjectUniqueContainer &objects) |
| bool | getVrfObjects (DtVrfObjectPredicate &predicate, const DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const |
| bool | getVrfObjects (DtChord &chord, std::list< DtVrfObject * > &objects) |
| bool | getVrfObjects (DtChord &chord, std::list< const DtVrfObject * > &objects) const |
| bool | getVrfObjects (DtVrfObjectPredicate &predicate, DtChord &chord, std::list< DtVrfObject * > &objects) |
| bool | getVrfObjects (DtVrfObjectPredicate &predicate, DtChord &chord, std::list< const DtVrfObject * > &objects) const |
| void | visitVrfObjects (const DtExtent &extent, DtSpatialSelectionFunctor &callback) const |
| Functions that call the specified functor for every object intersecting the requested region (whether chord or extent). | |
| void | visitVrfObjects (const DtChord &chord, DtSpatialSelectionFunctor &callback) const |
| virtual const DtSpatialContainer * | spatialContainer () const |
| virtual DtSpatialContainer * | spatialContainer () |
| virtual const DtNonSpatialContainer * | nonSpatiallyOrganizedObjects () const |
| virtual DtNonSpatialContainer * | nonSpatiallyOrganizedObjects () |
Public Member Functions inherited from DtSpatialVrfObjectManagerInterface | |
| virtual | ~DtSpatialVrfObjectManagerInterface () |
Protected Member Functions | |
| virtual bool | createSpatialContainer (const DtExtent &extent, unsigned int cellCountX, unsigned int cellCountY, unsigned int cellCountZ) |
| Creates an empty spatial container with the specified extent and resolution. | |
| virtual void | setExtent (const DtManagedObjectListConstPtr &vrfObjects) |
| Updates the spatial container's extent to encompasses all the vrfObjects specified by the vrfObject iterator. | |
| virtual void | expandExtent (const DtManagedObjectListConstPtr &vrfObjects, DtExtent &expandedExtent) const |
| Expands the specified extent to include all the extents of all vrfObjects specified in the vrfObject iterator. | |
| bool | testInvariant () const |
Protected Attributes | |
| DtSpatialContainer * | myVrfObjectSpatialContainer |
| Spatial container of DtVrfObjects. | |
| DtNonSpatialContainer | myNonSpatiallyOrganizedObjects |
| Container of objects that fall outside of the spatial subdivision. | |
Private Member Functions | |
| DtSpatialVrfObjectManager (const DtSpatialVrfObjectManager &original) | |
| Copy constructor and assignment operator not implemented. | |
| DtSpatialVrfObjectManager & | operator= (const DtSpatialVrfObjectManager &original) |
Implementation of a spatial object manager based on DtSpatialSubdivision.
| typedef std::vector<DtVrfObject*> DtSpatialVrfObjectManager::DtNonSpatialContainer |
| typedef DtNonSpatialContainer::iterator DtSpatialVrfObjectManager::DtNonSpatialVrfObjectIter |
| typedef DtNonSpatialContainer::const_iterator DtSpatialVrfObjectManager::DtNonSpatialVrfObjectConstIter |
| DtSpatialVrfObjectManager::DtSpatialVrfObjectManager | ( | unsigned int | xRes = 1, |
| unsigned int | yRes = 1, |
||
| unsigned int | zRes = 1 |
||
| ) |
Constructor Creates a default container, with a single cell unless the resolutions are otherwise specified.
|
virtual |
Destructor.
|
private |
Copy constructor and assignment operator not implemented.
|
private |
|
virtual |
Initializes the spatial object manager.
This includes creating and initializing spatial container managed by this class
Must be called immediately after creation and before any operations are performed or the container used in any way.
|
virtual |
Spatially sorts the vrfObjects associated in the vrfObjects.
Implements DtSpatialVrfObjectManagerInterface.
|
virtual |
Removes vrfObject from the set of vrfObjects we are maintaining.
| vrfObject | Pointer to the object to be removed. |
Implements DtSpatialVrfObjectManagerInterface.
|
virtual |
Clears all managed objects from the manager.
Does not affect the spatial container, other than to empty its cells of any elements.
Implements DtSpatialVrfObjectManagerInterface.
|
virtual |
Deprecated – doesn't apply to octree manager.
Still necessary for DtSpatialVrfObjectManager. TODO need to push this all into the manager class, instead of having the DtPhysicalWorld assume that things are uniformly subdivided.
Implements DtSpatialVrfObjectManagerInterface.
|
virtual |
|
virtual |
Clears out the current subdivision, sets it to have the minimum extent, that contains all of the DtVrfObjects specified, and adds the specified DtVrfObjects.
Implements DtSpatialVrfObjectManagerInterface.
|
virtual |
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.
|
virtual |
Implements DtSpatialVrfObjectManagerInterface.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
Creates an empty spatial container with the specified extent and resolution.
|
protectedvirtual |
Updates the spatial container's extent to encompasses all the vrfObjects specified by the vrfObject iterator.
This does not insert the specified vrfObjects into the spatial container.
|
protectedvirtual |
Expands the specified extent to include all the extents of all vrfObjects specified in the vrfObject iterator.
|
protected |
|
protected |
Spatial container of DtVrfObjects.
(a pointer because it is not guaranteed to exist at construction.)
|
protected |
Container of objects that fall outside of the spatial subdivision.
This is necessary because the spatial subdivision, as configured, may not contain all the vrfObjects specified. Thus the ones that do not fit in the spatial subdivision are stored in this container.