VR-Forces 4.3 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
vrvDiGuy
DtDiGuyMotionModel.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2015 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvDiGuy/vrvDiGuy.h
>
13
#include <
vrvCore/DtMotionModel.h
>
14
#include <
vrvCore/DtFixedSmoother.h
>
15
#include <diguyMotionDirection.h>
16
#include <diguyMotionPosture.h>
17
18
class
DtTaitBryan;
19
class
DtVector
;
20
class
diguyCharacterGuide;
21
22
namespace
makVrv
23
{
24
class
DtModel;
25
class
DtDiGuyCharacterModel;
26
class
DtDe;
27
30
class
DT_DLL_VRVDIGUY
DtDiGuyMotionModel
:
public
DtVRLDeadReckonerMotionModel
<DtFixedSmoother>
31
{
32
public
:
33
35
DtDiGuyMotionModel
(
DtDe
& igs,
DtSceneObject
* owner);
36
38
DtDiGuyMotionModel
(
const
DtDiGuyMotionModel
& orig,
double
time);
39
41
virtual
~
DtDiGuyMotionModel
();
42
44
virtual
DtMotionModel
* clone(
double
simTime);
45
48
virtual
bool
motionModelHandlesUpdate()
const
;
49
51
virtual
void
updateMotion(
double
simulationTime);
52
54
virtual
const
char
* getActionFromDescription(diguyMotionDirection direction, diguyMotionPosture posture,
double
actualSpeed);
55
57
virtual
void
modelAdded(
DtModel
*);
58
60
virtual
void
modelRemoved(
DtModel
*);
61
//#ifdef USE_DIGUY_GUIDES
62
virtual
const
DtVector
& approxLocation(
DtTime
curTime)
const
;
63
//#endif
64
65
protected
:
66
67
//Calculate the direction Forward/Back/Left/Right
68
int
calculateDirectionFBLR(
const
DtTaitBryan& ori,
const
DtVector
& vel);
69
70
//Calculate the direction Forward/Back
71
int
calculateDirectionFB(
const
DtTaitBryan& ori,
const
DtVector
& vel);
72
74
void
setCharacter(
DtDiGuyCharacterModel
* character);
75
76
77
protected
:
78
DtDe
&
myDe
;
79
80
mutable
DtVector
myPositionReturn
;
81
mutable
DtTaitBryan
myOrientationReturn
;
82
mutable
DtVector
mApproxLocation
;
83
84
DtVector
myAcceleration
;
85
DtDiGuyCharacterModel
*
myCharacter
;
86
DtSceneObject
*
myObjectToMove
;
87
int
myLastDirection
;
88
int
myLastPosture
;
89
double
myLastSpeed
;
90
const
char
*
myLastAction
;
91
double
myLastActionTime
;
92
bool
myLastWeaponDeployed
;
93
};
94
97
class
DT_DLL_VRVDIGUY
DtDiGuyMotionModelCreator
:
public
DtMotionModelCreator
98
{
99
public
:
101
virtual
~
DtDiGuyMotionModelCreator
();
102
104
virtual
DtMotionModel
* create(
DtSceneObject
* owner,
DtDe
& de);
105
};
106
}
Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)