VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
spatialVrfObjectManagerOctree.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 #include "geometry/extent.h"
10 
11 template<class T> class DtOctree;
12 
16 
18 {
19 private:
21 
26 public:
28 
30 
32  virtual void addVrfObjects(const DtManagedObjectListConstPtr& vrfObjects);
33 
37  virtual void removeVrfObject(const DtSimObject * vrfObject);
38 
40  virtual bool setResolutions(unsigned int xRes, unsigned int yRes,
41  unsigned int zRes);
42 
45  virtual void clearVrfObjects();
46 
57  virtual void reset(const DtManagedObjectListConstPtr& vrfObjects);
58 
59 
62 
71 
72  virtual bool getVrfObjects(const DtExtent& extent, DtVrfConstObjectUniqueContainer& objects) const;
73 
74  virtual bool getVrfObjects(DtVrfObjectPredicate& predicate, const DtExtent& extent,
75  DtVrfConstObjectUniqueContainer& objects) const;
76 
77  virtual bool getVrfObjects(DtChord& chord, std::list<const DtSimObject*>& objects) const;
78 
79  virtual bool getVrfObjects(DtVrfObjectPredicate& predicate, DtChord& chord,
80  std::list<const DtSimObject*>& objects) const;
82 
93 
94  virtual void visitVrfObjects(const DtExtent& extent, DtSpatialSelectionFunctor &callback) const;
95  virtual void visitVrfObjects(const DtChord& chord, DtSpatialSelectionFunctor& callback) const;
96 
97  unsigned int numObjects() const
98  {
99  return myOctree->numObjects();
100  }
101 protected:
102 
105 
108 };
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
std::vector< const DtSimObject * > DtVrfConstObjectUniqueContainer
Definition: spatialVrfObjectManager.h:94
virtual void visitVrfObjects(const DtExtent &extent, DtSpatialSelectionFunctor &callback) const =0
Functions that call the specified functor for every object intersecting the requested region (whether...
virtual bool getVrfObjects(const DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const =0
DtExtent myRootExtent
The extent of the octree.
Definition: spatialVrfObjectManagerOctree.h:104
The DtSpatialVrfObjectManager is responsible for maintaining a spatial organization of all specified ...
Definition: spatialVrfObjectManager.h:31
DtOctree class.
Definition: octree.h:560
virtual void reset(const DtManagedObjectListConstPtr &vrfObjects)=0
Clears out the current DtSimObjects, sets it to have the minimum extent, that contains all of the DtS...
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
virtual void removeVrfObject(const DtSimObject *vrfObject)=0
Removes vrfObject from the set of vrfObjects we are maintaining.
DtOctree< const DtSimObject > * myOctree
The octree being used to store the objects.
Definition: spatialVrfObjectManagerOctree.h:107
Contains the DtVrfObjectPredicate class declaration.
Definition: vrfObjectPredicate.h:20
unsigned int numObjects() const
Number of objects in the octree.
Definition: spatialVrfObjectManagerOctree.h:97
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Spatial object manager which uses an octree. This manager behaves better than the spatial subdivision...
Definition: spatialVrfObjectManagerOctree.h:17
Abstract interface for a spatial object manager.
Definition: spatialVrfObjectManager.h:43
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
virtual void clearVrfObjects()=0
Clears all managed objects from the manager. Does not affect the spatial container, other than to empty its cells of any elements.
Contains the declaration of the DtExtent class.
virtual bool setResolutions(unsigned int xRes, unsigned int yRes, unsigned int zRes)=0
Deprecated – doesn&#39;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.
DtBoost::shared_ptr< const DtManagedObjectList > DtManagedObjectListConstPtr
Typedef for a shared pointer to a const DtOrgViewManagedObjectList. These lists are used within VR-Fo...
Definition: managedObjectList.h:35
virtual void addVrfObjects(const DtManagedObjectListConstPtr &vrfObjects)=0
Spatially sorts the vrfObjects associated in the vrfObjects.

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)