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

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)