VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrfExtProtocol
vrfObjectStateUpdate.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2004 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: vrfObjectStateUpdate.h,v $ $Revision: 1.10 $ $State: Exp $
7
*******************************************************************************/
8
9
#ifndef DtVrfObjectStateUpdate_H_
10
#define DtVrfObjectStateUpdate_H_
11
12
#include <vector>
13
#include <
vrfExtProtocol/simInterfaceContent.h
>
14
#include <vlpi/netStructs.h>
15
16
struct
DtNetVrfObjectStateHeader
17
{
18
DtNetU32
myNumberOfRecords
;
19
DtNetU32
myPadding
;
20
};
21
22
struct
DtNetVrfObjectStateRecord
23
{
24
// HACK for visual studio 6.0. For some reason, VC6 would not accept this
25
// structure in a std::container class without an operator= defined.
26
DtNetVrfObjectStateRecord
&
operator=
(
const
DtNetVrfObjectStateRecord
& other)
27
{
28
myGeocentricPosition
= other.
myGeocentricPosition
;
29
myGeocentricVelocity
= other.
myGeocentricVelocity
;
30
myGeocentricAcceleration
= other.
myGeocentricAcceleration
;
31
myGeocentricOrientation
= other.
myGeocentricOrientation
;
32
myObjectIdentifier
= other.
myObjectIdentifier
;
33
return
*
this
;
34
};
35
36
DtNet64Vector
myGeocentricPosition
;
37
DtVector32
myGeocentricVelocity
;
38
DtVector32
myGeocentricAcceleration
;
39
DtNetEulerAngles
myGeocentricOrientation
;
40
DtNetU32
myPadding1
;
41
DtNetEntityIdentifier
myObjectIdentifier
;
42
DtNetU16
myPadding
;
43
};
44
45
46
// class DtVrfObjectStateUpdate:
47
//
48
// Instances of DtVrfObjectStateUpdate are
49
50
#include <
vrfExtProtocol/vrfExtProtocolDefines.h
>
51
class
DT_DLL_vrfExtProtocol
DtVrfObjectStateUpdate
:
public
DtSimInterfaceContent
52
{
53
public
:
54
55
// default constructor
56
DtVrfObjectStateUpdate
();
57
58
// destructor
59
virtual
~
DtVrfObjectStateUpdate
();
60
61
DtVrfObjectStateUpdate
(
const
DtVrfObjectStateUpdate
& orig);
62
63
DtVrfObjectStateUpdate
&
operator=
(
const
DtVrfObjectStateUpdate
& orig);
64
65
// Returns the type of Interface Content; DtVrfObjectStateMessageType.
66
virtual
int
type
()
const
;
67
68
virtual
DtSimInterfaceContent
*
clone
()
const
;
69
70
// Removes all records that have been added to the object state update.
71
virtual
void
clear();
72
73
virtual
void
add(
const
DtNetVrfObjectStateRecord
& record);
74
75
virtual
const
std::vector<DtNetVrfObjectStateRecord>& records()
const
;
76
77
virtual
int
netRepSize
()
const
;
78
virtual
bool
setFromNet
(
const
char
* contentBuffer,
79
unsigned
contentSize);
80
virtual
bool
setToNet
();
81
82
virtual
void
printDataToString
(
DtString
& str);
83
84
static
DtSimInterfaceContent
* creator();
85
86
protected
:
87
88
std::vector<DtNetVrfObjectStateRecord>
myRecords
;
89
};
90
91
#endif
Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)