20 #ifndef _COORDINATES_OBSERVER_H__
21 #define _COORDINATES_OBSERVER_H__
23 #include "mbsim/observers/observer.h"
25 #include <mbsim/utils/boost_parameters.h>
26 #include <mbsim/utils/openmbv_utils.h>
34 std::shared_ptr<OpenMBV::Group> openMBVPosGrp, openMBVVelGrp, openMBVAccGrp;
35 std::shared_ptr<OpenMBV::Arrow> openMBVPosition, openMBVVelocity, openMBVAcceleration;
36 std::shared_ptr<OpenMBV::Frame> openMBVFrame;
40 void setFrame(
Frame *frame_) { frame = frame_; }
44 virtual void initializeUsingXML(xercesc::DOMElement *element);
46 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVPosition, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBV::Arrow::ReferencePoint),OpenMBV::Arrow::fromPoint)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
47 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
48 openMBVPosition=ombv.createOpenMBV();
50 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVVelocity, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBV::Arrow::ReferencePoint),OpenMBV::Arrow::fromPoint)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
51 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
52 openMBVVelocity=ombv.createOpenMBV();
54 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVAcceleration, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBV::Arrow::ReferencePoint),OpenMBV::Arrow::fromPoint)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
55 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
56 openMBVAcceleration=ombv.createOpenMBV();
58 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVFrame, tag, (optional (size,(
double),1)(offset,(
double),1)(transparency,(
double),0))) {
60 openMBVFrame=ombv.createOpenMBV();
64 std::string saved_frame;
void init(InitStage stage)
plots time series header
Definition: coordinates_observer.cc:36
Definition: openmbv_utils.h:54
Definition: coordinates_observer.h:31
Definition: openmbv_utils.h:66
InitStage
The stages of the initialization.
Definition: element.h:97
std::string name
name of element
Definition: element.h:298
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:37
virtual void plot()
plots time dependent data
Definition: coordinates_observer.cc:86
Definition: observer.h:26