24#include <vrvCore/DtUniqueID.h>
211 template <
typename COMP_TYPE>
219 template <
typename COMP_TYPE>
244 virtual makVrv::DtDe*
de()
const;
257 virtual const DtEntityIdentifier&
entityId()
const;
414template <
typename COMP_TYPE>
417 for (
int compIndex = 0; compIndex <
myComponents.size(); compIndex++)
419 if (COMP_TYPE* comp =
dynamic_cast<COMP_TYPE*
>(
myComponents[compIndex]))
427 if (name == comp->name())
438template <
typename COMP_TYPE>
441 std::vector<COMP_TYPE*> ret;
443 for (
int compIndex = 0; compIndex <
myComponents.size(); compIndex++)
445 if (COMP_TYPE* comp =
dynamic_cast<COMP_TYPE*
>(
myComponents[compIndex]))
Provides attribute handling system for hierarchical data storage and manipulation.
Handle class for safe access to attributes.
Definition attributeHandle.h:30
DtConnectorType
Enumeration of supported connector types.
Definition connector.h:40
Table-based access to Lua state for configuration data.
Definition initializer.h:38
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:155
virtual const DtAttributeHandle & ownshipState() const
Gets the ownship state attribute handle.
virtual void releaseVreControl(const std::string &stationNameOverride="")
Releases VR-Engage role control for this station.
virtual ConnectorNameList connectors(DtConnector::DtConnectorType connectionType)
Gets the list of connectors by type.
makVrv::DtDe * myDe
Definition playerStation.h:390
COMP_TYPE * findComponent(const std::string &name="")
Finds a component by type and optional name.
Definition playerStation.h:415
virtual void tickUnreadyComponents(double dt)
Calls finalizeInitTick(dt) on every component where componentReady() is false.
std::vector< DtPlayerComponent * > ComponentList
Type definition for a list of player components.
Definition playerStation.h:54
std::vector< std::string > myRoleTypes
Definition playerStation.h:363
virtual bool preInit()
Pre-initialization: validation, attribute setup, and state flags.
DtInitTable myPlayerDefinition
Definition playerStation.h:354
std::map< size_t, bool[4]> myDebugAttributeTraceChecks
Definition playerStation.h:411
DtPlayerStation(DtPlayerStationApp *app, DtInitTable playerDefinition, DtEntityIdentifier attachTo, std::string stationName, std::string displayLayout)
Constructor for a player station.
virtual ~DtPlayerStation()
Destructor for a player station.
std::string myStationName
Definition playerStation.h:368
bool myFullyInitialized
True once the full init pipeline (preInit through finishInit) has completed. Prevents tick() from run...
Definition playerStation.h:409
DtEntityType myEntityType
Definition playerStation.h:359
virtual void tick(double dt)
Updates the player station.
virtual std::string displayLayout() const
Gets the display layout name.
const DtAttributeHandle myOwnshipState
Definition playerStation.h:374
virtual DtAttributeHandle & playerAttributeStore()
Gets the player attribute store.
virtual void debugPlayer()
Provides debugging information.
virtual void takeVreControl(const std::string &stationNameOverride="")
Acquires VR-Engage role control for this station.
DtForceType myForceType
Definition playerStation.h:360
virtual DtInitTable definition() const
virtual bool isActive() const
virtual bool postInitializeComponents()
Calls postInitialize() on all components.
makVrv::DtElementID myElementId
Definition playerStation.h:357
std::string myDisplayLayout
Definition playerStation.h:369
virtual DtPlayerStationApp * app() const
Gets the player station application.
std::vector< COMP_TYPE * > findComponents()
Finds all components of a specific type.
Definition playerStation.h:439
virtual bool initializeComponents()
Instantiates all components in the role definition and calls initialize() on each.
DtAttributeHandle myAttributeStore
Definition playerStation.h:372
virtual bool allComponentsReady() const
Returns true when every component reports componentReady() == true.
virtual void shutdown()
Shuts down the player station.
bool myActive
Definition playerStation.h:386
std::vector< std::string > ConnectorNameList
Type definition for a list of connector names.
Definition playerStation.h:57
ConnectorNameList myConnectorNames
Definition playerStation.h:381
virtual const DtAttributeHandle & playerAttributeStore() const
Gets the player attribute store (const version)
virtual makVrv::DtElementID elementId() const
Gets the element ID for the controlled entity.
virtual bool anyComponentFailed() const
Returns true if any component's most recent finalizeInitTick() returned Failed.
bool myAllComponentsReady
Cached result of allComponentsReady().
Definition playerStation.h:403
virtual makVrv::DtDe * de() const
Gets the display engine.
virtual DtVreMessageResult handleSimulationStateMessage(makVre::DtVreMessage *msg)
Handler for the SimulationStateMessage for this station's ownship entity. This function is used only ...
virtual std::string stationName() const
Gets the name of the role.
virtual bool isShuttingDown() const
DtPlayerStationApp * myApp
Writes name, type, and value of each attribute in Attribute Store to a human-readable string....
Definition playerStation.h:348
bool myAnyComponentFailed
Set to true if any component's finalizeInitTick() returns Failed.
Definition playerStation.h:395
virtual const DtEntityIdentifier & entityId() const
Gets the entity ID for the controlled entity.
ComponentList myComponents
Definition playerStation.h:377
bool myShuttingDown
Definition playerStation.h:387
virtual bool finishInit()
Post-pipeline finalization: connectors, PlayerCreatedMessage.
virtual const DtEntityType & entityType() const
Gets the entity type for the controlled entity.
DtEntityIdentifier myEntityId
Definition playerStation.h:358
virtual std::vector< std::string > roleTypes() const
Gets the list of joystick function groups.
virtual bool initializeMenus()
Initializes menus via the DtActionMenuUpdater component.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Provides configuration initialization for VREngage components.
!
Definition glsVreMessageUtil.h:50
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Defines the DtPlayerComponent base class for VR-Engage role components.
Defines the DtPlayerStationApp class for the VR-Engage application.
Defines the base class for all VREngage messages.