00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _NATURAL_COORDINATES_OBSERVER_H__
00021 #define _NATURAL_COORDINATES_OBSERVER_H__
00022 #include "mbsim/observer.h"
00023
00024 #ifdef HAVE_OPENMBVCPPINTERFACE
00025 #include <openmbvcppinterface/arrow.h>
00026 namespace OpenMBV {
00027 class Frame;
00028 }
00029 #endif
00030
00031 namespace MBSim {
00032 class Frame;
00033
00034 class NaturalCoordinatesObserver : public Observer {
00035 private:
00036 Frame* frame;
00037 #ifdef HAVE_OPENMBVCPPINTERFACE
00038 OpenMBV::Arrow *openMBVPosition, *openMBVVelocity, *openMBVTangentialVelocity, *openMBVNormalVelocity, *openMBVBinormalVelocity, *openMBVAcceleration, *openMBVTangentialAcceleration, *openMBVNormalAcceleration, *openMBVBinormalAcceleration;
00039 OpenMBV::Frame* openMBVFrame;
00040 #endif
00041
00042 public:
00043 NaturalCoordinatesObserver(const std::string &name);
00044 void setFrame(Frame *frame_) { frame = frame_; }
00045
00046 void init(InitStage stage);
00047 virtual void plot(double t, double dt);
00048
00049 #ifdef HAVE_OPENMBVCPPINTERFACE
00050 virtual void enableOpenMBVPosition(double diameter=0.5, double headDiameter=1, double headLength=1, double color=0.5);
00051 virtual void enableOpenMBVVelocity(double scale=1, OpenMBV::Arrow::ReferencePoint refPoint=OpenMBV::Arrow::fromPoint, double diameter=0.5, double headDiameter=1, double headLength=1, double color=0.5);
00052 virtual void enableOpenMBVAcceleration(double scale=1, OpenMBV::Arrow::ReferencePoint refPoint=OpenMBV::Arrow::fromPoint, double diameter=0.5, double headDiameter=1, double headLength=1, double color=0.5);
00053 virtual void enableOpenMBVFrame(double size=1, double offset=1);
00054
00055 #endif
00056
00057 };
00058
00059 }
00060
00061 #endif
00062