Functions
tango_gl::conversions Namespace Reference

Functions

glm::mat4 color_camera_T_opengl_camera ()
glm::mat4 depth_camera_T_opengl_camera ()
glm::mat4 opengl_world_T_tango_world ()
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.orientation field.
glm::quat QuatTangoToGl (const glm::quat &tango_q_any)
 Given a quaternion representing the rotation matrix tango_R_any, returns the quaternion representing gl_R_any, where "any" is an arbitrary frame. Note the gl base frame is rotated by 90-degrees about +X from the Tango ADF/start-of-service frame, so this is equivalent to applying such a rotation to the quaternion.
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 TangoPoseData translation and orientation fields.
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::vec3 Vec3FromArray (const double *array)
 Creates a glm::vec3 from double[3] = {x, y, z}. This is designed to work with the TangoPoseData.translation field.
glm::vec3 Vec3GlToTango (const glm::vec3 &gl_vec)
 Convert (re-express, or rotate) a vector from the typical OpenGl world frame convention [right, up, backward] to the Tango ADF (or start-of-service) frame convention [right, forward, up]. Note this assumes the two frames are coincident, and it doesn't know about any additional offsets between a particular OpenGl scene and the Tango service frames.
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 [right, forward, up] to the typical OpenGl world frame convention [right, up, backward]. Note this assumes the two frames are coincident, and it doesn't know about any additional offsets between a particular OpenGl scene and the Tango service frames.

Function Documentation

Get the fixed transformation matrix relating the frame convention of the device's color camera frame (with Z-forward, X-right) and the opengl camera frame (with Z-backward, X-right).

Definition at line 30 of file conversions.cpp.

Get the fixed transformation matrix relating the frame convention of the device's depth camera frame (with Z-forward, X-right) and the opengl camera frame (with Z-backward, X-right).

Definition at line 38 of file conversions.cpp.

Get the fixed transformation matrix relating the opengl frame convention (with Y-up, X-right) and the tango frame convention for the start-of-service and ADF frames (with Z-up, X-right), termed "world" here.

Definition at line 22 of file conversions.cpp.

glm::quat tango_gl::conversions::QuatFromArray ( const double *  array) [inline]

Creates a glm::quat from double[4] = {x, y, z, w}. This is designed to work with the TangoPoseData.orientation field.

Definition at line 41 of file conversions.h.

Given a quaternion representing the rotation matrix tango_R_any, returns the quaternion representing gl_R_any, where "any" is an arbitrary frame. Note the gl base frame is rotated by 90-degrees about +X from the Tango ADF/start-of-service frame, so this is equivalent to applying such a rotation to the quaternion.

Parameters:
tango_q_anyA quaternion representing rotation matrix tango_R_any.
Returns:
The quaternion representing gl_R_any.

Definition at line 44 of file conversions.cpp.

glm::mat4 tango_gl::conversions::TransformFromArrays ( const double *  A_p_B,
const double *  A_q_B 
) [inline]

Creates a glm::mat4 rigid-frame transformation matrix from two arrays. This is designed for the TangoPoseData translation and orientation fields.

Parameters:
A_p_BPosition [x, y, z] of B_origin from A_origin, expressed in A.
A_q_BThe quaternion representation [x, y, z, w] of the rotation matrix A_R_B.
Returns:
The transformation matrix A_T_B.

Definition at line 54 of file conversions.h.

glm::mat4 tango_gl::conversions::TransformFromVecAndQuat ( const glm::vec3 A_p_B,
const glm::quat A_q_B 
) [inline]

Creates a glm::mat4 rigid-frame transformation matrix from glm::vec3 and glm::quat. This is designed for the TangoPoseData translation and orientation fields.

Parameters:
A_p_BA position vector of B_origin from A_origin, expressed in A.
A_q_BA quaternion representation of the rotation. matrix A_R_B.
Returns:
The transformation matrix A_T_B.

Definition at line 68 of file conversions.h.

glm::vec3 tango_gl::conversions::Vec3FromArray ( const double *  array) [inline]

Creates a glm::vec3 from double[3] = {x, y, z}. This is designed to work with the TangoPoseData.translation field.

Definition at line 33 of file conversions.h.

Convert (re-express, or rotate) a vector from the typical OpenGl world frame convention [right, up, backward] to the Tango ADF (or start-of-service) frame convention [right, forward, up]. Note this assumes the two frames are coincident, and it doesn't know about any additional offsets between a particular OpenGl scene and the Tango service frames.

Parameters:
gl_vecA vector expressed in the Opengl world frame convention.
Returns:
The same vector expressed using the Tango ADF frame convention.

Definition at line 94 of file conversions.h.

glm::vec3 tango_gl::conversions::Vec3TangoToGl ( const glm::vec3 tango_vec) [inline]

Convert (re-express, or rotate) a vector from the Tango ADF (or start- of-service) frame convention [right, forward, up] to the typical OpenGl world frame convention [right, up, backward]. Note this assumes the two frames are coincident, and it doesn't know about any additional offsets between a particular OpenGl scene and the Tango service frames.

Parameters:
tango_vecA vector expressed in the Tango ADF frame convention.
Returns:
The same vector expressed using the Opengl frame convention.

Definition at line 81 of file conversions.h.



rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:43