VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtLinearObjectEncoder Class Reference

Provides encoding logic for the DtLinearObjectStatePdu class. More...

+ Inheritance diagram for DtLinearObjectEncoder:
+ Collaboration diagram for DtLinearObjectEncoder:

Public Member Functions

 DtLinearObjectEncoder (double locThresh=1.0, double oriThresh=1.0)
 CTOR. More...
 
 DtLinearObjectEncoder (const DtLinearObjectEncoder &orig)
 Copy CTOR. More...
 
virtual ~DtLinearObjectEncoder ()
 Virtual DTOR. More...
 
DtLinearObjectEncoder & operator= (const DtLinearObjectEncoder &orig)
 Assignment operator. More...
 
virtual DtLinearObjectStatePdu * stateMsg (const DtLinearObjectRepository &stateRep, const DtLinearObjectRepository &asSeenByRemote)
 Constructs a PDU from the state repository. More...
 
 DtCLONE_ENCODER (DtLinearObjectEncoder)
 
virtual void setLocThreshold (double val)
 Set/Query the value of the Location Update Threshold. More...
 
virtual double locThreshold () const
 Set/Query the value of the Location Update Threshold. More...
 
virtual void setOriThreshold (double val)
 Set/Query the value of the Orientation Update Threshold. More...
 
virtual double oriThreshold () const
 Set/Query the value of the Orientation Update Threshold. More...
 
- Public Member Functions inherited from DtStateEncoder
 DtStateEncoder ()
 Default constructor. More...
 
virtual ~DtStateEncoder ()
 Destructor. More...
 
 DtStateEncoder (const DtStateEncoder &orig)
 Copy constructor. More...
 
DtStateEncoder & operator= (const DtStateEncoder &orig)
 Assignment operator. More...
 
virtual void setSendNeeded ()
 Sets myForceSendNeeded to true. More...
 
virtual DtU32 changedState () const
 
virtual void clearChangedState ()
 
virtual bool isChangedStateBit (DtU32 st) const
 
virtual void resetChangedStateBit (DtU32 st)
 
virtual void setChangedStateBit (DtU32 st)
 
virtual DtPduEncoder * clone () const =0
 clone. More...
 
virtual void encode (DtPdu *pdu)
 This is a dummy method for backwards compatibility with DIS encoders. More...
 
virtual void fillOutAttributeRecords (const DtStateRepository &stateRep, DtPduWithAttributeRecordSets *pdu, const DtEntityIdentifier &id, bool clearBeforeAdding=true)
 DIS 7 requires filling the Attribute Records for a coupled Attribute PDU. More...
 
virtual bool sendNeededAttributeRecords (const DtStateRepository &stateRep, const DtStateRepository &asSeenByRemote)
 In order to modify records in place, and have them sent, we need to compare the stateRep with the As seen by remote. More...
 
- Public Member Functions inherited from DtPduEncoder
virtual ~DtPduEncoder ()
 

Protected Member Functions

virtual bool sendNeeded (const DtLinearObjectRepository &stateRep, const DtLinearObjectRepository &asSeenByRemote)
 Determine if a state message needs to be sent. More...
 
virtual void updateModifications (const DtLinearObjectRepository &lclRep, const DtLinearObjectRepository &remRep)
 Check each segment for location, orientation, and other differences Record the location and orientation differences in the myModifications vector for each segment (resizing as needed) Also set the modifications flag if there are modifications for any of the segments. More...
 

Protected Attributes

DtLinearObjectStatePdu myPdu
 
std::vector< DtU8 > myModifications
 
bool myIsModifications
 
double myLocThresholdSquared
 
double myOriThresholdSquared
 
- Protected Attributes inherited from DtStateEncoder
bool myForceSendNeeded
 
DtU32 myChangedState
 

Detailed Description

Provides encoding logic for the DtLinearObjectStatePdu class.

Constructor & Destructor Documentation

DtLinearObjectEncoder::DtLinearObjectEncoder ( double  locThresh = 1.0,
double  oriThresh = 1.0 
)

CTOR.

DtLinearObjectEncoder::DtLinearObjectEncoder ( const DtLinearObjectEncoder &  orig)

Copy CTOR.

virtual DtLinearObjectEncoder::~DtLinearObjectEncoder ( )
virtual

Virtual DTOR.

Member Function Documentation

DtLinearObjectEncoder::DtCLONE_ENCODER ( DtLinearObjectEncoder  )
double DtLinearObjectEncoder::locThreshold ( ) const
inlinevirtual

Set/Query the value of the Location Update Threshold.

References myLocThresholdSquared.

DtLinearObjectEncoder& DtLinearObjectEncoder::operator= ( const DtLinearObjectEncoder &  orig)

Assignment operator.

double DtLinearObjectEncoder::oriThreshold ( ) const
inlinevirtual

Set/Query the value of the Orientation Update Threshold.

References myOriThresholdSquared.

virtual bool DtLinearObjectEncoder::sendNeeded ( const DtLinearObjectRepository &  stateRep,
const DtLinearObjectRepository &  asSeenByRemote 
)
protectedvirtual

Determine if a state message needs to be sent.

void DtLinearObjectEncoder::setLocThreshold ( double  val)
inlinevirtual

Set/Query the value of the Location Update Threshold.

References myLocThresholdSquared.

void DtLinearObjectEncoder::setOriThreshold ( double  val)
inlinevirtual

Set/Query the value of the Orientation Update Threshold.

References myOriThresholdSquared.

virtual DtLinearObjectStatePdu* DtLinearObjectEncoder::stateMsg ( const DtLinearObjectRepository &  stateRep,
const DtLinearObjectRepository &  asSeenByRemote 
)
virtual

Constructs a PDU from the state repository.

stateMsg determines whether a Designator PDU needs to be sent and constructs one of it does.

Returns
PDU if send is needed, and NULL if not
virtual void DtLinearObjectEncoder::updateModifications ( const DtLinearObjectRepository &  lclRep,
const DtLinearObjectRepository &  remRep 
)
protectedvirtual

Check each segment for location, orientation, and other differences Record the location and orientation differences in the myModifications vector for each segment (resizing as needed) Also set the modifications flag if there are modifications for any of the segments.

Member Data Documentation

bool DtLinearObjectEncoder::myIsModifications
protected
double DtLinearObjectEncoder::myLocThresholdSquared
protected

Referenced by locThreshold(), and setLocThreshold().

std::vector<DtU8> DtLinearObjectEncoder::myModifications
protected
double DtLinearObjectEncoder::myOriThresholdSquared
protected

Referenced by oriThreshold(), and setOriThreshold().

DtLinearObjectStatePdu DtLinearObjectEncoder::myPdu
protected

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

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)