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

Detailed Description

The DtPlayerStationDriver class manages the lifecycle of the DtPlayerStationApp, including initialization, update, and shutdown. It maintains the entity resolver, provides intersection services, registers message handlers, and handles debug functionality for the application.

#include <vrvPlayerStationDriver.h>

Inheritance diagram for makVre::DtPlayerStationDriver:
[legend]

Public Member Functions

 DtPlayerStationDriver (makVrv::DtAgentManager &am)
 
virtual ~DtPlayerStationDriver () override
 
virtual const std::string & className () const override
 
virtual void setPlayerStationApp (makVre::DtPlayerStationApp *app)
 
virtual makVre::DtPlayerStationAppplayerStationApp ()
 
virtual makVre::DtEntityResolverconnectionObjects ()
 
virtual bool onStart () override
 
virtual bool onStop () override
 
virtual bool onTick () override
 

Protected Member Functions

virtual void populateVreMessageFactory ()
 
virtual void logGraphics ()
 
virtual void debugCallback ()
 

Protected Attributes

makVrv::DtDe & myDe
 
DtPlayerStationAppmyApp
 
DtIntersectormyIntersector
 
DtEntityResolvermyEntityResolver
 

Constructor & Destructor Documentation

◆ DtPlayerStationDriver()

makVre::DtPlayerStationDriver::DtPlayerStationDriver ( makVrv::DtAgentManager & am)

Constructor that initializes the driver and associated resources.

Parameters
amReference to the agent manager used for entity management

Creates and initializes an instance of the DtEntityResolver for entity tracking. Initializes the DtEntityHelper instance with the new DtEntityResolver. Creates and initializes the instance of the DtVreMessageManager, and calls populateVreMessageFactory() to register the stock set of DtVreMessage creators.

◆ ~DtPlayerStationDriver()

virtual makVre::DtPlayerStationDriver::~DtPlayerStationDriver ( )
overridevirtual

Virtual destructor that cleans up resources.

Deletes the entity resolver and application instance if they exist

Member Function Documentation

◆ className()

virtual const std::string & makVre::DtPlayerStationDriver::className ( ) const
overridevirtual

Gets the name of this C++ class.

Returns
String containing "DtPlayerStationDriver"

◆ setPlayerStationApp()

virtual void makVre::DtPlayerStationDriver::setPlayerStationApp ( makVre::DtPlayerStationApp * app)
virtual

Sets the player station application instance.

Parameters
appPointer to the top-level player station application instance

Caches the application in myApp. Creates a new DtVrvIntersector instance and sets a pointer to it in the application's DtAttributeStore with the name "DtIntersector". Sets a pointer to the DtEntityResolver in the application's DtAttributeStore with the name "DtEntityResolver".

◆ playerStationApp()

virtual makVre::DtPlayerStationApp & makVre::DtPlayerStationDriver::playerStationApp ( )
virtual

Gets the current player station application instance.

Returns
Reference to the player station application

Provides access to the current player station application instance

◆ connectionObjects()

virtual makVre::DtEntityResolver & makVre::DtPlayerStationDriver::connectionObjects ( )
virtual

Gets the entity resolver used by this driver.

Returns
Reference to the entity resolver instance

Returns a reference to DtEntityResolver, the object used to maintain a mapping between the various identifiers associated with simulation objects in the VR-Engage front-end.

◆ onStart()

virtual bool makVre::DtPlayerStationDriver::onStart ( )
overridevirtual

Initializes the driver and associated components.

Returns
True if initialization was successful

Installs the DtVreDebugManager and DtQtQuickRenderer instances, enables the display of audio capture device config in the GUI, and registers callback for DtVreMessage instances received for display in the SHIFT+F4 debug menu. Also logs graphics driver information.

◆ onStop()

virtual bool makVre::DtPlayerStationDriver::onStop ( )
overridevirtual

Shuts down the driver and associated components.

Returns
True if shutdown was successful

Calls shutdown() on the DtPlayerStationApp instance and deletes it, and calls shutdown() on the DtVreDebugManager.

◆ onTick()

virtual bool makVre::DtPlayerStationDriver::onTick ( )
overridevirtual

Updates the driver and associated components every frame.

Returns
True if update was successful

Calculates the time delta since the last frame, updates the DtVreMessageManager and DtPlayerStationApp instances.

◆ populateVreMessageFactory()

virtual void makVre::DtPlayerStationDriver::populateVreMessageFactory ( )
protectedvirtual

Registers all message types with the message factory.

Registers stock DtVreMessage class creators with the DtVreMessageFactory instance to allow creation and processing of all supported message types in the application.

◆ logGraphics()

virtual void makVre::DtPlayerStationDriver::logGraphics ( )
protectedvirtual

Logs graphics hardware and driver information.

Gathers vendor, renderer, OpenGL version, and driver information and writes it to the application log file for diagnostic purposes.

◆ debugCallback()

virtual void makVre::DtPlayerStationDriver::debugCallback ( )
protectedvirtual

Displays debug information about received messages.

Presents the set of all DtVreMessages received this frame in the SHIFT+F4 Debug menu, including message types and counts.

Member Data Documentation

◆ myDe

makVrv::DtDe& makVre::DtPlayerStationDriver::myDe
protected

Reference to the VR-Vantage display engine instance.

◆ myApp

DtPlayerStationApp* makVre::DtPlayerStationDriver::myApp
protected

The player station application instance.

Represents the VR-Engage application as a whole

◆ myIntersector

DtIntersector* makVre::DtPlayerStationDriver::myIntersector
protected

The intersection handler for the application.

DtVrvIntersector instance created by this class for use throughout the application. A pointer to it is stored in the DtPlayerStationApp instance's DtAttributeStore under the name "DtIntersector".

◆ myEntityResolver

DtEntityResolver* makVre::DtPlayerStationDriver::myEntityResolver
protected

The entity resolution system for the application.

DtEntityResolver instance created for looking up various types of identifiers objects may have in the application. A pointer to this instance is stored in the DtPlayerStationApp instance's DtAttributeStore under the name "DtEntityResolver".


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