10 #ifndef ApproxMVBB_MakeCoordinateSystem_hpp 11 #define ApproxMVBB_MakeCoordinateSystem_hpp 15 #include ApproxMVBB_TypeDefs_INCLUDE_FILE 18 namespace CoordinateSystem {
45 if(abs(v1(0)) > abs(v1(2))){
46 PREC invLen = 1.0 / sqrt(v1(0)*v1(0) + v1(2) * v1(2));
50 PREC invLen = 1.0 / sqrt(v1(1)*v1(1) + v1(2) * v1(2));
64 if(A_IK(0,2) > A_IK(1,2) && A_IK(0,2) > A_IK(2,2)){
66 A_IK.col(0).swap(A_IK.col(2));
67 A_IK.col(0).swap(A_IK.col(1));
68 }
else if(A_IK(1,2) > A_IK(0,2) && A_IK(1,2) > A_IK(2,2)){
70 A_IK.col(0).swap(A_IK.col(2));
71 A_IK.col(1).swap(A_IK.col(2));
82 if(v1.dot(v2) <= eps && v2.dot(v3) <= eps && v3.dot(v1) <= eps){
These are some container definitions.
void makeZAxisUp(Matrix33 &A_IK)
Eigen::Matrix< Scalar, 3, 3 > Matrix33
void makeCoordinateSystem(Vector3 &v1, Vector3 &v2, Vector3 &v3)
This function makes an orthogonal normed right-hand coordinate system. If the z-axis is the input...
bool checkOrthogonality(Vector3 &v1, Vector3 &v2, Vector3 &v3, PREC eps=1e-6)
Eigen::Matrix< Scalar, 3, 1 > Vector3
#define ApproxMVBB_DEFINE_MATRIX_TYPES