20 #ifndef _MECHANICAL_LINK_OBSERVER_H__
21 #define _MECHANICAL_LINK_OBSERVER_H__
23 #include "mbsim/observers/observer.h"
25 #include <mbsim/utils/boost_parameters.h>
26 #include <mbsim/utils/openmbv_utils.h>
27 #include <mbsim/utils/index.h>
36 std::string saved_link;
37 std::shared_ptr<OpenMBVInteractionArrow> ombvForce, ombvMoment;
38 std::vector<std::shared_ptr<OpenMBV::Arrow>> openMBVForce, openMBVMoment;
43 double evalNone() {
return 1; }
44 double evalAbsoluteForce();
45 double evalAbsoluteMoment();
51 void init(
InitStage stage,
const InitConfigSet &config)
override;
53 void initializeUsingXML(xercesc::DOMElement *element)
override;
55 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVForce, tag, (optional (sideOfInteraction,(OpenMBVInteractionArrow::SideOfInteraction),OpenMBVInteractionArrow::action)(scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBVArrow::ReferencePoint),OpenMBVArrow::toPoint)(colorRepresentation,(OpenMBVArrow::ColorRepresentation),OpenMBVArrow::none)(minimalColorValue,(
double),0)(maximalColorValue,(
double),1)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0)(pointSize,(
double),0)(lineWidth,(
double),0))) {
56 ombvForce = std::shared_ptr<OpenMBVInteractionArrow>(
new OpenMBVInteractionArrow(sideOfInteraction,scaleLength,scaleSize,OpenMBVArrow::toHead,referencePoint,colorRepresentation,minimalColorValue,maximalColorValue,diffuseColor,transparency,pointSize,lineWidth));
58 void setOMBVForce(
const std::shared_ptr<OpenMBVInteractionArrow> &arrow) { ombvForce=arrow; }
59 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVMoment, tag, (optional (sideOfInteraction,(OpenMBVInteractionArrow::SideOfInteraction),OpenMBVInteractionArrow::action)(scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBVArrow::ReferencePoint),OpenMBVArrow::toPoint)(colorRepresentation,(OpenMBVArrow::ColorRepresentation),OpenMBVArrow::none)(minimalColorValue,(
double),0)(maximalColorValue,(
double),1)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0)(pointSize,(
double),0)(lineWidth,(
double),0))) {
60 ombvMoment = std::shared_ptr<OpenMBVInteractionArrow>(
new OpenMBVInteractionArrow(sideOfInteraction,scaleLength,scaleSize,OpenMBVArrow::toDoubleHead,referencePoint,colorRepresentation,minimalColorValue,maximalColorValue,diffuseColor,transparency,pointSize,lineWidth));
62 void setOMBVMoment(
const std::shared_ptr<OpenMBVInteractionArrow> &arrow) { ombvMoment=arrow; }
Definition: mechanical_link_observer.h:33
void plot() override
plots time dependent data
Definition: mechanical_link_observer.cc:78
Definition: openmbv_utils.h:111
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: mechanical_link_observer.cc:43
InitStage
The stages of the initialization.
Definition: element.h:62
std::string name
name of element
Definition: element.h:235
mechanical link
Definition: mechanical_link.h:31
Definition: observer.h:26