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

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)