VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtVrfModelManager Class Reference

This class will load and parse models for their articulated parts. More...

Inheritance diagram for DtVrfModelManager:
Inheritance graph
[legend]

Classes

struct  ModelInformation
 Since models can have multiple model definitions now, need to read them all in when looking at a definition for an entity, and, optionally return the definition and any offsets to apply to it. More...
 

Public Types

typedef std::map< int,
DtVrfModelArticulatedPart
ArticulatedParts
 Returns the articulated part mappings for the given entity type. More...
 
typedef std::map< int,
std::vector< int > > 
ModelStates
 Returns a list of potential model states and their state (i.e. lights, etc) More...
 

Public Member Functions

 DtVrfModelManager (makVrv::DtDe *de=0)
 
virtual ~DtVrfModelManager ()
 
virtual bool loadVisuals (const DtScenarioExplorer &, bool force=false)
 Loads the visuals from the given simulation model set and appData directory as defined in DtAppPathResolver. More...
 
virtual DtFilename modelFilename (const DtEntityType &)
 Returns the model file used for the given model. More...
 
virtual ArticulatedParts articulatedPartsFor (const DtEntityType &)
 
virtual ArticulatedParts articulatedPartsFor (const DtFilename &, const DtVector &positionOffset=DtVector::zero(), const DtTaitBryan &orientationOffset=DtTaitBryan(), const DtFilename &source=DtFilename())
 Return the articulated parts of the model referenced by the filename. More...
 
virtual std::vector
< ModelInformation
modelDefinitionsFor (const DtEntityType &objectType) const
 Returns the model definition for the given entity type. More...
 
virtual makVrv::DtModelDefinitionmodelDefinitionFromFilename (const DtFilename &)
 
virtual ModelStates modelStatesFor (const DtEntityType &objectType)
 
virtual ModelStates modelStatesFor (const DtFilename &f)
 

Protected Types

typedef std::set< DtFilename > SimulationModelSetVisuals
 
typedef std::map< std::string,
ArticulatedParts
ArticulatedPartsByFilename
 
typedef std::map< std::string,
std::string > 
ModelDefinitionsByFilename
 
typedef std::map< std::string,
ModelStates
ModelStatesByFilename
 

Protected Member Functions

virtual bool loadVisuals (DtSimulationModelSet *)
 Loads visuals from the given SMS. More...
 
virtual bool load (const DtFilename &directory, const DtString &root)
 
virtual bool load (const DtFilename &original, const DtString &root, int type)
 
virtual bool loadMapper (const DtFilename &original, const DtString &root, int mapType)
 
virtual void removeMappings (makVrv::DtEntityTypeMapper &mapper, const makArchives::DtEntityTypeMappingRecord &record) const
 
virtual void updateUnknowns ()
 
virtual bool isUnknown (std::vector< std::string >) const
 
virtual DtVrfModelArticulatedPart articulatedPartInformationFor (int part, DtVrfOsgArticulatedModel &, const DtVector &positionOffset=DtVector::zero(), const DtTaitBryan &orientationOffset=DtTaitBryan()) const
 
virtual void fillInModelInformationFor (const DtFilename &original, const DtVector &positionOffset=DtVector::zero(), const DtTaitBryan &orientationOffset=DtTaitBryan(), const DtFilename &source=DtFilename())
 

Protected Attributes

makVrv::DtDemyDe
 
bool myOwnsDe
 
SimulationModelSetVisuals mySimulationModelSetVisuals
 
ArticulatedPartsByFilename myArticulatedPartsByFilename
 
ModelDefinitionsByFilename myModelDefinitionsByFilename
 
ModelStatesByFilename myModelStatesByFilename
 
std::set< std::string > myUnknowns
 
tbb::mutex myMutex
 

Private Member Functions

 DtVrfModelManager (const DtVrfModelManager &)
 Not Implemented. More...
 
DtVrfModelManageroperator= (const DtVrfModelManager &)
 

Detailed Description

This class will load and parse models for their articulated parts.

The manager is initialized with an optional de. If there is no de specified it will create it's own simple singleton de and load visuals for the given simulation model set. If it is supplied with a de it is assumed that de already has the appropriate visuals loaded.

Member Typedef Documentation

Returns the articulated part mappings for the given entity type.

typedef std::map<int, std::vector<int> > DtVrfModelManager::ModelStates

Returns a list of potential model states and their state (i.e. lights, etc)

typedef std::set<DtFilename> DtVrfModelManager::SimulationModelSetVisuals
protected
typedef std::map<std::string, ArticulatedParts> DtVrfModelManager::ArticulatedPartsByFilename
protected
typedef std::map<std::string, std::string> DtVrfModelManager::ModelDefinitionsByFilename
protected
typedef std::map<std::string, ModelStates> DtVrfModelManager::ModelStatesByFilename
protected

Constructor & Destructor Documentation

DtVrfModelManager::DtVrfModelManager ( const DtVrfModelManager )
private

Not Implemented.

DtVrfModelManager::DtVrfModelManager ( makVrv::DtDe de = 0)
virtual DtVrfModelManager::~DtVrfModelManager ( )
virtual

Member Function Documentation

DtVrfModelManager& DtVrfModelManager::operator= ( const DtVrfModelManager )
private
virtual bool DtVrfModelManager::loadVisuals ( const DtScenarioExplorer ,
bool  force = false 
)
virtual

Loads the visuals from the given simulation model set and appData directory as defined in DtAppPathResolver.

If this object owns the de, will delete and recreate if visuals need to be reloaded. Set force to true to load (or reload) visuals even if de is not owned

virtual DtFilename DtVrfModelManager::modelFilename ( const DtEntityType &  )
virtual

Returns the model file used for the given model.

virtual ArticulatedParts DtVrfModelManager::articulatedPartsFor ( const DtEntityType &  )
virtual
virtual ArticulatedParts DtVrfModelManager::articulatedPartsFor ( const DtFilename &  ,
const DtVector positionOffset = DtVector::zero(),
const DtTaitBryan &  orientationOffset = DtTaitBryan(),
const DtFilename &  source = DtFilename() 
)
virtual

Return the articulated parts of the model referenced by the filename.

The offsets supplied will only apply to parent parts (the positionOffset must be body centric). Sub parts will not have the offsets applied

virtual std::vector<ModelInformation> DtVrfModelManager::modelDefinitionsFor ( const DtEntityType &  objectType) const
virtual

Returns the model definition for the given entity type.

virtual makVrv::DtModelDefinition* DtVrfModelManager::modelDefinitionFromFilename ( const DtFilename &  )
virtual
virtual ModelStates DtVrfModelManager::modelStatesFor ( const DtEntityType &  objectType)
virtual
virtual ModelStates DtVrfModelManager::modelStatesFor ( const DtFilename &  f)
virtual
virtual bool DtVrfModelManager::loadVisuals ( DtSimulationModelSet )
protectedvirtual

Loads visuals from the given SMS.

virtual bool DtVrfModelManager::load ( const DtFilename &  directory,
const DtString root 
)
protectedvirtual
virtual bool DtVrfModelManager::load ( const DtFilename &  original,
const DtString root,
int  type 
)
protectedvirtual
virtual bool DtVrfModelManager::loadMapper ( const DtFilename &  original,
const DtString root,
int  mapType 
)
protectedvirtual
virtual void DtVrfModelManager::removeMappings ( makVrv::DtEntityTypeMapper mapper,
const makArchives::DtEntityTypeMappingRecord record 
) const
protectedvirtual
virtual void DtVrfModelManager::updateUnknowns ( )
protectedvirtual
virtual bool DtVrfModelManager::isUnknown ( std::vector< std::string >  ) const
protectedvirtual
virtual DtVrfModelArticulatedPart DtVrfModelManager::articulatedPartInformationFor ( int  part,
DtVrfOsgArticulatedModel ,
const DtVector positionOffset = DtVector::zero(),
const DtTaitBryan &  orientationOffset = DtTaitBryan() 
) const
protectedvirtual
virtual void DtVrfModelManager::fillInModelInformationFor ( const DtFilename &  original,
const DtVector positionOffset = DtVector::zero(),
const DtTaitBryan &  orientationOffset = DtTaitBryan(),
const DtFilename &  source = DtFilename() 
)
protectedvirtual

Member Data Documentation

makVrv::DtDe* DtVrfModelManager::myDe
protected
bool DtVrfModelManager::myOwnsDe
protected
SimulationModelSetVisuals DtVrfModelManager::mySimulationModelSetVisuals
protected
ArticulatedPartsByFilename DtVrfModelManager::myArticulatedPartsByFilename
protected
ModelDefinitionsByFilename DtVrfModelManager::myModelDefinitionsByFilename
protected
ModelStatesByFilename DtVrfModelManager::myModelStatesByFilename
protected
std::set<std::string> DtVrfModelManager::myUnknowns
protected
tbb::mutex DtVrfModelManager::myMutex
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)