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

Detailed Description

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>

Inheritance diagram for makVre::DtCigiHostControl:
[legend]

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 DtPlayerStationplayer ()
 
virtual DtAttributeHandleplayerAttributeStore ()
 
virtual const DtAttributeHandleplayerAttributeStore () 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
 
DtPlayerStationmyPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolvermyResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 

Constructor & Destructor Documentation

◆ DtCigiHostControl()

makVre::DtCigiHostControl::DtCigiHostControl ( )

Default constructor.

Initializes a new instance of the CIGI host control component with default settings.

◆ ~DtCigiHostControl()

virtual makVre::DtCigiHostControl::~DtCigiHostControl ( )
overridevirtual

Virtual destructor.

Cleans up resources and terminates any active CIGI sessions.

Member Function Documentation

◆ initialize()

virtual bool makVre::DtCigiHostControl::initialize ( DtPlayerStation * player,
DtInitTable & config )
overridevirtual

Initializes the CIGI host control component.

Parameters
playerPointer to the player station that owns this component
configConfiguration table with initialization parameters
Returns
True if initialization succeeded, false otherwise

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

◆ tick()

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

Updates the CIGI host control during each simulation tick.

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

◆ postTick()

virtual void makVre::DtCigiHostControl::postTick ( )
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.

◆ shutdown()

virtual void makVre::DtCigiHostControl::shutdown ( )
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.

◆ type()

virtual const char * makVre::DtCigiHostControl::type ( ) const
overridevirtual

Returns the component type identifier.

Returns
String identifier for this component type

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.

◆ initializeStateAttributes()

virtual void makVre::DtCigiHostControl::initializeStateAttributes ( )
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.

◆ handleCigiSessionStatusMessage()

DtVreMessageResult makVre::DtCigiHostControl::handleCigiSessionStatusMessage ( DtVreMessage * msg)
protected

Handles CIGI session status messages.

Parameters
msgPointer to the received message
Returns
Message processing result

This method processes messages related to CIGI session status, such as session creation, connection, disconnection, etc.

◆ initViews()

virtual void makVre::DtCigiHostControl::initViews ( )
protectedvirtual

Initializes view definitions for the CIGI session.

This method sets up the initial view definitions that will be synchronized with the image generator.

◆ updateViews()

virtual void makVre::DtCigiHostControl::updateViews ( )
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.

Member Data Documentation

◆ mySimAddress

DtSimulationAddress makVre::DtCigiHostControl::mySimAddress
protected

Simulation address for the CIGI host.

◆ mySessionName

std::string makVre::DtCigiHostControl::mySessionName
protected

Name of the CIGI session.

◆ mySessionStarted

bool makVre::DtCigiHostControl::mySessionStarted
protected

Flag indicating whether the CIGI session is started.

◆ myOtwGroupId

int makVre::DtCigiHostControl::myOtwGroupId
protected

Group ID for the out-the-window (OTW) view.

◆ myObserverPositionOffset

DtVector32 makVre::DtCigiHostControl::myObserverPositionOffset
protected

Position offset for the observer in the CIGI coordinate system.

◆ myObserverRotationOffset

DtTaitBryan makVre::DtCigiHostControl::myObserverRotationOffset
protected

Rotation offset for the observer in the CIGI coordinate system.

◆ myFramerateLimit

double makVre::DtCigiHostControl::myFramerateLimit
protected

Framerate limit for CIGI updates in Hz.

◆ myPerformanceTimer

std::shared_ptr<DtTimedSection> makVre::DtCigiHostControl::myPerformanceTimer
protected

Performance timer for measuring CIGI processing time.

◆ myPostTickConnection

boost::signals2::scoped_connection makVre::DtCigiHostControl::myPostTickConnection
protected

Connection for the post-tick signal.


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