VR-Vantage API Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Tutorials
File List
File Members
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/ifaceCont.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
;
// 96 bytes
37
DtNet64Vector
myGeocentricVelocity
;
// 96 bytes
38
DtNet64Vector
myGeocentricAcceleration
;
// 96 bytes
39
DtNetEulerAngles
myGeocentricOrientation
;
// 12 bytes
40
DtNetU32
myPadding1
;
// 4 bytes
41
DtNetEntityIdentifier
myObjectIdentifier
;
// 6 bytes
42
DtNetU16
myPadding
;
// 2 bytes
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
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)