VR-Link API Documentation for HLA 4
 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-2026 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 
29 
31  virtual ~DtLinearObjectEncoder();
32 
34  DtLinearObjectEncoder& operator = ( const DtLinearObjectEncoder& orig );
35 
39  virtual DtLinearObjectStatePdu* stateMsg(
40  const DtLinearObjectRepository& stateRep,
41  const DtLinearObjectRepository& asSeenByRemote );
42 
45  virtual inline void setLocThreshold( double val );
46  virtual inline double locThreshold() const;
48 
51  virtual inline void setOriThreshold( double val );
52  virtual inline double oriThreshold() const;
54 
55  DtCLONE_ENCODER( DtLinearObjectEncoder );
56 
57 protected:
58 
60  virtual bool sendNeeded( const DtLinearObjectRepository& stateRep, const DtLinearObjectRepository& asSeenByRemote );
61 
65  virtual void updateModifications(const DtLinearObjectRepository& lclRep, const DtLinearObjectRepository& remRep);
66 
67 protected:
68 
69  DtLinearObjectStatePdu myPdu;
70  std::vector<DtU8> myModifications;
71  bool myIsModifications;
72  double myLocThresholdSquared;
73  double myOriThresholdSquared;
74 
75 };
76 
77 
78 inline void DtLinearObjectEncoder::setLocThreshold( double val )
79 {
80  myLocThresholdSquared = val*val;
81 }
82 
83 inline double DtLinearObjectEncoder::locThreshold() const
84 {
85  return sqrt( myLocThresholdSquared );
86 }
87 
88 inline void DtLinearObjectEncoder::setOriThreshold( double val )
89 {
90  myOriThresholdSquared = val*val;
91 }
92 
93 inline double DtLinearObjectEncoder::oriThreshold() const
94 {
95  return sqrt( myOriThresholdSquared );
96 }
97 
98 #endif // DtDIS
Contains the DtLinearObjectRepository class declaration.
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
DtLinearObjectEncoder is the base class for HLA environment object state encoders that encode linear ...
Definition: linearObjectEncoderHLA.h:22
This file declares the DIS version of DtStateEncoder.
Instances of DtLinearObjectRepository are used to maintain state information needed by linear object ...
Definition: linearObjectRepository.h:50
Contains the DtLinearObjectStatePdu class declaration.

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)