VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectAnimatingDof.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2022 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
16 #include <osgSim/DOFTransform>
17 
18 #include <boost/utility/binary.hpp>
19 
20 namespace makVrv
21 {
22  namespace DtIndirectAnimationFlags
23  {
24  const unsigned int ClearAnimationOnFinish = BOOST_BINARY(0001);
25  const unsigned int DontDirtyBoundOnSet = BOOST_BINARY(0010);
26  };
34  {
35  public:
37  DtIndirectAnimatingDof(DtDe& de, osgSim::DOFTransform* dof);
38 
40  virtual ~DtIndirectAnimatingDof();
41  private:
43  DtIndirectAnimatingDof() = delete;
47  DtIndirectAnimatingDof& operator=(const DtIndirectAnimatingDof& rhs) = delete;
48  public:
51  virtual void updateAnimation(const osg::FrameStamp* frameStamp);
52 
54  virtual void setTranslation(const Vector3_64& trans, const Vector3_64& transVel);
55 
57  virtual void setOrientation(const Vector3_64& hpr, const Vector3_64& hprVel);
58 
60  virtual void setOrientation(const Vector3_64& hprVel, bool forceUpdate);
61 
63  virtual osgSim::DOFTransform* dof(void);
64 
66  virtual bool hasVelocity(void) const;
67 
69  virtual void setAnimationFlags(int val);
70 
72  virtual int animationFlags(void) const;
73  protected:
75  virtual bool update(unsigned int previousTraversalNumber, double newTime, double previousTime);
76 
78  virtual void adjustDofConstraintsIfNecessary();
79 
81  virtual void constrainTranslationAndHprIfNecessary(void);
82 
84  virtual bool hasHprLimits(void) const;
85  protected:
87  const DtDe& myDe;
88 
91 
94 
96 
99 
102 
105 
109 
112 
115 
116  bool myHasVelocity = true;
117 
118  int myAnimationFlags = 0;
119  };
120 }
const DtDe & myDe
reference to the internally held DtDe
Definition: DtIndirectAnimatingDof.h:87
float myLastUpdate
Frame time of the most recent animation update.
Definition: DtIndirectAnimatingDof.h:104
Vector3_64 myHpr
Current Heading/Pitch/Roll angles in radians.
Definition: DtIndirectAnimatingDof.h:98
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::ref_ptr< osgSim::DOFTransform > myDof
the reference to the dof that animates
Definition: DtIndirectAnimatingDof.h:90
Wrapper class for wrapping osgSim::DOFTransform animations. Allows to set a translation &amp; translation...
Definition: DtIndirectAnimatingDof.h:33
3 dimensional vector
const unsigned int DontDirtyBoundOnSet
Definition: DtIndirectAnimatingDof.h:25
float mySmoothCompleteTime
Frame time when smoothing is complete (if enabled). This will be the time the last update arrived fro...
Definition: DtIndirectAnimatingDof.h:108
Vector3_64 myTransVel
Definition: DtIndirectAnimatingDof.h:95
const unsigned int ClearAnimationOnFinish
Definition: DtIndirectAnimatingDof.h:24
Vector3_64 mySmoothTransVel
If actively smoothing, use this velocity instead for translation.
Definition: DtIndirectAnimatingDof.h:111
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
Vector3_64 mySmoothHprVel
If actively smoothing, use this velocity instead for rotation.
Definition: DtIndirectAnimatingDof.h:114
Vector3_64 myTrans
Current translation in meters.
Definition: DtIndirectAnimatingDof.h:93
Vector3_64 myHprVel
Current Heading/Pitch/Roll angular velocity in rad/s.
Definition: DtIndirectAnimatingDof.h:101

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)