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) 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 
21 {
22 public:
23 
25  DtLinearObjectEncoder( double locThresh = 1.0, double oriThresh = 1.0 );
26 
29 
31  virtual ~DtLinearObjectEncoder();
32 
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 
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 
70  std::vector<DtU8> myModifications;
74 
75 };
76 
77 
78 inline void DtLinearObjectEncoder::setLocThreshold( double val )
79 {
80  myLocThresholdSquared = val*val;
81 }
82 
84 {
85  return sqrt( myLocThresholdSquared );
86 }
87 
88 inline void DtLinearObjectEncoder::setOriThreshold( double val )
89 {
90  myOriThresholdSquared = val*val;
91 }
92 
94 {
95  return sqrt( myOriThresholdSquared );
96 }
97 
98 #endif // DtDIS
Contains the DtLinearObjectRepository class declaration.
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
virtual void setLocThreshold(double val)
Set/Query the value of the Location Update Threshold.
Definition: linearObjectEncoderDIS.h:78
DtLinearObjectStatePdu myPdu
Definition: linearObjectEncoderDIS.h:69
The DtStateEncoder class provides a base class for all DIS encoders.
Definition: stateEncoder.h:33
Instances of DtLinearObjectStatePdu are used to communicate information about the addition/modificati...
Definition: linearObjectStatePdu.h:33
double myLocThresholdSquared
Definition: linearObjectEncoderDIS.h:72
double myOriThresholdSquared
Definition: linearObjectEncoderDIS.h:73
virtual double oriThreshold() const
Set/Query the value of the Orientation Update Threshold.
Definition: linearObjectEncoderDIS.h:93
virtual void setOriThreshold(double val)
Set/Query the value of the Orientation Update Threshold.
Definition: linearObjectEncoderDIS.h:88
Provides encoding logic for the DtLinearObjectStatePdu class.
Definition: linearObjectEncoderDIS.h:20
std::vector< DtU8 > myModifications
Definition: linearObjectEncoderDIS.h:70
virtual double locThreshold() const
Set/Query the value of the Location Update Threshold.
Definition: linearObjectEncoderDIS.h:83
DtStateEncoder & operator=(const DtStateEncoder &orig)
Assignment operator.
bool myIsModifications
Definition: linearObjectEncoderDIS.h:71
#define DtCLONE_ENCODER(encoderClass)
Definition: stateEncoder.h:26
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)