VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vl
pointObjectEncoderDIS.h
Go to the documentation of this file.
1
/****************************************************************************
2
* Copyright (c) 2013 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/pointObjectStatePdu.h
>
16
#include <
vl/pointObjectRepository.h
>
17
20
class
DT_DLL_VL
DtPointObjectEncoder
:
public
DtStateEncoder
21
{
22
public
:
23
25
DtPointObjectEncoder
(
double
_locThreshold = 1.0,
double
_oriThreshold = 1.0 );
26
28
DtPointObjectEncoder
(
const
DtPointObjectEncoder
& orig );
29
31
virtual
~
DtPointObjectEncoder
();
32
34
DtPointObjectEncoder
&
operator =
(
const
DtPointObjectEncoder
& orig );
35
40
virtual
DtPointObjectStatePdu
* stateMsg(
41
const
DtPointObjectRepository
& stateRep,
42
const
DtPointObjectRepository
& 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
(
DtPointObjectEncoder
);
61
62
protected
:
63
65
virtual
bool
sendNeeded(
const
DtPointObjectRepository
& stateRep,
66
const
DtPointObjectRepository
& asSeenByRemote );
67
69
virtual
void
updateModifications(
const
DtPointObjectRepository
& lclRep,
70
const
DtPointObjectRepository
& remRep );
71
72
protected
:
73
74
DtPointObjectStatePdu
myPdu
;
75
double
myLocThresholdSquared
;
76
double
myOriThresholdSquared
;
77
78
};
79
80
inline
void
DtPointObjectEncoder::setLocThreshold
(
double
val )
81
{
82
myLocThresholdSquared
= val*val;
83
}
84
85
inline
double
DtPointObjectEncoder::locThreshold
()
const
86
{
87
return
sqrt(
myLocThresholdSquared
);
88
}
89
90
inline
void
DtPointObjectEncoder::setOriThreshold
(
double
val )
91
{
92
myOriThresholdSquared
= val*val;
93
}
94
95
inline
double
DtPointObjectEncoder::oriThreshold
()
const
96
{
97
return
sqrt(
myOriThresholdSquared
);
98
}
99
100
#endif // DtDIS
Document ID: Generated on Mon Feb 6 18:36:34 EST 2017 from SVN revision 173107
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)