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

Detailed Description

DtRemoteEntityConnector handles requests to change properties of remote entities, such as visibility state, engine sound effects, and character model visualization. It works with entity elements and visualizers to modify the presentation of entities in the simulation environment.

#include <remoteEntityConnector.h>

Inheritance diagram for makVre::DtRemoteEntityConnector:
[legend]

Public Member Functions

 DtRemoteEntityConnector ()
 
virtual ~DtRemoteEntityConnector () override
 
virtual void install (DtPlayerStationApp *app, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection) override
 
virtual void tick () override
 
virtual void shutdown () override
 
- Public Member Functions inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector
 DtSimEventConnector ()
 
virtual ~DtSimEventConnector () override
 
- Public Member Functions inherited from makVre::DtConnector
 DtConnector ()
 
virtual ~DtConnector ()
 
virtual DtConnectorType type ()
 
virtual std::string name ()
 

Protected Member Functions

virtual makVre::DtVreMessageResult handleEntityVisibility (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleEntityEngineSound (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleHideEntityOccupantsLocally (makVre::DtVreMessage *msg)
 
virtual void handleElementCreated (makVrv::DtEntityElement *element)
 

Protected Attributes

boost::signals2::scoped_connection myElementCreatedConnection
 
- Protected Attributes inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector
DtPlayerStationAppmyApp
 
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * myConnection
 
- Protected Attributes inherited from makVre::DtConnector
std::string myName
 
DtConnectorType myType
 

Additional Inherited Members

- Public Types inherited from makVre::DtConnector
enum  DtConnectorType {
  DIS , HLA13 , HLA1516 , HLA1516E ,
  HLA4
}
 
- Static Public Member Functions inherited from makVre::DtConnector
static std::string extension (DtConnectorType type)
 

Constructor & Destructor Documentation

◆ DtRemoteEntityConnector()

makVre::DtRemoteEntityConnector::DtRemoteEntityConnector ( )

Default constructor.

Initializes the connector with name "RemoteEntity"

◆ ~DtRemoteEntityConnector()

virtual makVre::DtRemoteEntityConnector::~DtRemoteEntityConnector ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ install()

virtual void makVre::DtRemoteEntityConnector::install ( DtPlayerStationApp * app,
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * connection )
overridevirtual

Installs the remote entity connector with the application and connection.

Parameters
appPointer to the player station application
connectionPointer to the protocol-specific VR-Link connection

Registers message handlers for entity visibility, occupant visibility, and engine sounds, and connects to the element created signal to handle entity visualization issues

Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.

◆ tick()

virtual void makVre::DtRemoteEntityConnector::tick ( )
overridevirtual

Performs periodic processing (currently does nothing)

Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.

◆ shutdown()

virtual void makVre::DtRemoteEntityConnector::shutdown ( )
overridevirtual

Shuts down the remote entity connector.

Removes all message handlers and disconnects from the element created signal

Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.

◆ handleEntityVisibility()

virtual makVre::DtVreMessageResult makVre::DtRemoteEntityConnector::handleEntityVisibility ( makVre::DtVreMessage * msg)
protectedvirtual

Handles requests to change entity visibility.

Parameters
msgPointer to the entity visibility message
Returns
Message result indicating how the message was handled

Processes SetEntityVisiblityMessage by finding the entity element and modifying its character model agent's visibility

◆ handleEntityEngineSound()

virtual makVre::DtVreMessageResult makVre::DtRemoteEntityConnector::handleEntityEngineSound ( makVre::DtVreMessage * msg)
protectedvirtual

Handles requests to enable/disable entity engine sounds.

Parameters
msgPointer to the entity engine sound message
Returns
Message result indicating how the message was handled

Processes SetEntityEngineSoundEnabledMessage by finding the entity element and modifying its audio visualizer's engine sound state

◆ handleHideEntityOccupantsLocally()

virtual makVre::DtVreMessageResult makVre::DtRemoteEntityConnector::handleHideEntityOccupantsLocally ( makVre::DtVreMessage * msg)
protectedvirtual

Handles requests to hide entity occupants locally.

Parameters
msgPointer to the hide occupants message
Returns
Message result indicating how the message was handled

Processes SetHideEntityOccupantsLocallyMessage by finding the entity and setting its occupants visibility state

◆ handleElementCreated()

virtual void makVre::DtRemoteEntityConnector::handleElementCreated ( makVrv::DtEntityElement * element)
protectedvirtual

Handles entity element creation events.

Parameters
elementPointer to the newly created entity element

Called when a new entity element is created, ensures proper visualization for elements that are initially not visible

Member Data Documentation

◆ myElementCreatedConnection

boost::signals2::scoped_connection makVre::DtRemoteEntityConnector::myElementCreatedConnection
protected

Connection to the element created signal.

Used to receive notifications when new entity elements are created


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