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
examples
addAttr
myEsr.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
#pragma once
6
7
#if DtHLA
8
9
#include <stdio.h>
10
#include <
vl/entityStateRepository.h
>
11
16
class
MyEntityStateRep :
public
DtEntityStateRepository
17
{
18
public
:
19
21
virtual
void
setMass(
float
mass);
23
virtual
float
mass()
const
;
24
26
virtual
void
printData
()
const
;
27
28
public
:
29
31
static
DtEntityStateRepository
*
create
();
32
34
virtual
DtStateRepository
*
clone
(
bool
copy =
false
)
const
;
35
36
protected
:
37
38
float
myMass;
39
};
40
41
42
inline
void
MyEntityStateRep::setMass(
float
temp)
43
{
44
myMass = temp;
45
}
46
47
inline
float
MyEntityStateRep::mass()
const
48
{
49
return
myMass;
50
}
51
52
inline
void
MyEntityStateRep::printData
()
const
53
{
54
DtEntityStateRepository::printData
();
55
printf(
"Mass: %lf\n"
, mass());
56
}
57
58
inline
DtEntityStateRepository
*
MyEntityStateRep::create
()
59
{
60
return
new
MyEntityStateRep();
61
}
62
63
inline
DtStateRepository
*
MyEntityStateRep::clone
(
bool
copy)
const
64
{
65
if
(copy)
66
{
67
return
new
MyEntityStateRep(*
this
);
68
}
69
else
70
{
71
return
new
MyEntityStateRep();
72
}
73
}
74
75
#endif
76
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
)