VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvDiGuy
DtDiGuyMotionModel.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2008 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtDiGuyMotionModel.h,v $ $Revision: 1.18 $ $State: Exp $
7
******************************************************************************/
8
12
13
#pragma once
14
#include <
vrvDiGuy/vrvDiGuy.h
>
15
#include <
vrvCore/DtMotionModel.h
>
16
#include <
vrvCore/DtFixedSmoother.h
>
17
18
class
DtTaitBryan;
19
class
DtVector
;
20
21
namespace
makVrv
22
{
23
class
DtModel;
24
class
DtDiGuyCharacterModel;
25
class
DtDe;
26
29
class
DT_DLL_VRVDIGUY
DtDiGuyMotionModel
:
public
DtVRLDeadReckonerMotionModel
<DtFixedSmoother>
30
{
31
public
:
32
34
DtDiGuyMotionModel
(
DtDe
& igs,
DtSceneObject
* owner);
35
37
DtDiGuyMotionModel
(
const
DtDiGuyMotionModel
& orig,
double
time);
38
40
virtual
~
DtDiGuyMotionModel
();
41
43
virtual
DtMotionModel
* clone(
double
simTime);
44
47
virtual
bool
motionModelHandlesUpdate()
const
;
48
49
virtual
void
updateMotion(
double
simulationTime);
50
52
virtual
void
modelAdded(
DtModel
*);
53
55
virtual
void
modelRemoved(
DtModel
*);
56
57
protected
:
58
59
//Calculate the direction Forward/Back/Left/Right
60
int
calculateDirectionFBLR(
const
DtTaitBryan& ori,
const
DtVector
& vel);
61
62
//Calculate the direction Forward/Back
63
int
calculateDirectionFB(
const
DtTaitBryan& ori,
const
DtVector
& vel);
64
65
void
setCharacter(
DtDiGuyCharacterModel
* character);
66
67
protected
:
68
DtDe
&
myDe
;
69
70
mutable
DtVector
myPositionReturn
;
71
mutable
DtTaitBryan
myOrientationReturn
;
72
73
DtVector
myAcceleration
;
74
75
DtDiGuyCharacterModel
*
myCharacter
;
76
DtSceneObject
*
myObjectToMove
;
77
int
myLastDirection
;
78
int
myLastPosture
;
79
double
myLastSpeed
;
80
const
char
*
myLastAction
;
81
double
myLastActionTime
;
82
bool
myLastWeaponDeployed
;
83
84
};
85
88
class
DT_DLL_VRVDIGUY
DtDiGuyMotionModelCreator
:
public
DtMotionModelCreator
89
{
90
public
:
92
virtual
~
DtDiGuyMotionModelCreator
();
93
95
virtual
DtMotionModel
* create(
DtSceneObject
* owner,
DtDe
& de);
96
};
97
}
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)