VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arealObjectEncoderDIS.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>
15 #include <vl/arealObjectStatePdu.h>
17 
21 {
22 public:
23 
25  DtArealObjectEncoder( double locThresh = 1.0 );
26 
29 
31  virtual ~DtArealObjectEncoder();
32 
35 
40  virtual DtArealObjectStatePdu* stateMsg(
41  const DtArealObjectRepository& stateRep,
42  const DtArealObjectRepository& asSeenByRemote );
43 
46 
47  virtual inline void setLocThreshold( double val );
48  virtual inline double locThreshold() const;
49 
51 
53 
54 protected:
55 
57  virtual bool sendNeeded( const DtArealObjectRepository& stateRep,
58  const DtArealObjectRepository& asSeenByRemote );
59 
61  virtual void updateModifications( const DtArealObjectRepository& lclRep,
62  const DtArealObjectRepository& remRep );
63 
64 protected:
65 
68 
69 };
70 
71 
72 inline void DtArealObjectEncoder::setLocThreshold( double val )
73 {
74  myLocThresholdSquared = val*val;
75 }
76 
78 {
79  return sqrt( myLocThresholdSquared );
80 }
81 
82 #endif // DtDIS

Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)