20#ifndef _ROTATION_ABOUT_AXES_ZXZ_TRANSFORMED_MAPPING_H_
21#define _ROTATION_ABOUT_AXES_ZXZ_TRANSFORMED_MAPPING_H_
23#include "mbsim/functions/function.h"
33 int getArgSize()
const override {
return 3; }
34 fmatvec::MatV operator()(
const Arg &q)
override {
35 double theta = q.e(1);
37 double cos_theta = cos(theta);
38 double sin_theta = sin(theta);
39 if(fabs(sin_theta)<=1e-13)
40 Element::throwError(
"Singularity in rotation.");
41 double cos_phi = cos(phi);
42 double sin_phi = sin(phi);
43 double tan_theta = sin_theta/cos_theta;
45 T.e(0,0) = sin_phi/sin_theta;
46 T.e(0,1) = cos_phi/sin_theta;
49 T.e(2,0) = -sin_phi/tan_theta;
50 T.e(2,1) = -cos_phi/tan_theta;
Definition: function.h:53
namespace MBSim
Definition: bilateral_constraint.cc:30