|
VR-Engage
2.2
|
This state is activated when the user chooses to join a session. It displays a waiting page and monitors for session status updates. When a hosted session with a terrain becomes available, it transitions to the joined session state. If configured, it can also start an ownship simulation.
#include <waitingForHostState.h>
Public Member Functions | |
| DtWaitingForHostState (DtPlayerStationApp &app) | |
| virtual | ~DtWaitingForHostState () override |
| virtual void | onEnter (const DtPlayerStationStateArgs *args) override |
| virtual void | onExit () override |
| virtual void | tick (double dt) override |
Public Member Functions inherited from makVre::DtPlayerStationState | |
| DtPlayerStationState (DtPlayerStationApp &app, std::string stateType) | |
| virtual | ~DtPlayerStationState () |
| DtPlayerStationState (const DtPlayerStationState &)=delete | |
| DtPlayerStationState & | operator= (const DtPlayerStationState &)=delete |
| virtual void | onEnter () |
| virtual void | onStacked () |
| virtual void | onExposed (const DtPlayerStationStateArgs *args) |
| virtual void | onExposed () |
| bool | active () const |
| bool | exposed () const |
| bool | exiting () const |
| bool | stacking () const |
| const std::string & | stateType () const |
| DtPlayerStationApp & | app () const |
Protected Member Functions | |
| virtual DtVreMessageResult | handleVrfSessionStatus (DtVreMessage *msg) |
| virtual bool | startOwnship () |
Protected Member Functions inherited from makVre::DtPlayerStationState | |
| bool | pushState (const std::string &newState, DtPlayerStationStateArgs *args=NULL) |
| bool | popSelf () |
| bool | popUntilSelf () |
| bool | popUntilState (const std::string &parentState, DtPlayerStationStateArgs *args=NULL) |
| bool | switchToState (const std::string &newState, DtPlayerStationStateArgs *args=NULL) |
| bool | pushSelf () |
Protected Attributes | |
| std::shared_ptr< DtVreWaitingPage > | myWaitingPage |
| bool | myJoinOnlyMode |
| std::shared_ptr< VrfSessionStatusMessage > | mySessionData |
Protected Attributes inherited from makVre::DtPlayerStationState | |
| DtPlayerStationApp & | myApp |
| makVre::DtWaitingForHostState::DtWaitingForHostState | ( | DtPlayerStationApp & | app | ) |
Constructor for the waiting for host state.
| app | Reference to the player station application |
Initializes the state with a reference to the application and sets default values.
References makVre::DtPlayerStationState::app().
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Called when entering this state.
| args | Pointer to arguments containing a VrfSessionStatusMessage |
Sets up the waiting page UI, registers message handlers, and checks the startup configuration. If configured, it may start an ownship simulation. It also determines if the application is in join-only mode based on the application mode or startup configuration.
Reimplemented from makVre::DtPlayerStationState.
|
overridevirtual |
Called when exiting this state.
Removes message handlers and closes the waiting page UI.
Reimplemented from makVre::DtPlayerStationState.
|
overridevirtual |
Called every frame to update the state.
| dt | Time elapsed since the last frame in seconds |
Performs periodic updates for this state, currently minimal implementation.
Reimplemented from makVre::DtPlayerStationState.
|
protectedvirtual |
Handles session status messages.
| msg | The session status message |
Processes session status updates. If a terrain is available, creates a SessionLoadDataMessage and transitions to the JOINED_SESSION_STATE. If no terrain is available and not in join-only mode, transitions back to the SESSION_MENU_STATE and stops the ownship simulation if it was started.
|
protectedvirtual |
Starts the ownship simulation backend.
This method initiates the ownship simulation backend by creating and queuing a StartBackendMessage. It checks whether the simulation has already been started by examining the "ownshipSimStarted" attribute in the application attribute store. If the simulation is not running, it:
|
protected |
Reference to the waiting page UI component.
|
protected |
Flag indicating if the application is in join-only mode.
When true, the application will only attempt to join sessions and will not return to the session menu if no host is available.
|
protected |
Cached copy of the session status message.
Contains information about the current session status, including whether the session is hosted and what terrain is being used.