|
VR-Engage
2.2
|
This class implements a player component that manages the Common Image Generator Interface (CIGI) host functionality. It handles communication with image generators through the CIGI protocol, managing session state, view definitions, entity synchronization, and other CIGI-related operations in the VREngage system.
The component initializes CIGI communication, processes messages from the VREngage messaging system, and synchronizes the state of the simulation with the image generator during each tick of the simulation loop.
#include <cigiHostControl.h>
Public Member Functions | |
| DtCigiHostControl () | |
| virtual | ~DtCigiHostControl () override |
| virtual bool | initialize (DtPlayerStation *player, DtInitTable &config) override |
| virtual void | tick (double dt) override |
| virtual void | postTick () |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual bool | postInitialize () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Member Functions | |
| virtual void | initializeStateAttributes () override |
| DtVreMessageResult | handleCigiSessionStatusMessage (DtVreMessage *msg) |
| virtual void | initViews () |
| virtual void | updateViews () |
Protected Attributes | |
| DtSimulationAddress | mySimAddress |
| std::string | mySessionName |
| bool | mySessionStarted |
| int | myOtwGroupId |
| DtVector32 | myObserverPositionOffset |
| DtTaitBryan | myObserverRotationOffset |
| double | myFramerateLimit |
| std::shared_ptr< DtTimedSection > | myPerformanceTimer |
| boost::signals2::scoped_connection | myPostTickConnection |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| makVre::DtCigiHostControl::DtCigiHostControl | ( | ) |
Default constructor.
Initializes a new instance of the CIGI host control component with default settings.
|
overridevirtual |
Virtual destructor.
Cleans up resources and terminates any active CIGI sessions.
|
overridevirtual |
Initializes the CIGI host control component.
| player | Pointer to the player station that owns this component |
| config | Configuration table with initialization parameters |
This method initializes the CIGI host control component with the specified player station and configuration. It sets up the CIGI session parameters, registers message handlers, and initializes the view definitions.
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates the CIGI host control during each simulation tick.
| dt | Delta time in seconds since the last tick |
This method is called during each simulation tick to update the CIGI host control component. It processes pending messages, updates entity positions and states, and sends updates to the image generator.
Implements makVre::DtPlayerComponent.
|
virtual |
Performs post-tick processing for the CIGI host control.
This method is called after all components have been ticked to perform any final processing before the next simulation frame begins.
|
overridevirtual |
Shuts down the CIGI host control component.
This method terminates the CIGI session, unregisters message handlers, and releases any resources used by the component.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the component type identifier.
Returns the type identifier string for this component, which is used by the VR-Engage framework for component identification and management. The returned value matches DtCigiHostControlType.
Implements makVre::DtPlayerComponent.
|
overrideprotectedvirtual |
Initializes the state attributes for the CIGI host control.
This method sets up the state attributes that will be synchronized with the image generator through the CIGI protocol.
Reimplemented from makVre::DtPlayerComponent.
|
protected |
Handles CIGI session status messages.
| msg | Pointer to the received message |
This method processes messages related to CIGI session status, such as session creation, connection, disconnection, etc.
|
protectedvirtual |
Initializes view definitions for the CIGI session.
This method sets up the initial view definitions that will be synchronized with the image generator.
|
protectedvirtual |
Updates view definitions during simulation.
This method updates the view definitions based on the current state of the simulation and sends the updates to the image generator.
|
protected |
Simulation address for the CIGI host.
|
protected |
Name of the CIGI session.
|
protected |
Flag indicating whether the CIGI session is started.
|
protected |
Group ID for the out-the-window (OTW) view.
|
protected |
Position offset for the observer in the CIGI coordinate system.
|
protected |
Rotation offset for the observer in the CIGI coordinate system.
|
protected |
Framerate limit for CIGI updates in Hz.
|
protected |
Performance timer for measuring CIGI processing time.
|
protected |
Connection for the post-tick signal.