Commit 940d4f6c authored by Christian Mandery's avatar Christian Mandery

Reformat/style

parent 0ae2a510
%module pymmm
%{
#include "MMM/Model/Model.h"
#include "MMM/Model/ModelProcessor.h"
#include "MMM/Model/ModelProcessorWinter.h"
#include "MMM/Model/ModelReaderXML.h"
#include "MMM/Motion/MotionReaderXML.h"
#include "MMM/Motion/Motion.h"
#include "MMM/Motion/MotionFrame.h"
#include "MMMSimoxTools/MMMSimoxTools.h"
#include "MMM/Model/Model.h"
#include "MMM/Model/ModelProcessor.h"
#include "MMM/Model/ModelProcessorWinter.h"
#include "MMM/Model/ModelReaderXML.h"
#include "MMM/Motion/MotionReaderXML.h"
#include "MMM/Motion/Motion.h"
#include "MMM/Motion/MotionFrame.h"
#include "MMMSimoxTools/MMMSimoxTools.h"
%}
%include "std_string.i"
......@@ -67,56 +67,57 @@ namespace MMM {
public:
MotionReaderXML();
MotionPtr loadMotion(const std::string &xmlFile, const std::string &motionName = std::string());
MotionList loadAllMotions(const std::string &xmlFile);
MotionList loadAllMotionsFromString(const std::string &xmlDataString);
std::vector<std::string> getMotionNames(const std::string &xmlFile) const;
MotionList loadAllMotions(const std::string &xmlFile);
MotionList loadAllMotionsFromString(const std::string &xmlDataString);
std::vector<std::string> getMotionNames(const std::string &xmlFile) const;
};
typedef boost::shared_ptr<MotionReaderXML> MotionReaderXMLPtr;
class Motion {
public:
Motion(const std::string& name);
Motion(const Motion& m);
bool addMotionFrame(MotionFramePtr md);
bool removeMotionFrame(size_t frame);
bool setJointOrder(const std::vector<std::string> &jointNames);
void setName(const std::string& name);
std::string getName();
void setComment(const std::string &comment);
void addComment(const std::string &comment);
std::string getComment();
std::vector<std::string> getJointNames();
MotionFramePtr getMotionFrame(size_t frame);
std::vector<MotionFramePtr> getMotionFrames();
void setMotionFrames(std::vector<MotionFramePtr> &mfs){motionFrames = mfs;}
virtual unsigned int getNumFrames();
void setModel(ModelPtr model);
void setModel(ModelPtr processedModel, ModelPtr originalModel);
ModelPtr getModel(bool processedModel = true);
const std::string& getMotionFilePath();
void setMotionFilePath(const std::string&filepath);
const std::string& getMotionFileName();
void setMotionFileName(const std::string&filename);
void setModelProcessor(ModelProcessorPtr mp);
ModelProcessorPtr getModelProcessor();
virtual std::string toXML();
void print();
void print(const std::string &filename);
bool hasJoint( const std::string &name );
void calculateVelocities(int method = 0);
void calculateAccelerations(int method = 0);
enum jointEnum{eValues, eVelocities, eAccelerations};
void smoothJointValues(jointEnum type, int windowSize);
MotionPtr getSegmentMotion(size_t frame1, size_t frame2);
MotionPtr copy();
MotionList getSegmentMotions(std::vector<int> segmentPoints);
};
Motion(const Motion& m);
bool addMotionFrame(MotionFramePtr md);
bool removeMotionFrame(size_t frame);
bool setJointOrder(const std::vector<std::string> &jointNames);
void setName(const std::string& name);
std::string getName();
void setComment(const std::string &comment);
void addComment(const std::string &comment);
std::string getComment();
std::vector<std::string> getJointNames();
MotionFramePtr getMotionFrame(size_t frame);
std::vector<MotionFramePtr> getMotionFrames();
void setMotionFrames(std::vector<MotionFramePtr> &mfs){motionFrames = mfs;}
virtual unsigned int getNumFrames();
void setModel(ModelPtr model);
void setModel(ModelPtr processedModel, ModelPtr originalModel);
ModelPtr getModel(bool processedModel = true);
const std::string& getMotionFilePath();
void setMotionFilePath(const std::string&filepath);
const std::string& getMotionFileName();
void setMotionFileName(const std::string&filename);
void setModelProcessor(ModelProcessorPtr mp);
ModelProcessorPtr getModelProcessor();
virtual std::string toXML();
void print();
void print(const std::string &filename);
bool hasJoint( const std::string &name );
void calculateVelocities(int method = 0);
void calculateAccelerations(int method = 0);
enum jointEnum{eValues, eVelocities, eAccelerations};
void smoothJointValues(jointEnum type, int windowSize);
MotionPtr getSegmentMotion(size_t frame1, size_t frame2);
MotionPtr copy();
MotionList getSegmentMotions(std::vector<int> segmentPoints);
};
class MotionFrame {
public:
MotionFrame(unsigned int ndof);
MotionFrame(const MotionFrame &inpSrc);
Eigen::Matrix4f getRootPose();
MotionFrame(const MotionFrame &inpSrc);
Eigen::Matrix4f getRootPose();
Eigen::Vector3f getRootPos();
Eigen::Vector3f getRootPosVel();
Eigen::Vector3f getRootPosAcc();
......@@ -139,8 +140,8 @@ namespace MMM {
bool hasEntry(const std::string &name) const;
MotionFrameEntryPtr getEntry(const std::string &name);
std::string toXML();
unsigned int getndof();
};
unsigned int getndof();
};
class ModelReaderXML {
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment