20#ifndef _ROTATION_ABOUT_AXES_ZYX_TRANSFORMED_MAPPING_H_
21#define _ROTATION_ABOUT_AXES_ZYX_TRANSFORMED_MAPPING_H_
23#include "mbsim/functions/function.h"
33 int getArgSize()
const override {
return 3; }
34 fmatvec::MatV operator()(
const Arg &q)
override {
36 double gamma = q.e(2);
37 double cos_beta = cos(beta);
38 if(fabs(cos_beta)<=1e-13)
39 Element::throwError(
"Singularity in rotation.");
40 double sin_beta = sin(beta);
41 double cos_gamma = cos(gamma);
42 double sin_gamma = sin(gamma);
43 double tan_beta = sin_beta/cos_beta;
44 T.e(0,1) = sin_gamma/cos_beta;
45 T.e(0,2) = cos_gamma/cos_beta;
47 T.e(1,2) = -sin_gamma;
48 T.e(2,1) = tan_beta*sin_gamma;
49 T.e(2,2) = tan_beta*cos_gamma;
Definition: function.h:53
namespace MBSim
Definition: bilateral_constraint.cc:30