Choreonoid  1.5
ZMPSeq.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BODY_ZMP_SEQ_H
7 #define CNOID_BODY_ZMP_SEQ_H
8 
9 #include <cnoid/Vector3Seq>
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
15 {
16 public:
17  static const std::string& key();
18 
19  ZMPSeq(int nFrames = 0);
20  ZMPSeq(const ZMPSeq& org);
21  ZMPSeq(const Vector3Seq& org);
22 
23  ZMPSeq& operator=(const ZMPSeq& rhs);
24 
25  virtual AbstractSeq& operator=(const AbstractSeq& rhs);
26  virtual AbstractSeqPtr cloneSeq() const;
27 
28  bool isRootRelative() const { return isRootRelative_; }
29  void setRootRelative(bool on);
30 
31 protected:
32  virtual bool doWriteSeq(YAMLWriter& writer);
33  virtual bool doReadSeq(const Mapping& archive);
34 
35 private:
36  bool isRootRelative_;
37 };
38 
39 typedef boost::shared_ptr<ZMPSeq> ZMPSeqPtr;
40 
41 class BodyMotion;
42 
43 CNOID_EXPORT ZMPSeqPtr getZMPSeq(const BodyMotion& motion);
44 CNOID_EXPORT ZMPSeqPtr getOrCreateZMPSeq(BodyMotion& motion);
45 CNOID_EXPORT void clearZMPSeq(BodyMotion& motion);
46 CNOID_EXPORT bool makeRootRelative(ZMPSeq& zmpseq, BodyMotion& motion, bool on);
47 }
48 
49 #endif
boost::shared_ptr< ZMPSeq > ZMPSeqPtr
Definition: ZMPSeq.h:39
CNOID_EXPORT bool makeRootRelative(ZMPSeq &zmpseq, BodyMotion &motion, bool on)
Definition: ZMPSeq.cpp:120
Definition: ValueTree.h:224
Definition: Vector3Seq.h:15
Definition: YAMLWriter.h:18
bool isRootRelative() const
Definition: ZMPSeq.h:28
boost::shared_ptr< AbstractSeq > AbstractSeqPtr
Definition: AbstractSeq.h:19
CNOID_EXPORT void clearZMPSeq(BodyMotion &motion)
Definition: ZMPSeq.cpp:114
Definition: BodyMotion.h:20
Definition: AbstractSeq.h:23
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
CNOID_EXPORT ZMPSeqPtr getOrCreateZMPSeq(BodyMotion &motion)
Definition: ZMPSeq.cpp:108
Definition: ZMPSeq.h:14
CNOID_EXPORT ZMPSeqPtr getZMPSeq(const BodyMotion &motion)
Definition: ZMPSeq.cpp:102