17 #ifndef TANGO_GL_GL_TANGO_CONVERSIONS_H_ 18 #define TANGO_GL_GL_TANGO_CONVERSIONS_H_ 20 #define GLM_FORCE_RADIANS 27 namespace conversions {
34 return glm::vec3(array[0], array[1], array[2]);
43 return glm::quat(array[3], array[0], array[1], array[2]);
82 return glm::vec3(tango_vec.
x, tango_vec.
z, -tango_vec.
y);
132 #endif // TANGO_GL_GL_TANGO_CONVERSIONS_H_
glm::vec3 Vec3TangoToGl(const glm::vec3 &tango_vec)
Convert (re-express, or rotate) a vector from the Tango ADF (or start- of-service) frame convention [...
glm::vec3 Vec3FromArray(const double *array)
Creates a glm::vec3 from double[3] = {x, y, z}. This is designed to work with the TangoPoseData...
highp_quat quat
Quaternion of default single-precision floating-point numbers.
glm::vec3 Vec3GlToTango(const glm::vec3 &gl_vec)
Convert (re-express, or rotate) a vector from the typical OpenGl world frame convention [right...
glm::mat4 color_camera_T_opengl_camera()
glm::mat4 depth_camera_T_opengl_camera()
GLM_FUNC_DECL detail::tmat4x4< T, P > mat4_cast(detail::tquat< T, P > const &x)
glm::mat4 TransformFromArrays(const double *A_p_B, const double *A_q_B)
Creates a glm::mat4 rigid-frame transformation matrix from two arrays. This is designed for the Tango...
glm::quat QuatTangoToGl(const glm::quat &tango_q_frame)
Given a quaternion representing the rotation matrix tango_R_any, returns the quaternion representing ...
glm::mat4 TransformFromVecAndQuat(const glm::vec3 &A_p_B, const glm::quat &A_q_B)
Creates a glm::mat4 rigid-frame transformation matrix from glm::vec3 and glm::quat. This is designed for the TangoPoseData translation and orientation fields.
glm::quat QuatFromArray(const double *array)
Creates a glm::quat from double[4] = {x, y, z, w}. This is designed to work with the TangoPoseData...
glm::mat4 opengl_world_T_tango_world()