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
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
>
16
#include <
vl/arealObjectRepository.h
>
17
20
class
DT_DLL_VL
DtArealObjectEncoder
:
public
DtStateEncoder
21
{
22
public
:
23
25
DtArealObjectEncoder
(
double
locThresh = 1.0 );
26
28
DtArealObjectEncoder
(
const
DtArealObjectEncoder
& orig );
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
Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)