23 #include "mbsim/element.h"
25 #ifdef HAVE_OPENMBVCPPINTERFACE
38 position, firstTangent, normal, secondTangent, cosy, position_cosy, velocity, angularVelocity, velocity_cosy, velocities, velocities_cosy, all
62 std::string
getType()
const {
return "Frame"; }
63 virtual void plot(
double t,
double dt = 1);
68 virtual int gethSize(
int i=0)
const {
return hSize[i]; }
69 virtual int gethInd(
int i=0)
const {
return hInd[i]; }
72 virtual const fmatvec::Vec& getPosition()
const {
return WrOP; }
73 virtual const fmatvec::SqrMat& getOrientation()
const {
return AWP; }
74 virtual fmatvec::Vec& getPosition() {
return WrOP; }
75 virtual fmatvec::SqrMat& getOrientation() {
return AWP; }
76 virtual void setPosition(
const fmatvec::Vec &v) {
WrOP = v; }
77 virtual void setOrientation(
const fmatvec::SqrMat &AWP_) {
AWP = AWP_; }
78 virtual const fmatvec::Vec& getVelocity()
const {
return WvP; }
79 virtual const fmatvec::Vec& getAngularVelocity()
const {
return WomegaP; }
80 virtual const fmatvec::Mat& getJacobianOfTranslation(
int j=0)
const {
return WJP[j]; }
81 virtual const fmatvec::Mat& getJacobianOfRotation(
int j=0)
const {
return WJR[j]; }
82 virtual const fmatvec::Vec& getGyroscopicAccelerationOfTranslation(
int j=0)
const {
return WjP[j]; }
83 virtual const fmatvec::Vec& getGyroscopicAccelerationOfRotation(
int j=0)
const {
return WjR[j]; }
84 virtual const fmatvec::Vec& getAcceleration()
const {
return WaP; }
85 virtual const fmatvec::Vec& getAngularAcceleration()
const {
return WpsiP; }
87 #ifdef HAVE_OPENMBVCPPINTERFACE
88 virtual void enableOpenMBV(
double size=1,
double offset=1);
93 void sethSize(
int size,
int i=0) {
hSize[i] = size; }
94 void sethInd(
int ind,
int i=0) { hInd[i] = ind; }
96 fmatvec::Vec& getVelocity() {
return WvP; }
97 fmatvec::Vec& getAngularVelocity() {
return WomegaP; }
98 void setVelocity(
const fmatvec::Vec &v) {
WvP = v; }
99 void setAngularVelocity(
const fmatvec::Vec &omega) { WomegaP = omega; }
101 void setJacobianOfTranslation(
const fmatvec::Mat &WJP_,
int j=0) {
WJP[j]=WJP_; }
102 void setGyroscopicAccelerationOfTranslation(
const fmatvec::Vec &WjP_,
int j=0) {
WjP[j]=WjP_; }
103 void setJacobianOfRotation(
const fmatvec::Mat &WJR_,
int j=0) { WJR[j]=WJR_; }
104 void setGyroscopicAccelerationOfRotation(
const fmatvec::Vec &WjR_,
int j=0) { WjR[j]=WjR_; }
105 fmatvec::Mat& getJacobianOfTranslation(
int j=0) {
return WJP[j]; }
106 fmatvec::Mat& getJacobianOfRotation(
int j=0) {
return WJR[j]; }
107 fmatvec::Vec& getGyroscopicAccelerationOfTranslation(
int j=0) {
return WjP[j]; }
108 fmatvec::Vec& getGyroscopicAccelerationOfRotation(
int j=0) {
return WjR[j]; }
109 fmatvec::Vec& getAcceleration() {
return WaP; }
110 fmatvec::Vec& getAngularAcceleration() {
return WpsiP; }
111 void setAcceleration(
const fmatvec::Vec &a) {
WaP = a; }
112 void setAngularAcceleration(
const fmatvec::Vec &psi) { WpsiP = psi; }
139 fmatvec::Vec
WvP, WomegaP;
144 fmatvec::Mat
WJP[2], WJR[2];
149 fmatvec::Vec
WjP[2], WjR[2];
156 #ifdef HAVE_OPENMBVCPPINTERFACE
157 OpenMBV::Frame* openMBVFrame;