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
DtPointObjectEncoder Class Reference

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

+ Inheritance diagram for DtPointObjectEncoder:
+ Collaboration diagram for DtPointObjectEncoder:

Public Member Functions

 DtPointObjectEncoder (double _locThreshold=1.0, double _oriThreshold=1.0)
 CTOR.
 DtPointObjectEncoder (const DtPointObjectEncoder &orig)
 Copy CTOR.
virtual ~DtPointObjectEncoder ()
 Virtual DTOR.
DtPointObjectEncoderoperator= (const DtPointObjectEncoder &orig)
 Assignment operator.
virtual DtPointObjectStatePdustateMsg (const DtPointObjectRepository &stateRep, const DtPointObjectRepository &asSeenByRemote)
 Constructs a PDU from the state repository.
 DtCLONE_ENCODER (DtPointObjectEncoder)
virtual void setLocThreshold (double val)
 Set/Query the value of the Location Update Threshold.
virtual double locThreshold () const
 Set/Query the value of the Location Update Threshold.
virtual void setOriThreshold (double val)
 Set/Query the value of the Orientation Update Threshold.
virtual double oriThreshold () const
 Set/Query the value of the Orientation Update Threshold.
- Public Member Functions inherited from DtStateEncoder
 DtStateEncoder ()
 Default constructor.
virtual ~DtStateEncoder ()
 Destructor.
 DtStateEncoder (const DtStateEncoder &orig)
 Copy constructor.
DtStateEncoderoperator= (const DtStateEncoder &orig)
 Assignment operator.
void setSendNeeded ()
 Sets myForceSendNeeded to true.
virtual DtPduEncoderclone () const =0
 clone.
virtual void encode (DtPdu *pdu)
 This is a dummy method for backwards compatibility with DIS encoders.
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.
virtual bool sendNeededAttributeRecords (const DtStateRepository &stateRep, const DtStateRepository &asSeenByRemote) const
 In order to modify records in place, and have them sent, we need to compare the stateRep with the As seen by remote.
- Public Member Functions inherited from DtPduEncoder
virtual ~DtPduEncoder ()

Protected Member Functions

virtual bool sendNeeded (const DtPointObjectRepository &stateRep, const DtPointObjectRepository &asSeenByRemote)
 Determine if a state message needs to be sent.
virtual void updateModifications (const DtPointObjectRepository &lclRep, const DtPointObjectRepository &remRep)
 Update the PDU's modification flags.

Protected Attributes

DtPointObjectStatePdu myPdu
double myLocThresholdSquared
double myOriThresholdSquared
- Protected Attributes inherited from DtStateEncoder
bool myForceSendNeeded

Detailed Description

Provides encoding logic for the DtPointObjectStatePdu class.

Constructor & Destructor Documentation

DtPointObjectEncoder::DtPointObjectEncoder ( double  _locThreshold = 1.0,
double  _oriThreshold = 1.0 
)

CTOR.

DtPointObjectEncoder::DtPointObjectEncoder ( const DtPointObjectEncoder orig)

Copy CTOR.

virtual DtPointObjectEncoder::~DtPointObjectEncoder ( )
virtual

Virtual DTOR.

Member Function Documentation

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

Set/Query the value of the Location Update Threshold.

References myLocThresholdSquared.

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

Assignment operator.

double DtPointObjectEncoder::oriThreshold ( ) const
inlinevirtual

Set/Query the value of the Orientation Update Threshold.

References myOriThresholdSquared.

virtual bool DtPointObjectEncoder::sendNeeded ( const DtPointObjectRepository stateRep,
const DtPointObjectRepository asSeenByRemote 
)
protectedvirtual

Determine if a state message needs to be sent.

void DtPointObjectEncoder::setLocThreshold ( double  val)
inlinevirtual

Set/Query the value of the Location Update Threshold.

References myLocThresholdSquared.

void DtPointObjectEncoder::setOriThreshold ( double  val)
inlinevirtual

Set/Query the value of the Orientation Update Threshold.

References myOriThresholdSquared.

virtual DtPointObjectStatePdu* DtPointObjectEncoder::stateMsg ( const DtPointObjectRepository stateRep,
const DtPointObjectRepository 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 DtPointObjectEncoder::updateModifications ( const DtPointObjectRepository lclRep,
const DtPointObjectRepository remRep 
)
protectedvirtual

Update the PDU's modification flags.

Member Data Documentation

double DtPointObjectEncoder::myLocThresholdSquared
protected

Referenced by locThreshold(), and setLocThreshold().

double DtPointObjectEncoder::myOriThresholdSquared
protected

Referenced by oriThreshold(), and setOriThreshold().

DtPointObjectStatePdu DtPointObjectEncoder::myPdu
protected

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

Document ID: Generated on Fri May 15 06:36:13 EDT 2015 from SVN revision 153263
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)