![]() |
VR-Forces 4.5 Class Documentation
|
The DtVrfVisualsManager class is a class that allows for the loading of visuals (definitions, mappings and model definitions) for a given simulation model set. More...

Classes | |
| struct | ModelSetVisual |
| class | Visuals |
Public Types | |
| typedef boost::unordered_map < makVrv::DtSharedSimulationSettings::MapperType, DtVrfEntityTypeMapper * > | MappersMap |
Public Member Functions | |
| DtVrfVisualsManager (makVrv::DtDe &) | |
| CTOR. | |
| virtual | ~DtVrfVisualsManager () |
| DTOR. | |
| virtual bool | loadVisuals (DtSimulationModelSet *, bool createIfMissing=false, bool editMode=false) |
| Loads visuals (definitions, mappings and model defnitions) into the appropriate managers given the simulation model set. | |
| virtual bool | loadVisuals (const DtFilename &, const DtString &rootName="") |
| Loads visuals from the given directory. | |
| virtual bool | createVisuals (const DtSimulationModelSet *, bool andLoad=true, Visuals *visualsToUpgradeFrom=0, const DtFilename &sourceDefinitionsDir=DtFilename::nullFilename()) |
| Given the simulation model set, and the default model definitions, mappings and visualizers, create a subset of those in the given simulation model set directory based on .entity files in that directory. | |
| virtual bool | getSystemVisualizerDefinitionAndElementTypeMap (const DtEntityType &, makVrv::DtUnicode &, makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes &, bool exactMatch=true) |
| Given the entity type, return (from system definitions) the element map this entity type belongs to. | |
| virtual bool | isUnknown (const std::vector< makVrv::DtUnicode > &entities) const |
| Returns true if the models evaluate to "unknown" (given the list of unknown models). If any model is unknown, then all are unknown. | |
| virtual makVrv::DtUnicode | unknownString () const |
| The default "unknown" string. | |
| virtual void | updateUnknowns () |
| Adds/removes/returns unknown strings. | |
| const std::set< makVrv::DtUnicode > | unknownStrings () const |
| virtual void | clear () |
| Clears out all visuals for mappers, visualizers and model definitions. | |
| virtual void | clearSimulationModelSetVisuals () |
| Clears out only simulation model set visuals. | |
| virtual void | setupAdditionalVisualizers () |
| Set up any additional visualizers VR-Forces needs, for example, Range rings. | |
| virtual void | upgradeSpotReportsDictionary (const DtFilename &toDirectory, Visuals &, bool force=false, bool mergeAttributes=false) |
| Upgrades the spot report dictionary from entity, aggregate and tactical graphic elements. | |
| virtual bool | upgradeVisuals (const DtSimulationModelSet &oldSet, const DtSimulationModelSet &newSet) |
| Upgrades the visuals to the new format from the old model set to the new model set directory. | |
| virtual bool | loadVisuals (const DtScenarioExplorer &explorer, bool createIfMissing=false, bool force=false, bool editMode=false) |
| Checks to see if any of the simulation model sets need to be loaded. | |
| virtual const Visuals * | visualsFor (const DtSimulationModelSet &) const |
| If exists, returns the visuals for the given SMS. | |
| virtual Visuals * | visualsFor (const DtSimulationModelSet &) |
| virtual Visuals * | visualsFor (const std::string &) |
| virtual const Visuals * | visualsFor (const std::string &) const |
| virtual makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes | elementTypeFor (const DtEntityType &) |
| Given the entity type, return the element manager dictionary type that supports it. | |
| virtual void | mergeVisualsIntoSystemVisuals (const Visuals *) |
| Merges ths visuals supplied into the system visuals. | |
| virtual void | pruneFromSystemVisuals (const Visuals *) |
| Prunes from system viasuals the visuals supplied. | |
| virtual void | merge (const DtEntityType &, const Visuals *, bool toSystem=true) |
| Merges visuals into this visual set for the given type from the supplied visuals. If toSystem us true will also add to system visuals. | |
| virtual bool | saveSystemVisualsAsAppData (const DtFilename &directory, bool saveHierarchyData=true) |
| Saves system visuals into app data structure, assuming vrfGui as the settings directory, unless the stealth directory is found under appData, in which case that will be used. | |
| virtual void | createSpotReportDefinitionFor (const DtEntityType &) |
| Finds the visuals for the type and adds a spot report entry (if one does not exist) based on the 2D model set definition of that type. | |
| virtual bool | updateAndAddMatchTypeVisuals (const DtEntityType &sourceType, const DtEntityType &matchType, bool andSystem=true) |
| Given the source type, if a mapping for that source type exists add it also for the match type. | |
| virtual void | updateVisualsFor (const DtEntityType &) |
| Finds the visuals and updates the visuals into the system visuals. | |
| virtual void | removeVisualsFor (const DtEntityType &, bool andSystem=true) |
| Removes the visuals for the given entity type. | |
| virtual bool | removeMappingsFor (const DtEntityType &, bool andSystem=true) |
| Simply removes the mapping for the given type. If andSystem is true also removes from system. Returns true if removed. | |
| virtual void | removeElementDefinition (const DtEntityType &, bool andSystem=true) |
| Just removes the element definition for the entity type. If andSystem is true also removes from system. | |
| virtual Visuals * | visualsFor (const DtEntityType &) |
| Returns the Visuals that contains the exact mapper key. If no visuals exist then it will return 0. | |
| virtual void | setDefaultVisuals (const std::string &) |
| Sets the visuals to use when no other visuals can be mapped. This should be the filename() of the simulation model set. | |
| const std::string & | defaultVisuals () const |
| virtual void | setCoreRootName (const std::string &) |
| The root name of the core files. Default is "core". | |
| virtual const std::string & | coreRootName () const |
| virtual void | resetStartupCounts (makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes) |
| Visuals * | systemDefaulVisuals () const |
| virtual void | initializeSystemVisuals (const DtFilename &definitionsDir=DtFilename::nullFilename(), bool andInstall=true, bool setupSpotReports=true) |
| Initialize mappers, visual defs and model defs for system visuals (as exists in appData or as supplied on command line) | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtVrfVisualsManager & | instance (makVrv::DtDe &) |
| Instance helpers. | |
| static void | registerInstance (makVrv::DtDe &, DtVrfVisualsManager *) |
Protected Types | |
| typedef std::vector < ModelSetVisual > | SimulationModelSetVisuals |
Protected Member Functions | |
| virtual void | setupAdditionalTacticalGraphicsVisualizers () |
| Set up any additional visualizers VR-Forces needs, for example, sceeario events. | |
| virtual void | setupNavigationAreaVisualizer () |
| Set up any necessary navigation area visualizer. | |
| virtual void | setupBoundingVolumes () |
| Sets up bounding volumes for entities. | |
| virtual void | setupObjectConsoleWarngForTacticalGraphics () |
| Sets up object console warning visualizer for tactical graphics. | |
| virtual void | setupBoundingVolumes (const std::string &root) |
| Sets up the bounding volumes to be under a particular root node. | |
| virtual void | setupRangeRings () |
| Sets up range ring items. | |
| virtual void | addRangeRingsFor (int managerType) |
| virtual void | setupSensorContactLines () |
| Sets up sensor contact kines. | |
| virtual void | addSensorContactLinesFor (int managerType) |
| virtual void | setupAdditionalAggregateVisualizers () |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| Visuals * | mySystemDefaultVisuals |
| SimulationModelSetVisuals | mySimulationModelSetVisuals |
| bool | myUseNewSystemDataStructure |
| std::string | myDefaultVisuals |
| std::string | myCoreRootName |
| std::set< DtFilename > | mySystemVisuals |
| std::set< makVrv::DtUnicode > | myUnknowns |
The DtVrfVisualsManager class is a class that allows for the loading of visuals (definitions, mappings and model definitions) for a given simulation model set.
It will also provide routines to create visual mappings from a model set
| typedef boost::unordered_map<makVrv::DtSharedSimulationSettings::MapperType, DtVrfEntityTypeMapper*> makVrf::DtVrfVisualsManager::MappersMap |
|
protected |
| makVrf::DtVrfVisualsManager::DtVrfVisualsManager | ( | makVrv::DtDe & | ) |
CTOR.
|
virtual |
DTOR.
|
static |
Instance helpers.
|
static |
|
virtual |
Loads visuals (definitions, mappings and model defnitions) into the appropriate managers given the simulation model set.
Returns true if can load visuals. If edit mode is true, also also SMS level visuals even if they are in the appData structure
|
virtual |
Loads visuals from the given directory.
|
virtual |
Given the simulation model set, and the default model definitions, mappings and visualizers, create a subset of those in the given simulation model set directory based on .entity files in that directory.
If andLoad flag is true, also load definitions just created and discard those that are not used from the default managers, If visualsToUpgradeFrom is non-zero, and the visuals cannot be found in the current visual set, look in the upgrade
|
virtual |
Given the entity type, return (from system definitions) the element map this entity type belongs to.
Returns false if not found
|
virtual |
Returns true if the models evaluate to "unknown" (given the list of unknown models). If any model is unknown, then all are unknown.
|
virtual |
The default "unknown" string.
|
virtual |
Adds/removes/returns unknown strings.
|
inline |
|
virtual |
Clears out all visuals for mappers, visualizers and model definitions.
|
virtual |
Clears out only simulation model set visuals.
|
virtual |
Set up any additional visualizers VR-Forces needs, for example, Range rings.
|
virtual |
Upgrades the spot report dictionary from entity, aggregate and tactical graphic elements.
|
virtual |
Upgrades the visuals to the new format from the old model set to the new model set directory.
This will overwrite any visual files that happen to be in the new directory. Also, the method for upgrade will be to keep any new visuals (from the new set) and add from the old set (that do not exist in the new set)
|
virtual |
Checks to see if any of the simulation model sets need to be loaded.
If they do the current visuals are cleared and the new visuals loaded. Returns true if visuals are loaded
|
virtual |
If exists, returns the visuals for the given SMS.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Given the entity type, return the element manager dictionary type that supports it.
|
virtual |
Merges ths visuals supplied into the system visuals.
|
virtual |
Prunes from system viasuals the visuals supplied.
|
virtual |
Merges visuals into this visual set for the given type from the supplied visuals. If toSystem us true will also add to system visuals.
|
virtual |
Saves system visuals into app data structure, assuming vrfGui as the settings directory, unless the stealth directory is found under appData, in which case that will be used.
|
virtual |
Finds the visuals for the type and adds a spot report entry (if one does not exist) based on the 2D model set definition of that type.
|
virtual |
Given the source type, if a mapping for that source type exists add it also for the match type.
This is for mapping types only. If andSystem is true also installs into system. Returns true if added
|
virtual |
Finds the visuals and updates the visuals into the system visuals.
|
virtual |
Removes the visuals for the given entity type.
If fromSystem is true also removes from system. Since there is no reference count on the usage of the modelDefinition that might be used in an element, that will not be removed. Only the mapping and element definition will be removed
|
virtual |
Simply removes the mapping for the given type. If andSystem is true also removes from system. Returns true if removed.
|
virtual |
Just removes the element definition for the entity type. If andSystem is true also removes from system.
|
virtual |
Returns the Visuals that contains the exact mapper key. If no visuals exist then it will return 0.
|
virtual |
Sets the visuals to use when no other visuals can be mapped. This should be the filename() of the simulation model set.
| const std::string& makVrf::DtVrfVisualsManager::defaultVisuals | ( | ) | const |
|
virtual |
The root name of the core files. Default is "core".
|
virtual |
|
virtual |
|
inline |
|
virtual |
Initialize mappers, visual defs and model defs for system visuals (as exists in appData or as supplied on command line)
|
protectedvirtual |
Set up any additional visualizers VR-Forces needs, for example, sceeario events.
|
protectedvirtual |
Set up any necessary navigation area visualizer.
|
protectedvirtual |
Sets up bounding volumes for entities.
|
protectedvirtual |
Sets up object console warning visualizer for tactical graphics.
|
protectedvirtual |
Sets up the bounding volumes to be under a particular root node.
|
protectedvirtual |
Sets up range ring items.
|
protectedvirtual |
|
protectedvirtual |
Sets up sensor contact kines.
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |