V-ART
dofmover.h
Go to the documentation of this file.
1 
5 #ifndef VART_DOFMOVER_H
6 #define VART_DOFMOVER_H
7 
8 #include <iostream>
9 #include <list>
10 
11 namespace VART {
12  class Dof;
13  class Interpolator;
14  class JointMover;
15 
24  class DofMover {
25  friend class JointMover;
26  friend class Action;
27  friend class JointAction;
28  friend std::ostream& operator<<(std::ostream& output, const DofMover& mover);
29  public:
31  const Dof* GetTarget() { return targetDofPtr; }
32  protected:
33  // PROTECTED METHODS
35  DofMover();
38  DofMover(const VART::DofMover& dofMover);
39  virtual ~DofMover() {}
40  virtual void Initialize(float iniTime, float finTime, float finPos);
42  void SetDof(Dof* dofPtr) { targetDofPtr = dofPtr; }
44  virtual void Move();
48  void GetFinalTime(std::list<float>* resultPtr);
49  // PROTECTED ATTRIBUTES
55  float initialTime;
59  float finalTime;
63  float timeRange;
71  bool active;
72  // STATIC PROTECTED ATTRIBUTES
74  static float goalTime;
76  static bool cycle;
80  static unsigned int priority;
82  static float minimumDuration;
83  }; // end class declaration
84 } // end namespace
85 
86 #endif
bool active
Tells whether a DOF mover is active.
Definition: dofmover.h:71
float initialPosition
Position of target DOF upon activation.
Definition: dofmover.h:53
friend std::ostream & operator<<(std::ostream &output, const DofMover &mover)
static bool cycle
Indicates whether the current action is cyclic.
Definition: dofmover.h:76
float timeRange
How much time to reach target position.
Definition: dofmover.h:63
A coordinated movement of joints in an articulated body.
Definition: action.h:29
static float goalTime
Time of next snapshot, normalized to joint movement's duration.
Definition: dofmover.h:74
Dof * targetDofPtr
Target DOF.
Definition: dofmover.h:65
static float minimumDuration
Minimum duration when computing motion paths.
Definition: dofmover.h:82
float finalTime
Normalized deactivation time.
Definition: dofmover.h:59
const Dof * GetTarget()
Returns a pointer to the target DOF.
Definition: dofmover.h:31
float positionRange
How far from target at activation time.
Definition: dofmover.h:61
static const Interpolator * interpolatorPtr
Position interpolator.
Definition: dofmover.h:78
A coordinated movement of joints in an articulated body.
Definition: jointaction.h:26
Controller for DOF movement.
Definition: dofmover.h:24
Interpolator representation.
Definition: interpolator.h:17
Controllers for joint movement.
Definition: jointmover.h:22
virtual ~DofMover()
Definition: dofmover.h:39
float initialTime
Time of predicted activation (normalized).
Definition: dofmover.h:55
void GetFinalTime(std::list< float > *resultPtr)
Adds the final time to the list.
Definition: dofmover.cpp:77
float activationTime
Time of actual activation (normalized).
Definition: dofmover.h:57
static unsigned int priority
Priority of active action.
Definition: dofmover.h:80
virtual void Move()
Changes target DOF.
Definition: dofmover.cpp:44
void SetDof(Dof *dofPtr)
Sets the target DOF.
Definition: dofmover.h:42
Degree Of Freedom - basic component of a Joint.
Definition: dof.h:28
DofMover()
Creates an unitialized DOF mover.
Definition: dofmover.cpp:18
virtual void Initialize(float iniTime, float finTime, float finPos)
Definition: dofmover.cpp:36
float targetPosition
Target position.
Definition: dofmover.h:51