20#ifndef _ROTATION_ABOUT_AXES_ZXZ_MAPPING_H_
21#define _ROTATION_ABOUT_AXES_ZXZ_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 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_psi = cos(psi);
42 double sin_psi = sin(psi);
43 double tan_theta = sin_theta/cos_theta;
45 T.e(0,0) = -sin_psi/tan_theta;
46 T.e(0,1) = cos_psi/tan_theta;
49 T.e(2,0) = sin_psi/sin_theta;
50 T.e(2,1) = -cos_psi/sin_theta;
Definition: function.h:53
Definition: rotation_about_axes_zxz_mapping.h:28
namespace MBSim
Definition: bilateral_constraint.cc:30