Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Tools/Actorics/JointDataSequencer.h

Go to the documentation of this file.

    00001 /**
    00002 * @file JointDataSequencer.h
    00003 *
    00004 * Definition of class JointDataSequencer.
    00005 *
    00006 * @author Max Risler
    00007 */
    00008
    00009 #ifndef __JOINTDATASEQUENCER_H__
    00010 #define __JOINTDATASEQUENCER_H__
    00011
    00012 #include "Representations/Motion/JointDataSequence.h"
    00013
    00014 /**
    00015 * @class JointDataSequencer
    00016 * A class executing JointDataSequences.
    00017 * It derives from JointDataSequence but adds methods to execute the sequence.
    00018 */
    00019 class JointDataSequencer : public JointDataSequence
    00020 {
    00021 public:
    00022   /** Constructor */
    00023   JointDataSequencer();
    00024
    00025    /** Assignment operator */
    00026   JointDataSequencer& operator=(const JointDataSequence& other);
    00027
    00028   /** write next data from current sequent to jointData */
    00029   void nextSequenceData(JointData& jointData);
    00030
    00031   /** start executing the sequence */
    00032   void start();
    00033
    00034   /** stop executing the sequence */
    00035   void stop();
    00036
    00037   /** returns true if the sequence is being executed */
    00038   bool isRunning();
    00039
    00040 protected:
    00041
    00042   /** interpolate joint data
    00043    * @param jointData stores interpolated data
    00044    * @param from data to start from
    00045    * @param to data to interpolate to
    00046    * @param step index of interpolation step
    00047    * @param len length of interpolation
    00048    */
    00049   void interpolateJointData(
    00050     JointData& jointData,
    00051     const JointData& from, const JointData& to, int step, int len
    00052     );
    00053
    00054   /** true if the sequence is being executed */
    00055   bool running;
    00056
    00057   /** current position in sequence */
    00058   int sequencePos;
    00059
    00060   /** counter for repetition of current sequence line */
    00061   int repetitionCounter;
    00062
    00063 };
    00064
    00065 #endif //__JOINTDATASEQUENCER_H__