VR-Link API Documentation for HLA 1.3
 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 
20 class DT_DLL_VL DtArealObjectEncoder : public DtStateEncoder
21 {
22 public:
23 
25  DtArealObjectEncoder( double locThresh = 1.0 );
26 
29 
31  virtual ~DtArealObjectEncoder();
32 
34  DtArealObjectEncoder& operator = ( const DtArealObjectEncoder& orig );
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 
52  DtCLONE_ENCODER( DtArealObjectEncoder );
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 
66  DtArealObjectStatePdu myPdu;
67  double myLocThresholdSquared;
68 
69 };
70 
71 
72 inline void DtArealObjectEncoder::setLocThreshold( double val )
73 {
74  myLocThresholdSquared = val*val;
75 }
76 
77 inline double DtArealObjectEncoder::locThreshold() const
78 {
79  return sqrt( myLocThresholdSquared );
80 }
81 
82 #endif // DtDIS
Contains the DtArealObjectRepository class declaration.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
Instances of DtArealObjectEncoder are used to encode areal object state messages from a state reposit...
Definition: arealObjectEncoderHLA.h:31
This file declares DtArealObjectStatePdu – DIS Only.
Instances of DtArealObjectRepository are used to maintain state information needed by areal object en...
Definition: arealObjectRepository.h:30
This file declares the DIS version of DtStateEncoder.

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)