VR-Forces 4.5 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
vrfExtObjects
extEntityStateRepository.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2015 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
6
#pragma once
7
8
#include <vl/entityStateRepository.h>
9
#include <
vrfExtObjects/vrfExtDiGuyStateRepository.h
>
10
#include <
vrfExtObjects/vrfExtensions.h
>
11
12
#include <list>
13
14
// class DtExtEntityStateRepository:
15
//
16
// Instances of DtExtEntityStateRepository are
19
20
#include <
vrfExtObjects/vrfExtObjectsDefines.h
>
21
class
DT_DLL_vrfExtObjects
DtExtEntityStateRepository
:
public
DtEntityStateRepository
,
22
public
DtVrfExtensions
23
{
24
25
public
:
26
27
// default constructor
28
DtExtEntityStateRepository
();
29
30
// destructor
31
virtual
~
DtExtEntityStateRepository
();
32
33
// copy constructor
34
DtExtEntityStateRepository
(
const
DtExtEntityStateRepository
& orig);
35
36
// assignment operator
37
DtExtEntityStateRepository
&
operator=
(
const
DtExtEntityStateRepository
& orig);
38
39
// Return a copy/empty object of the same type as this.
40
virtual
DtStateRepository
* clone(
bool
copy =
false
)
const
;
41
42
// Compares us against the supplied state repository and returns what's
43
// changed
44
virtual
int
compare(
const
DtExtEntityStateRepository
* rhs);
45
46
// Returns what has changed since the last time we called compare
47
virtual
int
compareToMostRecent();
48
49
// Compares articulated parts in the local copy to current values
50
// and returns a non-zero value if modified. If modified, copies current
51
// into last value
52
virtual
int
compareArtParts(
const
std::list<int>&);
53
54
// Compares each value that is valid, and, if any have changed, returns
55
// DtChanged_Other
56
virtual
int
compareArtParts(
const
DtArticulatedPart
* source,
const
DtArticulatedPart
* target);
57
58
// Returns true if our stashed location is different than our
59
// current location
60
virtual
bool
locationsDifferent(
bool
updateIfDifferent);
61
62
// If the DI guy repository being set is *not* of the extended type, then create one of the extended type (passing in the di guy state rep into the copy
63
// constructor) before setting in the base class
64
virtual
void
setDiGuyStateRepository(
DtDIGuyObjectStateRepository
* diGuyStateRep );
65
66
// DI-Guy extension. Get/set body weight
67
virtual
void
setBodyWeight(
double
);
68
virtual
double
bodyWeight()
const
;
69
70
public
:
72
bool
needsVrfDataUpdate()
const
;
73
void
clearVrfDataNeedsUpdate();
74
76
bool
hasVrfObjectDataMessage()
const
;
77
81
void
setHasVrfObjectDataMessage(
bool
);
82
83
virtual
DtExtDiGuyStateRepository
* extDiGuyStateRepository();
84
virtual
const
DtExtDiGuyStateRepository
* extDiGuyStateRepository()
const
;
85
92
virtual
void
createDiGuyStateRep();
93
94
public
:
95
96
static
DtExtEntityStateRepository
* create();
97
98
protected
:
99
virtual
void
extensionModified
();
100
101
public
:
102
// Override to set myHasVrfObjectDataMessage to true
103
virtual
bool
setupFromVrfObjectData
(
const
DtIfVrfObjectData
& data);
104
105
protected
:
106
DtExtEntityStateRepository
*
myLastCopy
;
107
bool
myVrfObjectDataUpdated
;
108
109
// If true, a vrf object data message has been seen for this object. By default, this is false
110
bool
myHasVrfObjectDataMessage
;
111
};
112
113
inline
bool
DtExtEntityStateRepository::hasVrfObjectDataMessage
()
const
114
{
115
return
myHasVrfObjectDataMessage
;
116
}
117
118
inline
void
DtExtEntityStateRepository::setHasVrfObjectDataMessage
(
bool
b)
119
{
120
myHasVrfObjectDataMessage
= b;
121
}
122
123
inline
bool
DtExtEntityStateRepository::needsVrfDataUpdate
()
const
124
{
125
return
myVrfObjectDataUpdated
;
126
}
127
128
inline
void
DtExtEntityStateRepository::clearVrfDataNeedsUpdate
()
129
{
130
myVrfObjectDataUpdated
=
false
;
131
}
132
133
inline
void
DtExtEntityStateRepository::extensionModified
()
134
{
135
myVrfObjectDataUpdated
=
true
;
136
}
Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)