VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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>
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 
31  {
32  public:
33 
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:
79 
81  mutable DtTaitBryan myOrientationReturn;
84 
90  double myLastSpeed;
91  const char* myLastAction;
94  };
95 
99  {
100  public:
102  virtual ~DtDiGuyMotionModelCreator();
103 
105  virtual DtMotionModel* create(DtSceneObject* owner,DtDe& de);
106  };
107 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)