|
VR-Engage
2.2
|
DtJoinedSessionState represents the application state when the user has successfully joined an existing simulation session. It manages the connection to the session, monitors session status, and provides UI controls for session management. This state is typically entered after connecting to a network and selecting a session to join.
#include <joinedSessionState.h>
Public Member Functions | |
| DtJoinedSessionState (DtPlayerStationApp &app) | |
| virtual | ~DtJoinedSessionState () override |
| virtual void | onEnter (const DtPlayerStationStateArgs *args) override |
| virtual void | onExit () override |
| virtual void | tick (double dt) override |
| virtual DtSessionType | getSessionType () |
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 void | updateUICutoutControls (const std::string &context) |
| virtual DtVreMessageResult | handleVrfSessionStatus (DtVreMessage *msg) |
| virtual DtVreMessageResult | handleChooseSessionButtonClicked (DtVreMessage *msg) |
| virtual DtVreMessageResult | handleAppModeUpdated (DtVreMessage *msg) |
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< SessionLoadDataMessage > | myLoadData |
| DtSessionType | mySessionType |
Protected Attributes inherited from makVre::DtPlayerStationState | |
| DtPlayerStationApp & | myApp |
| makVre::DtJoinedSessionState::DtJoinedSessionState | ( | DtPlayerStationApp & | app | ) |
Constructor.
| app | Reference to the player station application |
Creates a new joined session state associated with the given application. This state is entered when a user successfully joins a simulation session.
References makVre::DtPlayerStationState::app().
|
overridevirtual |
Virtual destructor.
Ensures proper cleanup of resources used by the joined session state.
|
overridevirtual |
Called when the state is entered.
| args | Pointer to arguments from the previous state |
Sets up the joined session, registers message handlers, and initializes the UI. This is called when the user first joins a simulation session.
Reimplemented from makVre::DtPlayerStationState.
|
overridevirtual |
Called when the state is exited.
Cleans up resources, unregisters message handlers, and performs any necessary session disconnection operations.
Reimplemented from makVre::DtPlayerStationState.
|
overridevirtual |
Updates the state each frame.
| dt | Time in seconds since the last update |
Handles per-frame updates for the joined session, including monitoring session status and updating UI elements.
Reimplemented from makVre::DtPlayerStationState.
|
virtual |
Gets the current session type.
Retrieves the type of the current session (e.g., hosted, unhosted, joined). This can be used to determine appropriate behavior based on session type.
|
protectedvirtual |
Message handlers.
Handles session status messages
| msg | Pointer to the session status message |
Processes messages about changes to the VRF session status, updating the application state accordingly.
|
protectedvirtual |
Handles choose session button click messages.
| msg | Pointer to the button click message |
Processes messages generated when the user clicks the button to choose a different session, typically exiting the current session.
|
protectedvirtual |
Handles application mode update messages.
| msg | Pointer to the app mode update message |
Processes messages about changes to the application mode, adjusting the session state accordingly.
|
protectedvirtual |
Updates UI cutout controls based on a specific context.
| context | Context identifier to determine which controls to show/hide |
Adjusts the visibility and state of UI controls in the cutout area based on the specified context. This allows for dynamic UI adjustments appropriate to the current session state and user activity.
|
protected |
Session load data message.
Contains information about the session that was loaded, including configuration settings and connection details.
|
protected |
Type of the current session.
Identifies whether this is a hosted, unhosted, or joined session.