11 #ifndef LIBALMATH_SCENEGRAPH_ALMATHQIGEOMETRY_HPP
12 #define LIBALMATH_SCENEGRAPH_ALMATHQIGEOMETRY_HPP
25 Quaternion almathQuat(static_cast<float>(r.rotation.w),
26 static_cast<float>(r.rotation.x),
27 static_cast<float>(r.rotation.y),
28 static_cast<float>(r.rotation.z));
30 almathTf.r1_c4 =
static_cast<float>(r.translation.x);
31 almathTf.r2_c4 =
static_cast<float>(r.translation.y);
32 almathTf.r3_c4 =
static_cast<float>(r.translation.z);
38 Eigen::Map<const Matrix34frm> atfm (&tf.r1_c1);
39 qi::geometry::Transform result;
40 Eigen::Map<Eigen::Quaterniond>(&result.rotation.x) = atfm.block<3, 3>(0, 0).cast<
double>();
41 Eigen::Map<Eigen::Vector3d>(&result.translation.x) = atfm.block<3, 1>(0, 3).cast<
double>();
47 const qi::geometry::Transform& r)
55 pose.
theta, 0.0f, 0.0f, 1.0f);
Quaternion makeQuaternion(double x, double y, double z, double w)
Transform transformFromQiTransform(const qi::geometry::Transform &r)
Vector3 makeVector3(double x, double y, double z)
ALMATH_API Quaternion quaternionFromAngleAndAxisRotation(const float pAngle, const float pAxisX, const float pAxisY, const float pAxisZ)
Create a Quaternion initialized with explicit angle and axis rotation.
qi::geometry::Transform qiTransformFromALMath(const Transform &tf)
qi::geometry::Transform qiTransformFromPose2D(const Pose2D &pose)
AL::Math::Pose2D pose2DFromQiTransform(const qi::geometry::Transform &r)
ALMATH_API Transform transformFromQuaternion(const Quaternion &pQua)
A pose in a 2-dimentional space.
Transform makeTransform(const Quaternion &rotation, const Vector3 &translation)
Create and play with a Quaternion.