|
VR-Engage
2.3
|
The DtEchelonLogic tracks hierarchical relationships between entities in a command structure. It queries the DtElementIDHierarchyState to determine an entity's superior (commanding entity) and its peer subordinates (other entities sharing the same superior), then publishes this information as state attributes for use by other components.
The component maintains the following state attributes:
#include <echelonLogic.h>
Public Member Functions | |
| DtEchelonLogic () | |
| virtual | ~DtEchelonLogic () override |
| virtual bool | initialize (DtPlayerStation *player, DtInitTable &config) override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual bool | postInitialize () |
| bool | componentReady () const |
| void | setComponentReady (bool ready) |
| virtual DtInitTickStatus | finalizeInitTick (double dt) |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
| virtual const DtAttributeHandle & | ownshipState () const |
| virtual void | setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId()) |
Protected Member Functions | |
| virtual void | initializeStateAttributes () override |
| virtual makVrv::DtElementID | lookupSuperior (makVrv::DtDe &de, makVrv::DtElementID id) const |
| virtual const makVrv::DtElementIDHierarchyState::ElementIDVector | lookupSubordinates (makVrv::DtDe &de, makVrv::DtElementID id) const |
| virtual const makVrv::DtElementIDHierarchyStateAttribute * | findHierarchyItem (makVrv::DtDe &de, makVrv::DtElementID id) const |
Protected Attributes | |
| DtAttributeHandleType< std::string > | mySuperiorAttr |
| DtAttributeHandleType< std::vector< std::string > > | mySubordinateListAttr |
| DtAttributeHandleType< bool > | myTaskableEntitiesAttr |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| bool | myComponentReady = true |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| DtVreMessageHandlerGroup | myMessageHandlers |
| makVre::DtEchelonLogic::DtEchelonLogic | ( | ) |
Constructor for DtEchelonLogic.
Initializes the component with the name "DtEchelonLogic".
|
overridevirtual |
Virtual destructor for DtEchelonLogic.
|
overridevirtual |
Initializes the component with configuration from Lua.
Performs basic initialization using the parent class implementation.
| player | Pointer to the player station this component belongs to |
| config | Configuration table containing initialization parameters |
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates the component state.
Called each frame to update the command hierarchy information. This method:
| dt | Delta time in seconds since the last tick |
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Shuts down the component.
Performs cleanup by calling the parent class shutdown method.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the component type identifier.
Implements makVre::DtPlayerComponent.
|
overrideprotectedvirtual |
Initializes state attributes.
This method is reserved for initializing state attributes in the future. Currently, it has an empty implementation with commented-out code.
Reimplemented from makVre::DtPlayerComponent.
|
protectedvirtual |
Looks up the superior (commanding entity) for a given entity.
Queries the DtElementIDHierarchyState to find the parent entity ID for the specified entity.
| de | Reference to the dynamic environment |
| id | Element ID of the entity to find the superior for |
References de().
|
protectedvirtual |
Looks up subordinate entities for a given entity.
Queries the DtElementIDHierarchyState to find all child entities for the specified entity.
| de | Reference to the dynamic environment |
| id | Element ID of the entity to find subordinates for |
References de().
|
protectedvirtual |
Finds the hierarchy state attribute for a given entity.
Locates the DtElementIDHierarchyStateAttribute for the specified entity by looking it up in the data bank.
| de | Reference to the dynamic environment |
| id | Element ID of the entity to find the hierarchy item for |
References de().
|
protected |
Pointer to the superior entity attribute (commented out)
Pointer to the subordinate list attribute (commented out)
Pointer to the taskable entities flag attribute (commented out)
Attribute handle storing the display name of the player's superior entity.
| Attribute Store Key | Superior |
|---|
|
protected |
Attribute handle storing the display names of the player's subordinate entities.
| Attribute Store Key | subordinateList |
|---|
|
protected |
Attribute handle indicating whether the player has taskable subordinate entities.
| Attribute Store Key | taskableEntities |
|---|