VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
linearObjectEncoderDIS.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2014 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
14 #include <vl/stateEncoder.h>
17 
21 {
22 public:
23 
25  DtLinearObjectEncoder( double locThresh = 1.0, double oriThresh = 1.0 );
26 
29 
31  virtual ~DtLinearObjectEncoder();
32 
35 
40  virtual DtLinearObjectStatePdu* stateMsg(
41  const DtLinearObjectRepository& stateRep,
42  const DtLinearObjectRepository& asSeenByRemote );
43 
46 
47  virtual inline void setLocThreshold( double val );
48  virtual inline double locThreshold() const;
49 
51 
54 
55  virtual inline void setOriThreshold( double val );
56  virtual inline double oriThreshold() const;
57 
59 
61 
62 protected:
63 
65  virtual bool sendNeeded( const DtLinearObjectRepository& stateRep,
66  const DtLinearObjectRepository& asSeenByRemote );
67 
69  virtual void updateModifications( const DtLinearObjectRepository& lclRep,
70  const DtLinearObjectRepository& remRep );
71 
72 protected:
73 
77 
78 };
79 
80 
81 inline void DtLinearObjectEncoder::setLocThreshold( double val )
82 {
83  myLocThresholdSquared = val*val;
84 }
85 
87 {
88  return sqrt( myLocThresholdSquared );
89 }
90 
91 inline void DtLinearObjectEncoder::setOriThreshold( double val )
92 {
93  myOriThresholdSquared = val*val;
94 }
95 
97 {
98  return sqrt( myOriThresholdSquared );
99 }
100 
101 #endif // DtDIS
Contains the DtLinearObjectRepository class declaration.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
virtual void setLocThreshold(double val)
Set/Query the value of the Location Update Threshold.
Definition: linearObjectEncoderDIS.h:81
DtLinearObjectStatePdu myPdu
Definition: linearObjectEncoderDIS.h:74
The DtStateEncoder class provides a base class for all DIS encoders.
Definition: stateEncoder.h:33
Instances of DtLinearObjectStatePdu are used to communicate information about the addition/modificati...
Definition: linearObjectStatePdu.h:33
double myLocThresholdSquared
Definition: linearObjectEncoderDIS.h:75
double myOriThresholdSquared
Definition: linearObjectEncoderDIS.h:76
virtual double oriThreshold() const
Set/Query the value of the Orientation Update Threshold.
Definition: linearObjectEncoderDIS.h:96
virtual void setOriThreshold(double val)
Set/Query the value of the Orientation Update Threshold.
Definition: linearObjectEncoderDIS.h:91
Provides encoding logic for the DtLinearObjectStatePdu class.
Definition: linearObjectEncoderDIS.h:20
virtual double locThreshold() const
Set/Query the value of the Location Update Threshold.
Definition: linearObjectEncoderDIS.h:86
DtStateEncoder & operator=(const DtStateEncoder &orig)
Assignment operator.
#define DtCLONE_ENCODER(encoderClass)
Definition: stateEncoder.h:26
This file declares the DIS version of DtStateEncoder.
Instances of DtLinearObjectRepository are used to maintain state information needed by linear object ...
Definition: linearObjectRepository.h:49
Contains the DtLinearObjectStatePdu class declaration.

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)