6 #ifndef CNOID_BODY_BODY_MOTION_H_INCLUDED
7 #define CNOID_BODY_BODY_MOTION_H_INCLUDED
9 #include <cnoid/MultiValueSeq>
10 #include <cnoid/MultiAffine3Seq>
11 #include <cnoid/Vector3Seq>
22 virtual void setDimension(
int numFrames,
int numJoints,
bool clearNewArea =
false);
24 void setDimension(
int numFrames,
int numJoints,
int numLinks,
bool clearNewArea =
false);
26 virtual void setNumParts(
int numParts,
bool clearNewElements =
false);
27 virtual int getNumParts()
const;
29 inline int numJoints()
const {
return jointPosSeq_->numParts(); }
30 inline int numLinks()
const {
return linkPosSeq_->numParts(); }
32 inline double frameRate()
const {
return jointPosSeq_->frameRate(); }
33 virtual double getFrameRate()
const;
34 virtual void setFrameRate(
double frameRate);
37 return std::max(jointPosSeq_->numFrames(), linkPosSeq_->numFrames());
39 virtual int getNumFrames()
const;
40 virtual void setNumFrames(
int n,
bool clearNewArea =
false);
64 Frame(
const BodyMotion& motion,
int frame) : motion_(motion), frame_(frame) { }
66 Frame(
const Frame& org) : motion_(org.motion_), frame_(org.frame_) { }
69 inline int frame()
const {
return frame_; }
80 bool loadStandardYamlFormat(
const std::string& filename);
81 bool saveAsStandardYamlFormat(
const std::string& filename);