VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtObjectGeometricModelsManager Class Reference

Manages loading and destruction of the geometric models for objects. Will reference the object parameter database to load up parameter entries to find their object model. If an entry does not have an object model associated with it, then an alternate representation object model will be constructed out of the entity's extent.

Public Member Functions

 DtObjectGeometricModelsManager (const DtSimulationServices *)
 
virtual ~DtObjectGeometricModelsManager ()
 
virtual boost::shared_ptr
< DtTerrainInterface
objectModelEntry (const DtUUID &parent) const
 
virtual boost::shared_ptr
< DtTerrainInterface
objectModelEntry (const DtObjectType &type) const
 
virtual boost::shared_ptr
< DtTerrainInterface
objectModelEntry (const DtVrfObjectParameters *, const DtEntityType &) const
 
virtual boost::shared_ptr
< DtTerrainInterface
lookupModelEntry (const DtMovingObjectParameters &) const
 
virtual boost::shared_ptr
< DtTerrainInterface
addModelEntry (const DtVrfObjectParameters *, const DtEntityType &)
 
virtual void remove (const DtMovingObjectParameters &objectType)
 
virtual void removeAll ()
 
virtual boost::shared_ptr
< DtTerrainInterface
createObjectModelEntry (const DtVrfObjectParameters *, const DtEntityType &)
 
virtual void init ()
 

Protected Types

typedef boost::unordered_map
< std::string,
boost::shared_ptr
< DtTerrainInterface > > 
DtObjectModelContainer
 
typedef
DtObjectModelContainer::iterator 
DtObjectModelIter
 
typedef
DtObjectModelContainer::const_iterator 
DtObjectModelConstIter
 

Protected Member Functions

virtual boost::shared_ptr
< DtTerrainInterface
createObjectModel (const DtFilename &, const DtEntityType &s) const
 

Protected Attributes

DtObjectModelContainer myObjectModels
 
const DtSimulationServicesmySimulationServices
 
tbb::spin_rw_mutex myObjectModelsMutex
 

Member Typedef Documentation

typedef boost::unordered_map<std::string, boost::shared_ptr<DtTerrainInterface> > DtObjectGeometricModelsManager::DtObjectModelContainer
protected
typedef DtObjectModelContainer::iterator DtObjectGeometricModelsManager::DtObjectModelIter
protected
typedef DtObjectModelContainer::const_iterator DtObjectGeometricModelsManager::DtObjectModelConstIter
protected

Constructor & Destructor Documentation

DtObjectGeometricModelsManager::DtObjectGeometricModelsManager ( const DtSimulationServices )

default constructor

virtual DtObjectGeometricModelsManager::~DtObjectGeometricModelsManager ( )
virtual

destructor

Member Function Documentation

virtual boost::shared_ptr<DtTerrainInterface> DtObjectGeometricModelsManager::objectModelEntry ( const DtUUID parent) const
virtual

Given the parent name, looks up the parent in the object manager. If model exists for that object type, returns the object model for that. If not, adds the new object model to the list and returns the new entry.

virtual boost::shared_ptr<DtTerrainInterface> DtObjectGeometricModelsManager::objectModelEntry ( const DtObjectType type) const
virtual
virtual boost::shared_ptr<DtTerrainInterface> DtObjectGeometricModelsManager::objectModelEntry ( const DtVrfObjectParameters ,
const DtEntityType &   
) const
virtual

If object model for entry does not exist, returns new object model for that type and adds it to the internal list.

virtual boost::shared_ptr<DtTerrainInterface> DtObjectGeometricModelsManager::lookupModelEntry ( const DtMovingObjectParameters ) const
virtual

Looks up and returns a model for a given type.

virtual boost::shared_ptr<DtTerrainInterface> DtObjectGeometricModelsManager::addModelEntry ( const DtVrfObjectParameters ,
const DtEntityType &   
)
virtual

Adds a new model.

virtual void DtObjectGeometricModelsManager::remove ( const DtMovingObjectParameters objectType)
virtual

Remove the entry for the given object type from the database. Deletes the memory associated with the entry.

virtual void DtObjectGeometricModelsManager::removeAll ( )
virtual

Remove all entries in the parameter database. Deletes memory associated with entries in the database.

virtual boost::shared_ptr<DtTerrainInterface> DtObjectGeometricModelsManager::createObjectModelEntry ( const DtVrfObjectParameters ,
const DtEntityType &   
)
virtual

Creates a new object model (and loads the terrain or creates a new terrain database) and returns it. Also sets the object model should delete the terrain database on deletion.

virtual void DtObjectGeometricModelsManager::init ( )
virtual
virtual boost::shared_ptr<DtTerrainInterface> DtObjectGeometricModelsManager::createObjectModel ( const DtFilename &  ,
const DtEntityType &  s 
) const
protectedvirtual

Creates a new object model from the visuals provided by the entity type. If the underlying system does not support this then no object model will be created. If the filename is empty the underlying code should use the entity type for the visuals.

Member Data Documentation

DtObjectModelContainer DtObjectGeometricModelsManager::myObjectModels
protected
const DtSimulationServices* DtObjectGeometricModelsManager::mySimulationServices
protected
tbb::spin_rw_mutex DtObjectGeometricModelsManager::myObjectModelsMutex
mutableprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)