18#include <vrvCore/DtUniqueID.h>
83 virtual void tick(
double dt)
override;
246 void loadPlayer(
const DtEntityIdentifier& entityId,
const std::string& stationName,
248 const DtEntityIdentifier& destroyEntityId = DtEntityIdentifier::nullId(),
249 const std::string& destroyStationName = std::string(),
250 bool isEmbarkation =
false,
251 bool isEmbarkationTransition =
false);
265 const DtEntityIdentifier& targetEntity,
const std::string& targetStation,
266 DtEntityIdentifier& outDestroyEntity, std::string& outDestroyStation);
278 const DtEntityIdentifier& newHost,
const std::string& newRole);
std::string myBaseDisplayLayout
Display layout of the human player's original assignment.
Definition engagedState.h:333
void syncEmbarkationTrackingFromActivePlayer()
Synchronises embarkation tracking with the active player station.
bool myIsModalOpen
Flag indicating whether a modal dialog is currently open.
Definition engagedState.h:314
DtEntityIdentifier myEmbarkedHost
Entity identifier of the embarkation host.
Definition engagedState.h:351
virtual DtVreMessageResult handleAssignRolePlayer(DtVreMessage *message)
Message handlers for role assignment.
virtual bool isPlaying() const
Checks if the simulation is currently playing.
std::string resolveEmbarkedRoleFromSlot(const VrfSetEmbarkMessage *embarkMsg)
Resolves the player-station role for a VrfSetEmbarkMessage slot.
virtual void onStacked() override
Called when another state is pushed on top of this one.
virtual void onExit() override
Called when the state is exited.
void elementRemoved(makVrv::DtElementID elementId)
Handles entity element removal signals.
virtual void updatePlayerControlsState()
Updates the state of player controls.
virtual DtVreMessageResult handleSimulationStateMessage(DtVreMessage *msg)
Handles simulation state update messages.
virtual void tick(double dt) override
Updates the state each frame.
virtual DtVreMessageResult handleSessionPlayState(DtVreMessage *message)
Handles session play state messages.
std::string myBaseStationName
Station (role) name of the human player's original assignment.
Definition engagedState.h:330
bool myIsPlaying
Flag indicating whether the simulation is currently playing.
Definition engagedState.h:311
virtual DtVreMessageResult handleChooseRoleButtonClicked(DtVreMessage *message)
Handles choose role button click messages.
virtual void onExposed(const DtPlayerStationStateArgs *args) override
Called when the state becomes the topmost state again.
DtEntityIdentifier myBaseEntityId
These fields record the human player's original role assignment. They are restored after disembark an...
Definition engagedState.h:327
virtual DtVreMessageResult handleVrfSetEmbarkMessage(DtVreMessage *msg)
Intercepts player-initiated embark/disembark requests.
std::shared_ptr< DtVreHeaderFooterUI > myPersistentNotification
Persistent notification displayed during gameplay.
Definition engagedState.h:308
QString buildEngagedTitle() const
Builds the header title for the engaged state.
virtual DtVreMessageResult handleBackButtonClicked(DtVreMessage *message)
Handles back button click messages.
virtual DtVreMessageResult handleEntityRemoved(DtVreMessage *message)
Handles entity removal messages.
std::string myEmbarkedRole
These fields track the current embarkation state reported by VRF. They are a layered override on top ...
Definition engagedState.h:348
boost::signals2::connection myEntityRemovedConnection
Connection to the entity removed signal.
Definition engagedState.h:317
bool myBasePlayerIsInvisible
Whether the base player entity is invisible (notional embarkation slot)
Definition engagedState.h:354
bool myLoadingPlayer
True after a player load has been requested and before loading completes.
Definition engagedState.h:362
virtual DtVreMessageResult handleVrfRewind(DtVreMessage *message)
Handles VR-Forces simulation rewind messages.
bool myAutoRunPending
True until the first onExposed after onEnter (for auto-run in hosted sessions)
Definition engagedState.h:365
void loadPlayer(const DtEntityIdentifier &entityId, const std::string &stationName, LoadPlayerRequestMessage::LoadPolicy loadPolicy=LoadPlayerRequestMessage::LoadPolicy_PreserveExisting, const DtEntityIdentifier &destroyEntityId=DtEntityIdentifier::nullId(), const std::string &destroyStationName=std::string(), bool isEmbarkation=false, bool isEmbarkationTransition=false)
Pushes LOADING_PLAYER_STATE on top to create or resume a player station.
void resolveDestroyTarget(const DtEntityIdentifier &targetEntity, const std::string &targetStation, DtEntityIdentifier &outDestroyEntity, std::string &outDestroyStation)
Determines which player station should be destroyed when loading a new one.
void processEmbarkationChange(const DtEntityIdentifier &newHost, const std::string &newRole)
Unified handler for embarkation, disembarkation, and role switches.
DtEngagedState(DtPlayerStationApp &app)
Constructor.
virtual ~DtEngagedState() override
Virtual destructor.
bool isPlayerLoadInProgress() const
Checks whether a player load is pending or active.
virtual DtVreMessageResult handleEscKey(DtVreMessage *message)
Handles escape key press messages.
virtual DtVreMessageResult handleUnassignRolePlayer(DtVreMessage *message)
Handles role unassignment messages.
virtual DtVreMessageResult handleModalState(DtVreMessage *message)
Handles modal dialog state messages.
bool myBaseSpectatorMode
Whether the human player was originally in spectator mode.
Definition engagedState.h:336
virtual void onEnter(const DtPlayerStationStateArgs *args) override
Called when the state is entered.
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:155
Class for passing arguments during state transitions.
Definition playerStationState.h:47
DtPlayerStationApp & app() const
Gets a reference to the player station application.
DtPlayerStationState(DtPlayerStationApp &app, std::string stateType)
Constructor.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
LoadPolicy
LoadPolicy enumeration.
Definition loadPlayerRequest.h:38
@ LoadPolicy_PreserveExisting
Definition loadPlayerRequest.h:39
Send to the DtVrfRemoteControlConnector to generate a VRF set embarked request.
Definition vrfSetEmbark.h:35
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
!
Definition glsVreMessageUtil.h:50
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Defines base classes for the VR-Engage state management system.
Defines the base class for all VREngage messages.