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

Detailed Description

This class implements a specialized network interface for local entities in VREngage. It extends the standard interface with VREngage-specific functionality, particularly for improving the network update rates of player-controlled entities to ensure smoother movement and interactions in networked simulations.

#include <vreIndLocalNetIfWithProperties.h>

Inheritance diagram for makVre::DtVreIndividualLocalEntityNetInterface:
[legend]

Public Member Functions

 DtVreIndividualLocalEntityNetInterface (makVrf::DtStateData *vrfObject, makVrf::DtVrlinkNetworkInterface *mgr, bool publishObject=true)
 
virtual ~DtVreIndividualLocalEntityNetInterface ()
 
virtual void updatePublisher ()
 
virtual DtString type () const
 

Static Public Member Functions

static DtSimObjectNetInterface * creator (makVrf::DtStateData *vrfObject, makVrf::DtVrlinkNetworkInterface *mgr, bool publishObject)
 

Protected Member Functions

virtual bool isPlayerControlled ()
 

Private Member Functions

 DtVreIndividualLocalEntityNetInterface ()
 
 DtVreIndividualLocalEntityNetInterface (const DtVreIndividualLocalEntityNetInterface &orig)
 
const DtVreIndividualLocalEntityNetInterfaceoperator= (const DtVreIndividualLocalEntityNetInterface &orig)
 

Constructor & Destructor Documentation

◆ DtVreIndividualLocalEntityNetInterface() [1/3]

makVre::DtVreIndividualLocalEntityNetInterface::DtVreIndividualLocalEntityNetInterface ( makVrf::DtStateData * vrfObject,
makVrf::DtVrlinkNetworkInterface * mgr,
bool publishObject = true )

Constructor.

Parameters
vrfObjectThe state data object for the entity
mgrThe VRLink network interface manager
publishObjectFlag indicating whether this object should be published (default: true)

Initializes a new network interface for the specified entity with VREngage-specific enhancements for network publication.

Referenced by DtVreIndividualLocalEntityNetInterface(), and operator=().

◆ ~DtVreIndividualLocalEntityNetInterface()

virtual makVre::DtVreIndividualLocalEntityNetInterface::~DtVreIndividualLocalEntityNetInterface ( )
virtual

Destructor.

Cleans up resources used by the network interface.

◆ DtVreIndividualLocalEntityNetInterface() [2/3]

makVre::DtVreIndividualLocalEntityNetInterface::DtVreIndividualLocalEntityNetInterface ( )
private

Default constructor (not implemented)

Default constructor is private and not implemented to prevent creation of instances without proper initialization.

◆ DtVreIndividualLocalEntityNetInterface() [3/3]

makVre::DtVreIndividualLocalEntityNetInterface::DtVreIndividualLocalEntityNetInterface ( const DtVreIndividualLocalEntityNetInterface & orig)
private

Copy constructor (not implemented)

Parameters
origThe source object

Copy constructor is private and not implemented to prevent copying.

References DtVreIndividualLocalEntityNetInterface().

Member Function Documentation

◆ updatePublisher()

virtual void makVre::DtVreIndividualLocalEntityNetInterface::updatePublisher ( )
virtual

Updates the VR-Link publisher with current entity state.

Copies entity state data from the VR-Forces state components into the VR-Link state repository for publication to the network. This implementation enhances the update behavior for player-controlled entities to improve network fidelity of movement and other state changes.

Note
For player-controlled entities, this function forces an update on every frame regardless of internal change detection, ensuring smoother network representation.

◆ type()

virtual DtString makVre::DtVreIndividualLocalEntityNetInterface::type ( ) const
virtual

Gets the type identifier for this network interface.

Returns
String identifying this network interface type

Returns a unique type identifier string for this custom network interface. This is overridden to completely replace the default VR-Forces interface in the interface factory system.

◆ creator()

static DtSimObjectNetInterface * makVre::DtVreIndividualLocalEntityNetInterface::creator ( makVrf::DtStateData * vrfObject,
makVrf::DtVrlinkNetworkInterface * mgr,
bool publishObject )
static

Factory function to create a new instance of this interface.

Parameters
vrfObjectThe state data object for the entity
mgrThe VRLink network interface manager
publishObjectFlag indicating whether this object should be published
Returns
Pointer to the newly created network interface

Static factory function used by the interface creation system to instantiate new instances of this network interface type.

◆ isPlayerControlled()

virtual bool makVre::DtVreIndividualLocalEntityNetInterface::isPlayerControlled ( )
protectedvirtual

Determines if the entity is currently player-controlled.

Returns
True if the entity is player-controlled, false otherwise

Checks if the entity is currently being controlled by a player in any role. This is determined by examining the extended data map for an entry starting with the string "role-" and having a non-empty string value, which indicates that a player is assigned to the entity in some capacity.

◆ operator=()

const DtVreIndividualLocalEntityNetInterface & makVre::DtVreIndividualLocalEntityNetInterface::operator= ( const DtVreIndividualLocalEntityNetInterface & orig)
private

Assignment operator (not implemented)

Parameters
origThe source object
Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreIndividualLocalEntityNetInterface().


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