|
VR-Engage
2.2
|
DtNetworkConnectedState represents the application state when VR-Engage is connected to a networked simulation. It manages resource loading, network communications, and transitions between sub-states like role selection and entity engagement. This state contains most of the active gameplay functionality of the application.
#include <networkConnectedState.h>
Public Member Functions | |
| DtNetworkConnectedState (DtPlayerStationApp &app) | |
| virtual | ~DtNetworkConnectedState () override |
| virtual void | onEnter () override |
| virtual void | onExit () override |
| virtual void | onStacked () override |
| virtual void | onExposed () override |
| virtual void | tick (double dt) override |
| virtual void | debugVortexCallback () |
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 (const DtPlayerStationStateArgs *args) |
| virtual void | onExposed (const DtPlayerStationStateArgs *args) |
| 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 | handleStopConnection (DtVreMessage *msg) |
| virtual DtVreMessageResult | handleNetworkDisconnected (DtVreMessage *msg) |
| virtual DtVreMessageResult | handleSmsLoadComplete (DtVreMessage *msg) |
| virtual DtVreMessageResult | handleVisualModelDefinitionsLoaded (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::string | myDriverName |
| std::shared_ptr< DtVreLoadingPage > | myLoadingPage |
| int | mySmsLoadStatusBits |
Protected Attributes inherited from makVre::DtPlayerStationState | |
| DtPlayerStationApp & | myApp |
| makVre::DtNetworkConnectedState::DtNetworkConnectedState | ( | DtPlayerStationApp & | app | ) |
Constructor.
| app | Reference to the player station application |
Creates a new network connected state associated with the given application. This state is typically entered after a successful network connection.
References makVre::DtPlayerStationState::app().
|
overridevirtual |
Virtual destructor.
Ensures proper cleanup of network connected state resources.
|
overridevirtual |
Called when the state is entered.
Initializes network-related resources, registers message handlers, and begins loading simulation resources like model sets and entity definitions. This is called when a network connection is established.
Reimplemented from makVre::DtPlayerStationState.
|
overridevirtual |
Called when the state is exited.
Cleans up resources, disconnects from the network, and unregisters message handlers. This is called when disconnecting from the network or shutting down the application.
Reimplemented from makVre::DtPlayerStationState.
|
overridevirtual |
Called when another state is pushed on top of this one.
Handles adjustments needed when this state is covered by another state on the stack, such as pausing certain network operations or UI updates.
Reimplemented from makVre::DtPlayerStationState.
|
overridevirtual |
Called when the state becomes the topmost state again.
Restores functionality when this state is exposed after another state has been popped from the stack, resuming network operations and updates.
Reimplemented from makVre::DtPlayerStationState.
|
overridevirtual |
Updates the state each frame.
| dt | Time in seconds since the last update |
Handles per-frame processing in the connected state, including monitoring resource loading progress, processing network events, and updating UI elements as needed.
Reimplemented from makVre::DtPlayerStationState.
|
virtual |
Invokes Vortex debug callbacks.
Used for debugging physics simulation (Vortex) related functionality. This is typically only called during development and testing.
|
protectedvirtual |
Message handlers.
Handles messages requesting to stop the network connection
| msg | Pointer to the stop connection message |
Processes requests to voluntarily disconnect from the network, typically initiated by the user or another part of the application.
|
protectedvirtual |
Handles network disconnection messages.
| msg | Pointer to the network disconnected message |
Processes notifications that the network connection has been lost, transitioning to an appropriate state to handle the disconnection.
|
protectedvirtual |
Handles SMS load completion messages.
| msg | Pointer to the SMS load complete message |
Processes notifications that Simulation Model Sets (SMS) have finished loading, updating the application state accordingly.
|
protectedvirtual |
Handles visual model definitions loaded messages.
| msg | Pointer to the visual model definitions loaded message |
Processes notifications that visual model definitions have finished loading, which is a prerequisite for proper entity visualization.
|
protected |
Name of the network driver being used.
Identifies which network protocol driver (e.g., DIS, HLA) is currently active.
|
protected |
Shared pointer to the loading page UI.
Provides the user interface for displaying loading progress while resources are being loaded in the background.
|
protected |
Bitmask tracking the status of SMS resource loading.
Used to track which specific resource types have completed loading, allowing the application to determine when all required resources are ready.