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

The DtElement class implements the common behavior of simulation based elements added to the scene. Examples of specific elements include Entities, and Tactical Graphics.

Inheritance diagram for makVrv::DtElement:
Inheritance graph
[legend]

Public Types

using ModelSetToSceneObjectIdMap = boost::unordered_map< DtObserverMode::ModelSets, DtUniqueID >
 

Public Member Functions

 DtElement (DtBaseConnection &conn, DtElementID elementId)
 
virtual ~DtElement ()
 
 DtElement ()=delete
 
 DtElement (const DtElement &)=delete
 
DtElementoperator= (const DtElement &)=delete
 
virtual void visualize (const DtSharedModelSetSettings::ModelSetVisualizedMap &sets)
 
virtual void setVisible (bool visible)
 
virtual bool visible () const
 
virtual void setElementId (const DtElementID)
 
DtElementID elementID () const
 
virtual const DtUnicodeelementDefinition () const
 
virtual void setElementDefinition (const DtUnicode &definition)
 
virtual std::string displayUnitCollectionName () const
 
virtual void setDisplayUnitCollectionName (const std::string &definition)
 
virtual const
DtElementEntry::ElementType 
elementType () const =0
 
virtual void setDriverType (const std::string &driverType)
 
virtual void setElementSubtype (DtElementAttributes::ElementSubtypes subtype)
 
virtual void changeElementAttribute (const DtElementAttribute *attr)
 
virtual void updateElementDefinitionFromDefinitions ()
 
virtual void updateElementDefinitionFromDefinitions (std::vector< DtUnicode > &definitions)
 
virtual
ModelSetToSceneObjectIdMap
modelSetToSceneObjectIdMap ()
 
virtual void setSceneObjectIdForModelSet (DtObserverMode::ModelSets modelSet, DtUniqueID id)
 
virtual void removeSceneObjectIdForModelSet (DtObserverMode::ModelSets modelSet)
 
virtual DtUniqueID sceneObjectIdForModelSet (DtObserverMode::ModelSets modelSet) const
 

Protected Member Functions

void slot_updateOverlayNameRaw (const char *text)
 
void slot_updateConnectionObjectID (const std::string &id)
 
void slot_updateConnectionObjectType (const std::string &type)
 
void slot_updateDisplayName (const std::string &text)
 
void slot_updateOverlayName (const std::string &pname)
 
void slot_updateDamageState (EntityStateListener::DamageState state)
 
virtual void getDefinitions (std::vector< DtUnicode > &definitions)
 
virtual void setModelSetEnabled (int modelSet, bool enabled)=0
 
virtual void reportElementCreated ()
 
virtual void reportDisplayName ()
 
virtual void reportConnectionObjectID ()
 
virtual void reportConnectionObjectType ()
 
virtual void reportOverlayNameChanged ()
 
virtual void reportVisibility ()
 
virtual void reportDamageStateChanged ()
 
virtual void reportDriverType ()
 
virtual void reportElementSubtype ()
 
virtual void reportElementDefinitionName ()
 
virtual void reportDisplayUnitCollectionName ()
 
virtual bool distribute () const
 
virtual void setDistribute (const bool distribute)
 

Protected Attributes

DtAgentManagerInterfacemySceneInterface
 
DtSharedSettingsManagermySettingsManager
 
const
DtVisualizerCreationSettings::VisualTypeVisualizerCreationMap
myVisualTypeVisualizerCreationMap
 
DtBaseConnectionmyBaseConnection
 
DtElementID myElementId
 
DtUnicode myElementDefinitionName
 
const DtElementDefinitionNewmyElementDefinition
 
std::string myDisplayUnitCollectionName
 
std::string myConnectionObjectID
 
std::string myConnectionObjectType
 
std::string myDisplayName
 
std::string myElementOverlayName
 
std::string myDriverType
 
DtElementAttributes::ElementSubtypes myElementSubtype
 
EntityStateListener::DamageState myDamageState
 
bool myElementVisible
 
bool myElementReported
 
bool myDistribute
 
ModelSetToSceneObjectIdMap myModelSetToSceneObjectIdMap
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtElement::DtElement ( DtBaseConnection conn,
DtElementID  elementId 
)

Construct an element with the base connection and the element id.

virtual makVrv::DtElement::~DtElement ( )
virtual

DTOR.

makVrv::DtElement::DtElement ( )
delete

not allowed - default constructor

makVrv::DtElement::DtElement ( const DtElement )
delete

not allowed - copy constructor

Member Function Documentation

DtElement& makVrv::DtElement::operator= ( const DtElement )
delete

not allowed - equals operator

virtual void makVrv::DtElement::visualize ( const DtSharedModelSetSettings::ModelSetVisualizedMap sets)
virtual
virtual void makVrv::DtElement::setVisible ( bool  visible)
virtual

Set the element to be visible.

Reimplemented in makVrv::DtTacticalGraphicElement, makVrv::DtEntityElement, and makVrv::DtIntervisibilityElement.

virtual bool makVrv::DtElement::visible ( ) const
virtual

Get whether the element is visible.

virtual void makVrv::DtElement::setElementId ( const DtElementID  )
virtual

Set the element ID - used for the likes of vertex elements, where the element ID is not the listeners unique ID.

DtElementID makVrv::DtElement::elementID ( ) const
inline

Get the element ID of the element. Usually the element ID is the unique id of the listener.

virtual void makVrv::DtElement::updateElementDefinitionFromDefinitions ( )
virtual

Element definition.

Calls getDefinitions - which is only implemented by derived classes such as VRL. Sets the element definition from getDefinitions. If there is more than one element definition in the list, randomly picks a definition to use.

virtual void makVrv::DtElement::updateElementDefinitionFromDefinitions ( std::vector< DtUnicode > &  definitions)
virtual

Sets the element definition from the in param list of definitions. If there is more than one element definition in the list, randomly picks a definition to use.

virtual const DtUnicode& makVrv::DtElement::elementDefinition ( ) const
virtual

Accessor to get the visual definition. The definition changes when updateEntityType is called.

virtual void makVrv::DtElement::setElementDefinition ( const DtUnicode definition)
virtual
virtual std::string makVrv::DtElement::displayUnitCollectionName ( ) const
virtual

Get the display unit collection name to use for the element.

virtual void makVrv::DtElement::setDisplayUnitCollectionName ( const std::string &  definition)
virtual

Set the display unit collection name to use for the element.

virtual const DtElementEntry::ElementType makVrv::DtElement::elementType ( ) const
pure virtual
virtual void makVrv::DtElement::setDriverType ( const std::string &  driverType)
virtual

Specify which driver the element came from. Specializing elements will usually set this.

virtual void makVrv::DtElement::setElementSubtype ( DtElementAttributes::ElementSubtypes  subtype)
virtual

Set the member variable myElementSubtype.

virtual void makVrv::DtElement::changeElementAttribute ( const DtElementAttribute attr)
virtual

Request a change to the value of one of this element's attributes. Non-elements (inluding objects in the main thread) may request that the value of some attribute of an element be modifed; that is effected here.

virtual ModelSetToSceneObjectIdMap& makVrv::DtElement::modelSetToSceneObjectIdMap ( )
virtual

Elements can contain multiple model sets, and each model set requires a scene object, these methods map them to each other.

Get the model set to scene object ID map

virtual void makVrv::DtElement::setSceneObjectIdForModelSet ( DtObserverMode::ModelSets  modelSet,
DtUniqueID  id 
)
virtual

Associate a model set of this element with a specific scene object.

virtual void makVrv::DtElement::removeSceneObjectIdForModelSet ( DtObserverMode::ModelSets  modelSet)
virtual

Erase the model set pair from the ModelSetToSceneObjectIdMap.

virtual DtUniqueID makVrv::DtElement::sceneObjectIdForModelSet ( DtObserverMode::ModelSets  modelSet) const
virtual

Get the scene object ID for a specific model set.

virtual void makVrv::DtElement::reportElementCreated ( )
protectedvirtual

Reporting Methods.

Report that an element was created.

Reimplemented in makVrv::DtVertexTacticalGraphicElement.

virtual void makVrv::DtElement::reportDisplayName ( )
protectedvirtual

Report that an element display name has changed.

virtual void makVrv::DtElement::reportConnectionObjectID ( )
protectedvirtual

Report an element's ID.

virtual void makVrv::DtElement::reportConnectionObjectType ( )
protectedvirtual

Report an element's type.

virtual void makVrv::DtElement::reportOverlayNameChanged ( )
protectedvirtual

Report that an element parent overlay name has changed.

virtual void makVrv::DtElement::reportVisibility ( )
protectedvirtual

Report that an element visibility has changed.

virtual void makVrv::DtElement::reportDamageStateChanged ( )
protectedvirtual

Report that an element damage state has changed.

virtual void makVrv::DtElement::reportDriverType ( )
protectedvirtual

Report that the element comes from a specific connection.

Reimplemented in makVrv::DtIntervisibilityElement.

virtual void makVrv::DtElement::reportElementSubtype ( )
protectedvirtual

Report the element's subtype. Some element types (Entity and Aggregate currently) that are used to further categorized them for display.

virtual void makVrv::DtElement::reportElementDefinitionName ( )
protectedvirtual

Report the element's element definition.

virtual void makVrv::DtElement::reportDisplayUnitCollectionName ( )
protectedvirtual

Report the element's display unit type.

void makVrv::DtElement::slot_updateOverlayNameRaw ( const char text)
protected

Called when overlay name for the element has been changed - passed as raw.

void makVrv::DtElement::slot_updateConnectionObjectID ( const std::string &  id)
protected

Called when the entity identifier is discovered.

void makVrv::DtElement::slot_updateConnectionObjectType ( const std::string &  type)
protected

Called when the entity type is discovered or changed Calls updateElementDefinitionFromDefinitions()

void makVrv::DtElement::slot_updateDisplayName ( const std::string &  text)
protected

Called when display name for the element has been changed.

void makVrv::DtElement::slot_updateOverlayName ( const std::string &  pname)
protected

Called when overlay name for the element has been changed.

void makVrv::DtElement::slot_updateDamageState ( EntityStateListener::DamageState  state)
protected

Called when damage state for the element has been changed.

virtual void makVrv::DtElement::getDefinitions ( std::vector< DtUnicode > &  definitions)
protectedvirtual

Intentional NOP Overridden by derived connection specfic elements. Some elements do not require connection specific types, such as TGs.

Reimplemented in makVrv::DtIntervisibilityElement, makVrv::DT_PROTOCOL_NAMESPACE::DtLaserDesignatorElement, makVrv::DT_PROTOCOL_NAMESPACE::DtSmokeElement, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateElement, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkEntityElement.

virtual void makVrv::DtElement::setModelSetEnabled ( int  modelSet,
bool  enabled 
)
protectedpure virtual
virtual bool makVrv::DtElement::distribute ( ) const
protectedvirtual

Get / Set the distribute flag.

virtual void makVrv::DtElement::setDistribute ( const bool  distribute)
protectedvirtual

Get / Set the distribute flag.

Member Data Documentation

DtAgentManagerInterface& makVrv::DtElement::mySceneInterface
protected

Map that indicates whether a visualizer should be created, by visual type, for all given model sets.

DtSharedSettingsManager& makVrv::DtElement::mySettingsManager
protected
const DtVisualizerCreationSettings::VisualTypeVisualizerCreationMap& makVrv::DtElement::myVisualTypeVisualizerCreationMap
protected
DtBaseConnection& makVrv::DtElement::myBaseConnection
protected
DtElementID makVrv::DtElement::myElementId
protected
DtUnicode makVrv::DtElement::myElementDefinitionName
protected
const DtElementDefinitionNew* makVrv::DtElement::myElementDefinition
protected
std::string makVrv::DtElement::myDisplayUnitCollectionName
protected
std::string makVrv::DtElement::myConnectionObjectID
protected
std::string makVrv::DtElement::myConnectionObjectType
protected
std::string makVrv::DtElement::myDisplayName
protected
std::string makVrv::DtElement::myElementOverlayName
protected
std::string makVrv::DtElement::myDriverType
protected
DtElementAttributes::ElementSubtypes makVrv::DtElement::myElementSubtype
protected
EntityStateListener::DamageState makVrv::DtElement::myDamageState
protected
bool makVrv::DtElement::myElementVisible
protected
bool makVrv::DtElement::myElementReported
protected
bool makVrv::DtElement::myDistribute
protected
ModelSetToSceneObjectIdMap makVrv::DtElement::myModelSetToSceneObjectIdMap
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)