VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtJoinedSessionState Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtJoinedSessionState:
[legend]

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
 
DtPlayerStationStateoperator= (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
 
DtPlayerStationAppapp () 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< SessionLoadDataMessagemyLoadData
 
DtSessionType mySessionType
 
- Protected Attributes inherited from makVre::DtPlayerStationState
DtPlayerStationAppmyApp
 

Constructor & Destructor Documentation

◆ DtJoinedSessionState()

makVre::DtJoinedSessionState::DtJoinedSessionState ( DtPlayerStationApp & app)

Constructor.

Parameters
appReference 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().

◆ ~DtJoinedSessionState()

virtual makVre::DtJoinedSessionState::~DtJoinedSessionState ( )
overridevirtual

Virtual destructor.

Ensures proper cleanup of resources used by the joined session state.

Member Function Documentation

◆ onEnter()

virtual void makVre::DtJoinedSessionState::onEnter ( const DtPlayerStationStateArgs * args)
overridevirtual

Called when the state is entered.

Parameters
argsPointer 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.

◆ onExit()

virtual void makVre::DtJoinedSessionState::onExit ( )
overridevirtual

Called when the state is exited.

Cleans up resources, unregisters message handlers, and performs any necessary session disconnection operations.

Reimplemented from makVre::DtPlayerStationState.

◆ tick()

virtual void makVre::DtJoinedSessionState::tick ( double dt)
overridevirtual

Updates the state each frame.

Parameters
dtTime 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.

◆ getSessionType()

virtual DtSessionType makVre::DtJoinedSessionState::getSessionType ( )
virtual

Gets the current session type.

Returns
Type of the current session

Retrieves the type of the current session (e.g., hosted, unhosted, joined). This can be used to determine appropriate behavior based on session type.

◆ handleVrfSessionStatus()

virtual DtVreMessageResult makVre::DtJoinedSessionState::handleVrfSessionStatus ( DtVreMessage * msg)
protectedvirtual

Message handlers.

Handles session status messages

Parameters
msgPointer to the session status message
Returns
Message handling result

Processes messages about changes to the VRF session status, updating the application state accordingly.

◆ handleChooseSessionButtonClicked()

virtual DtVreMessageResult makVre::DtJoinedSessionState::handleChooseSessionButtonClicked ( DtVreMessage * msg)
protectedvirtual

Handles choose session button click messages.

Parameters
msgPointer to the button click message
Returns
Message handling result

Processes messages generated when the user clicks the button to choose a different session, typically exiting the current session.

◆ handleAppModeUpdated()

virtual DtVreMessageResult makVre::DtJoinedSessionState::handleAppModeUpdated ( DtVreMessage * msg)
protectedvirtual

Handles application mode update messages.

Parameters
msgPointer to the app mode update message
Returns
Message handling result

Processes messages about changes to the application mode, adjusting the session state accordingly.

◆ updateUICutoutControls()

virtual void makVre::DtJoinedSessionState::updateUICutoutControls ( const std::string & context)
protectedvirtual

Updates UI cutout controls based on a specific context.

Parameters
contextContext 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.

Member Data Documentation

◆ myLoadData

std::shared_ptr<SessionLoadDataMessage> makVre::DtJoinedSessionState::myLoadData
protected

Session load data message.

Contains information about the session that was loaded, including configuration settings and connection details.

◆ mySessionType

DtSessionType makVre::DtJoinedSessionState::mySessionType
protected

Type of the current session.

Identifies whether this is a hosted, unhosted, or joined session.


The documentation for this class was generated from the following file: