V-ART
jointaction.h
Go to the documentation of this file.
1 
5 #ifndef VART_JOINTACTION_H
6 #define VART_JOINTACTION_H
7 
8 #include "vart/baseaction.h"
9 #include "vart/joint.h"
10 #include <list>
11 
12 namespace VART {
13  class DofMover;
14  class JointMover;
15  class Joint;
16  class Interpolator;
17  class DMModifier;
26  class JointAction : public BaseAction {
27  friend std::ostream& operator<<(std::ostream& output, const JointAction& action);
28  public:
29  JointAction();
30  virtual ~JointAction() { }
31 
44  JointMover* AddJointMover(Joint* jointPtr,
45  float newDuration,
46  const Interpolator& interpolator);
47 
49  JointMover* AddJointMover(Joint* jointPtr, JointMover* jointMover);
50 
52  void SetPriority(unsigned int newPriority) { priority = newPriority; }
53 
55  void GetFinalTimes(std::list<float>* resultPtr);
56 
58  void ModifyDofMovers(DMModifier& mod);
59 
64  DofMover* SearchDofMover(Joint* jointPtr, Joint::DofID dof);
65 
67  void GetJoints(std::list<Joint*>* listPtr);
68 
70  virtual void Activate();
71  protected:
72  // PROTECTED NESTED CLASSES
74  {
75  public:
76  Initializer();
77  virtual ~Initializer() {}
78  virtual void Initialize();
79  };
80  // PROTECTED METHODS
81  virtual void Move();
82  void DeactivateDofMovers();
83 
86  // PROTECTED ATTRIBUTES
87  std::list<JointMover*> jointMoverList;
88  unsigned int priority;
89  private:
90  }; // end class declaration
91 } // end namespace
92 
93 #endif
Representation of joints.
Definition: joint.h:34
void ModifyDofMovers(DMModifier &mod)
Modifies dof movers.
JointMover * AddJointMover(Joint *jointPtr, float newDuration, const Interpolator &interpolator)
Adds a joint mover to the action.
virtual ~JointAction()
Definition: jointaction.h:30
void SetPriority(unsigned int newPriority)
Sets the priority of an action.
Definition: jointaction.h:52
void GetJoints(std::list< Joint * > *listPtr)
Returns a list of all target joints.
std::list< JointMover * > jointMoverList
Definition: jointaction.h:87
Animations. Transformations acting through time. Abstract class.
Definition: baseaction.h:21
Action Initializer.
Definition: baseaction.h:68
An object that modifies noisy dof movers.
Definition: dmmodifier.h:15
void AddToActiveInstancesList()
Adds itself to list of active instances, in priority order.
Definition: jointaction.cpp:60
void DeactivateDofMovers()
Definition: jointaction.cpp:90
Header file for V-ART class "Joint".
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
void GetFinalTimes(std::list< float > *resultPtr)
Returns a ordered list with all different final times for every dof mover.
Definition: jointaction.cpp:97
unsigned int priority
Definition: jointaction.h:88
Header file for V-ART class "BaseAction".
friend std::ostream & operator<<(std::ostream &output, const JointAction &action)
DofMover * SearchDofMover(Joint *jointPtr, Joint::DofID dof)
Returns a dof mover.
virtual void Activate()
Activates a JointAction.
Definition: jointaction.cpp:45
virtual void Move()
Make the action update its targets.