VR-Link API Documentation for HLA Evolved
 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) 1992-2025 MAK Technologies, Inc
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
14 #include <vl/stateEncoder.h>
17 
20 class DT_DLL_VL DtLinearObjectEncoder : public DtStateEncoder
21 {
22 public:
23 
25  DtLinearObjectEncoder( double locThresh = 1.0, double oriThresh = 1.0 );
26 
28  DtLinearObjectEncoder( const DtLinearObjectEncoder& orig );
29 
31  virtual ~DtLinearObjectEncoder();
32 
34  DtLinearObjectEncoder& operator = ( const DtLinearObjectEncoder& orig );
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 
60  DtCLONE_ENCODER( DtLinearObjectEncoder );
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 
74  DtLinearObjectStatePdu myPdu;
75  double myLocThresholdSquared;
76  double myOriThresholdSquared;
77 
78 };
79 
80 
81 inline void DtLinearObjectEncoder::setLocThreshold( double val )
82 {
83  myLocThresholdSquared = val*val;
84 }
85 
86 inline double DtLinearObjectEncoder::locThreshold() const
87 {
88  return sqrt( myLocThresholdSquared );
89 }
90 
91 inline void DtLinearObjectEncoder::setOriThreshold( double val )
92 {
93  myOriThresholdSquared = val*val;
94 }
95 
96 inline double DtLinearObjectEncoder::oriThreshold() const
97 {
98  return sqrt( myOriThresholdSquared );
99 }
100 
101 #endif // DtDIS
Contains the DtLinearObjectRepository class declaration.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
This file declares the DIS version of DtStateEncoder.
Instances of DtLinearObjectRepository are used to maintain state information needed by linear object ...
Definition: linearObjectRepository.h:49
Contains the DtLinearObjectStatePdu class declaration.

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)