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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Function Documentation

◆ color_camera_T_opengl_camera()

glm::mat4 tango_gl::conversions::color_camera_T_opengl_camera ( )

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.

◆ depth_camera_T_opengl_camera()

glm::mat4 tango_gl::conversions::depth_camera_T_opengl_camera ( )

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.

◆ opengl_world_T_tango_world()

glm::mat4 tango_gl::conversions::opengl_world_T_tango_world ( )

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.

◆ QuatFromArray()

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.

◆ QuatTangoToGl()

glm::quat tango_gl::conversions::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.

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.

◆ TransformFromArrays()

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.

◆ TransformFromVecAndQuat()

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.

◆ Vec3FromArray()

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.

◆ Vec3GlToTango()

glm::vec3 tango_gl::conversions::Vec3GlToTango ( const glm::vec3 gl_vec)
inline

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.

◆ Vec3TangoToGl()

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 Jul 25 2024 02:50:29