VR-Forces 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) 2025 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <vrvMath/DtVector3.h>
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  const unsigned int FreezeAnimation = BOOST_BINARY(0100);
27  };
35  {
36  public:
38  DtIndirectAnimatingDof(DtDe& de, osgSim::DOFTransform* dof);
39 
41  virtual ~DtIndirectAnimatingDof();
42  private:
44  DtIndirectAnimatingDof() = delete;
48  DtIndirectAnimatingDof& operator=(const DtIndirectAnimatingDof& rhs) = delete;
49  public:
52  virtual void updateAnimation(const osg::FrameStamp* frameStamp);
53 
55  virtual void setTranslation(const Vector3_64& trans, const Vector3_64& transVel);
56 
58  virtual void setOrientation(const Vector3_64& hpr, const Vector3_64& hprVel);
59 
61  virtual void setOrientation(const Vector3_64& hprVel, bool forceUpdate);
62 
64  virtual osgSim::DOFTransform* dof(void);
65 
67  virtual bool hasVelocity(void) const;
68 
70  virtual void setAnimationFlags(int val);
71 
73  virtual int animationFlags(void) const;
74  protected:
76  virtual bool update(unsigned int previousTraversalNumber, double newTime, double previousTime);
77 
79  virtual void adjustDofConstraintsIfNecessary();
80 
82  virtual void constrainTranslationAndHprIfNecessary(void);
83 
85  virtual bool hasHprLimits(void) const;
86  protected:
88  const DtDe& myDe;
89 
92 
95 
97 
100 
103 
106 
110 
113 
116 
117  bool myHasVelocity = true;
118 
119  int myAnimationFlags = 0;
120  };
121 }
const DtDe & myDe
reference to the internally held DtDe
Definition: DtIndirectAnimatingDof.h:88
float myLastUpdate
Frame time of the most recent animation update.
Definition: DtIndirectAnimatingDof.h:105
Vector3_64 myHpr
Current Heading/Pitch/Roll angles in radians.
Definition: DtIndirectAnimatingDof.h:99
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::ref_ptr< osgSim::DOFTransform > myDof
the reference to the dof that animates
Definition: DtIndirectAnimatingDof.h:91
Wrapper class for wrapping osgSim::DOFTransform animations. Allows to set a translation &amp; translation...
Definition: DtIndirectAnimatingDof.h:34
3 dimensional vector
const unsigned int DontDirtyBoundOnSet
Definition: DtIndirectAnimatingDof.h:25
const unsigned int FreezeAnimation
Definition: DtIndirectAnimatingDof.h:26
float mySmoothCompleteTime
Frame time when smoothing is complete (if enabled). This will be the time the last update arrived fro...
Definition: DtIndirectAnimatingDof.h:109
Vector3_64 myTransVel
Definition: DtIndirectAnimatingDof.h:96
const unsigned int ClearAnimationOnFinish
Definition: DtIndirectAnimatingDof.h:24
Vector3_64 mySmoothTransVel
If actively smoothing, use this velocity instead for translation.
Definition: DtIndirectAnimatingDof.h:112
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:76
Vector3_64 mySmoothHprVel
If actively smoothing, use this velocity instead for rotation.
Definition: DtIndirectAnimatingDof.h:115
Vector3_64 myTrans
Current translation in meters.
Definition: DtIndirectAnimatingDof.h:94
Vector3_64 myHprVel
Current Heading/Pitch/Roll angular velocity in rad/s.
Definition: DtIndirectAnimatingDof.h:102

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)