![]() |
VR-Forces 5.0.2 Developer's Guide
|
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.

Classes | |
| struct | ModelSetVisual |
| class | Visuals |
Public Types | |
| typedef boost::unordered_map < makVrv::DtSharedSimulationSettings::MapperType, DtVrfEntityTypeMapper * > | MappersMap |
Public Member Functions | |
| DtVrfVisualsManager (makVrv::DtDe &) | |
| virtual | ~DtVrfVisualsManager () |
| virtual bool | loadVisuals (DtSimulationModelSet *, bool createIfMissing=false, bool editMode=false) |
| virtual bool | loadVisuals (const DtFilename &, const DtString &rootName="") |
| virtual bool | createVisuals (const DtSimulationModelSet *, bool andLoad=true, Visuals *visualsToUpgradeFrom=0, const DtFilename &sourceDefinitionsDir=DtFilename::nullFilename()) |
| virtual bool | getSystemVisualizerDefinitionAndElementTypeMap (const DtEntityType &, makVrv::DtUnicode &, makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes &, bool exactMatch=true) |
| virtual bool | isUnknown (const std::vector< makVrv::DtUnicode > &entities) const |
| virtual bool | isUnknown (const makVrv::DtUnicode &entities) const |
| virtual makVrv::DtUnicode | unknownString () const |
| virtual void | updateUnknowns () |
| const std::set< makVrv::DtUnicode > | unknownStrings () const |
| virtual void | clear () |
| virtual void | setupAdditionalVisualizers () |
| virtual void | upgradeSpotReportsDictionary (const DtFilename &toDirectory, Visuals &, bool force=false, bool mergeAttributes=false) |
| virtual bool | upgradeVisuals (const DtSimulationModelSet &oldSet, const DtSimulationModelSet &newSet) |
| virtual bool | loadVisuals (const DtScenarioExplorer &explorer, bool createIfMissing=false, bool force=false, bool editMode=false) |
| virtual const Visuals * | visualsFor (const DtSimulationModelSet &) const |
| 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 &) |
| virtual bool | pruneVRFSpecificVisualizers () |
| virtual bool | pruneVisualizersFrom (makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes, const std::set< std::string > &) |
| virtual void | pruneFromSystemVisuals (const Visuals *) |
| virtual void | merge (const DtEntityType &, const Visuals *, bool toSystem=true, const DtString &newElementDefName="", const DtEntityType &newType=DtEntityType()) |
| virtual void | mergeElementDefinitionToSystem (const DtEntityType &) |
| virtual bool | saveSystemVisualsAsAppData (const DtFilename &directory, bool saveHierarchyData=true) |
| virtual void | createSpotReportDefinitionFor (const DtEntityType &) |
| virtual bool | updateAndAddMatchTypeVisuals (const DtEntityType &sourceType, const DtEntityType &matchType, bool andSystem=true) |
| virtual void | updateVisualsFor (const DtEntityType &) |
| virtual void | removeVisualsFor (const DtEntityType &, bool andSystem=true) |
| virtual bool | removeMappingsFor (const DtEntityType &, bool andSystem=true) |
| virtual void | removeElementDefinition (const DtEntityType &, bool andSystem=true) |
| virtual Visuals * | visualsFor (const DtEntityType &) |
| virtual void | setDefaultVisuals (const std::string &) |
| const std::string & | defaultVisuals () const |
| virtual void | setCoreRootName (const std::string &) |
| virtual const std::string & | coreRootName () const |
| virtual void | resetStartupCounts (makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes) |
| virtual int | setDebugLevel (int) |
| Visuals * | systemDefaulVisuals () const |
| virtual bool | setupBoundingVolumes () |
| virtual void | initializeSystemVisuals (const DtFilename &definitionsDir=DtFilename::nullFilename(), bool setupSpotReports=true) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtVrfVisualsManager & | instance (makVrv::DtDe &) |
| static void | registerInstance (makVrv::DtDe &, DtVrfVisualsManager *) |
Public Attributes | |
| boost::signals2::signal< void()> | signal_visualsLoaded |
| boost::signals2::signal< void(const DtFilename &)> | signal_visualsLoadedFrom |
| boost::signals2::signal< void(DtSimulationModelSet *)> | signal_spotReportVisualsLoadedFromSMS |
| boost::signals2::signal< void(DtSimulationModelSet *)> | signal_visualsLoadedFromSMS |
Protected Types | |
| typedef std::vector < ModelSetVisual > | SimulationModelSetVisuals |
Protected Member Functions | |
| virtual void | setupObjectConsoleWarningVisualizer () |
| virtual bool | pruneVisualizersFrom (makVrv::DtElementDefinitionNew *, const std::set< std::string > &) |
| virtual void | setupAdditionalTacticalGraphicsVisualizers () |
| virtual void | setupCloudLayers () |
| virtual void | setupCloudDisplayLayer (const std::string &, const DtEntityType &, int r, int g, int b, int a) |
| virtual void | setupNavigationAreaVisualizer () |
| virtual void | setupObjectConsoleWarngForTacticalGraphics () |
| virtual bool | setupBoundingVolumes (const std::string &root) |
| virtual void | setupObjectConsoleWarningVisualizer (const std::string &root) |
| virtual void | setupAdditionalSpotReportVisualizers () |
| virtual void | setupAdditionalSpotReportVisualizers (const makVrv::DtUnicode &) |
| virtual void | setupRangeRings () |
| virtual void | addRangeRingsFor (int managerType) |
| virtual void | setupSensorContactLines () |
| virtual void | addSensorContactLinesFor (int managerType) |
| virtual void | setupAdditionalAggregateVisualizers () |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| Visuals * | mySystemDefaultVisuals |
| SimulationModelSetVisuals | mySimulationModelSetVisuals |
| std::string | myDefaultVisuals |
| std::string | myCoreRootName |
| std::set< DtFilename > | mySystemVisuals |
| std::set< makVrv::DtUnicode > | myUnknowns |
| 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 |
|
virtual |
The default "unknown" string.
|
virtual |
Adds/removes/returns unknown strings.
|
inline |
|
virtual |
Clears out all visuals for mappers, visualizers and model definitions.
|
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 |
Prunes VRF specific visualizers from all visualizer definition sets.
|
virtual |
Prunes out the list of the given visualizers.
|
virtual |
Prunes from system visuals 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 |
Merges elment definition only of the given type into the 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 |
Sets up bounding volumes for entities. Returns true if added.
|
virtual |
Initialize mappers, visual defs and model defs for system visuals (as exists in appData or as supplied on command line)
|
protectedvirtual |
Sets up object console warning visualizer for entities.
|
protectedvirtual |
Prunes out the list of the given visualizers.
|
protectedvirtual |
Set up any additional visualizers VR-Forces needs, for example, sceeario events.
|
protectedvirtual |
Sets up cloud layers (if does not exist)
|
protectedvirtual |
|
protectedvirtual |
Set up any necessary navigation area visualizer.
|
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 the object console warning visualizer to be under a particular root node.
|
protectedvirtual |
Adds additional visualizers for spot reprots (e.g. track histories)
|
protectedvirtual |
Sets up additional visualizer for the given element definition type. Only specific items are given the additional visualizers (Entity, Unit, UnitEntity)
|
protectedvirtual |
Sets up range ring items.
|
protectedvirtual |
|
protectedvirtual |
Sets up sensor contact kines.
|
protectedvirtual |
|
protectedvirtual |
| boost::signals2::signal<void ()> makVrf::DtVrfVisualsManager::signal_visualsLoaded |
| boost::signals2::signal<void (const DtFilename&)> makVrf::DtVrfVisualsManager::signal_visualsLoadedFrom |
| boost::signals2::signal<void (DtSimulationModelSet*)> makVrf::DtVrfVisualsManager::signal_spotReportVisualsLoadedFromSMS |
| boost::signals2::signal<void (DtSimulationModelSet*)> makVrf::DtVrfVisualsManager::signal_visualsLoadedFromSMS |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |