VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pointObjectEncoderDIS.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
14 #include <vl/stateEncoder.h>
15 #include <vl/pointObjectStatePdu.h>
17 
21 {
22 public:
23 
25  DtPointObjectEncoder( double _locThreshold = 1.0, double _oriThreshold = 1.0 );
26 
29 
31  virtual ~DtPointObjectEncoder();
32 
35 
40  virtual DtPointObjectStatePdu* stateMsg(
41  const DtPointObjectRepository& stateRep,
42  const DtPointObjectRepository& 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 DtPointObjectRepository& stateRep,
66  const DtPointObjectRepository& asSeenByRemote );
67 
69  virtual void updateModifications( const DtPointObjectRepository& lclRep,
70  const DtPointObjectRepository& remRep );
71 
72 protected:
73 
77 
78 };
79 
80 inline void DtPointObjectEncoder::setLocThreshold( double val )
81 {
82  myLocThresholdSquared = val*val;
83 }
84 
86 {
87  return sqrt(myLocThresholdSquared);
88 }
89 
90 inline void DtPointObjectEncoder::setOriThreshold( double val )
91 {
92  myOriThresholdSquared = val*val;
93 }
94 
96 {
97  return sqrt(myOriThresholdSquared);
98 }
99 
100 #endif // DtDIS
virtual void setLocThreshold(double val)
Set/Query the value of the Location Update Threshold.
Definition: pointObjectEncoderDIS.h:80
Contains the DtPointObjectRepository class declaration.
Instances of DtPointObjectStatePdu are used to state information for synthetic environment objects...
Definition: pointObjectStatePdu.h:29
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
virtual double oriThreshold() const
Set/Query the value of the Orientation Update Threshold.
Definition: pointObjectEncoderDIS.h:95
virtual void setOriThreshold(double val)
Set/Query the value of the Orientation Update Threshold.
Definition: pointObjectEncoderDIS.h:90
double myLocThresholdSquared
Definition: pointObjectEncoderDIS.h:75
Contains the DtPointObjectStatePdu class declaration.
The DtStateEncoder class provides a base class for all DIS encoders.
Definition: stateEncoder.h:33
DtPointObjectStatePdu myPdu
Definition: pointObjectEncoderDIS.h:74
Instances of DtPointObjectRepository are used to maintain state information needed by point environme...
Definition: pointObjectRepository.h:31
Provides encoding logic for the DtPointObjectStatePdu class.
Definition: pointObjectEncoderDIS.h:20
DtStateEncoder & operator=(const DtStateEncoder &orig)
Assignment operator.
#define DtCLONE_ENCODER(encoderClass)
Definition: stateEncoder.h:26
virtual double locThreshold() const
Set/Query the value of the Location Update Threshold.
Definition: pointObjectEncoderDIS.h:85
This file declares the DIS version of DtStateEncoder.
double myOriThresholdSquared
Definition: pointObjectEncoderDIS.h:76

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)