Perception Tool Kit (PTK) API Guide

Introduction

Collaboration diagram for PTK Rigid Transform APIs:

Data Structures

struct  PTK_RigidTransform
 Rigid Transform Matrix (single precision). More...
 
struct  PTK_RigidTransform_d
 Rigid Transform Matrix (double precision). More...
 

Functions

void PTK_RigidTransform_makeIdentity (PTK_RigidTransform *M)
 This replaces the contents of the given rigid transformation with an identity transformation. This handles the duties of both initialization and resetting or clearing the data structure. More...
 
void PTK_RigidTransform_setTranslation (PTK_RigidTransform *M, float x, float y, float z)
 Convenience function to update all three components of the transform's translation component safely. More...
 
void PTK_RigidTransform_getTranslation (const PTK_RigidTransform *M, float *x, float *y, float *z)
 Convenience function to get all three components of the transform's translation component safely. More...
 
void PTK_RigidTransform_setRotation (PTK_RigidTransform *__restrict M, const float *__restrict R)
 Convenience function to update the rotation matrix embedded within this rigid transform. The rotation argument must be an orthonormal matrix, otherwise the subsequent behavior of the PTK_RigidTransform is undefined. More...
 
void PTK_RigidTransform_getRotation (const PTK_RigidTransform *__restrict M, float *__restrict R)
 Convenience function to read the rotation matrix embedded within this rigid transform. More...
 
void PTK_RigidTransform_compose (PTK_RigidTransform *__restrict M31_out, const PTK_RigidTransform *__restrict M32_in, const PTK_RigidTransform *__restrict M21_in)
 This creates a single transformation that acts as the composition of the two given transformations such that M31 = M32*M21. M31 must be distinct from both M21 and M32. More...
 
void PTK_RigidTransform_invert (PTK_RigidTransform *__restrict M21_out, const PTK_RigidTransform *__restrict M12_in)
 This computes the inverse of the given rigid transformation. The output must be different from the input. Note that this assumes that a valid rigid transformation has been supplied: the rotation component must be an orthonormal matrix. A general matrix inversion is not used; instead an equation specific to inverting matrices that match the structure described above is used for efficiency. More...
 
void PTK_RigidTransform_print (const PTK_RigidTransform *M)
 Prints the given transformation via platform-specific output mechanism. More...
 
void PTK_RigidTransform_convertToDouble (PTK_RigidTransform_d *__restrict Mout, const PTK_RigidTransform *__restrict Min)
 Convert the given PTK RigidTransform from single to double precision. More...
 
void PTK_RigidTransform_d_makeIdentity (PTK_RigidTransform_d *M)
 This replaces the contents of the given rigid transformation with an identity transformation. This handles the duties of both initialization and resetting or clearing the data structure. More...
 
void PTK_RigidTransform_d_setTranslation (PTK_RigidTransform_d *M, double x, double y, double z)
 Convenience function to update all three components of the transform's translation component safely. More...
 
void PTK_RigidTransform_d_getTranslation (const PTK_RigidTransform_d *M, double *x, double *y, double *z)
 Convenience function to get all three components of the transform's translation component safely. More...
 
void PTK_RigidTransform_d_setRotation (PTK_RigidTransform_d *__restrict M, const double *__restrict R)
 Convenience function to update the rotation matrix embedded within this rigid transform. The rotation argument must be an orthonormal matrix, otherwise the subsequent behavior of the PTK_RigidTransform is undefined. More...
 
void PTK_RigidTransform_d_getRotation (const PTK_RigidTransform_d *__restrict M, double *__restrict R)
 Convenience function to read the rotation matrix embedded within this rigid transform. More...
 
void PTK_RigidTransform_d_compose (PTK_RigidTransform_d *__restrict M31_out, const PTK_RigidTransform_d *__restrict M32_in, const PTK_RigidTransform_d *__restrict M21_in)
 This creates a single transformation that acts as the composition of the two given transformations such that M31 = M32*M21. M31 must be distinct from both M21 and M32. More...
 
void PTK_RigidTransform_d_invert (PTK_RigidTransform_d *__restrict M21_out, const PTK_RigidTransform_d *__restrict M12_in)
 This computes the inverse of the given rigid transformation. The output must be different from the input. Note that this assumes that a valid rigid transformation has been supplied: the rotation component must be an orthonormal matrix. A general matrix inversion is not used; instead an equation specific to inverting matrices that match the structure described above is used for efficiency. More...
 
void PTK_RigidTransform_d_print (const PTK_RigidTransform_d *M)
 Prints the given transformation via platform-specific output mechanism. More...
 
void PTK_RigidTransform_d_convertToSingle (PTK_RigidTransform *__restrict Mout, const PTK_RigidTransform_d *__restrict Min)
 Convert the given RigidTransform d from double to single precision. More...
 

Function Documentation

◆ PTK_RigidTransform_makeIdentity()

void PTK_RigidTransform_makeIdentity ( PTK_RigidTransform M)

This replaces the contents of the given rigid transformation with an identity transformation. This handles the duties of both initialization and resetting or clearing the data structure.

Parameters
[in,out]MTransform to modify.

◆ PTK_RigidTransform_setTranslation()

void PTK_RigidTransform_setTranslation ( PTK_RigidTransform M,
float  x,
float  y,
float  z 
)

Convenience function to update all three components of the transform's translation component safely.

Parameters
[out]MTransformation to update.
[in]xNew x.
[in]yNew y.
[in]zNew z.

◆ PTK_RigidTransform_getTranslation()

void PTK_RigidTransform_getTranslation ( const PTK_RigidTransform M,
float *  x,
float *  y,
float *  z 
)

Convenience function to get all three components of the transform's translation component safely.

Parameters
[in]MTransformation to read from.
[out]xX-component of the translation vector.
[out]yY-component of the translation vector.
[out]zZ-component of the translation vector.

◆ PTK_RigidTransform_setRotation()

void PTK_RigidTransform_setRotation ( PTK_RigidTransform *__restrict  M,
const float *__restrict  R 
)

Convenience function to update the rotation matrix embedded within this rigid transform. The rotation argument must be an orthonormal matrix, otherwise the subsequent behavior of the PTK_RigidTransform is undefined.

Parameters
[in,out]MThe transformation to update.
[in]R9 element array containing a 3x3 rotation matrix in row-major order

◆ PTK_RigidTransform_getRotation()

void PTK_RigidTransform_getRotation ( const PTK_RigidTransform *__restrict  M,
float *__restrict  R 
)

Convenience function to read the rotation matrix embedded within this rigid transform.

Parameters
[in]MThe transformation to update.
[out]R9 element array containing a 3x3 rotation matrix in row-major order

◆ PTK_RigidTransform_compose()

void PTK_RigidTransform_compose ( PTK_RigidTransform *__restrict  M31_out,
const PTK_RigidTransform *__restrict  M32_in,
const PTK_RigidTransform *__restrict  M21_in 
)

This creates a single transformation that acts as the composition of the two given transformations such that M31 = M32*M21. M31 must be distinct from both M21 and M32.

Parameters
[out]M31_outM31 transformation.
[in]M32_inM32 transformation.
[in]M21_inM21 transformation.

◆ PTK_RigidTransform_invert()

void PTK_RigidTransform_invert ( PTK_RigidTransform *__restrict  M21_out,
const PTK_RigidTransform *__restrict  M12_in 
)

This computes the inverse of the given rigid transformation. The output must be different from the input. Note that this assumes that a valid rigid transformation has been supplied: the rotation component must be an orthonormal matrix. A general matrix inversion is not used; instead an equation specific to inverting matrices that match the structure described above is used for efficiency.

Parameters
[out]M21_outWrite the inverse here.
[in]M12_inThe transform to compute the inverse of.

◆ PTK_RigidTransform_print()

void PTK_RigidTransform_print ( const PTK_RigidTransform M)

Prints the given transformation via platform-specific output mechanism.

Parameters
[in]MTransform to be printed.

◆ PTK_RigidTransform_convertToDouble()

void PTK_RigidTransform_convertToDouble ( PTK_RigidTransform_d *__restrict  Mout,
const PTK_RigidTransform *__restrict  Min 
)

Convert the given PTK RigidTransform from single to double precision.

Parameters
[out]MoutDouble precision version written here.
[in]MinFloating point transform to convert.

◆ PTK_RigidTransform_d_makeIdentity()

void PTK_RigidTransform_d_makeIdentity ( PTK_RigidTransform_d M)

This replaces the contents of the given rigid transformation with an identity transformation. This handles the duties of both initialization and resetting or clearing the data structure.

Parameters
[in,out]MTransform to modify.

◆ PTK_RigidTransform_d_setTranslation()

void PTK_RigidTransform_d_setTranslation ( PTK_RigidTransform_d M,
double  x,
double  y,
double  z 
)

Convenience function to update all three components of the transform's translation component safely.

Parameters
[out]MTransformation to update.
[in]xNew x.
[in]yNew y.
[in]zNew z.

◆ PTK_RigidTransform_d_getTranslation()

void PTK_RigidTransform_d_getTranslation ( const PTK_RigidTransform_d M,
double *  x,
double *  y,
double *  z 
)

Convenience function to get all three components of the transform's translation component safely.

Parameters
[in]MTransformation to read from.
[out]xX-component of the translation vector.
[out]yY-component of the translation vector.
[out]zZ-component of the translation vector.

◆ PTK_RigidTransform_d_setRotation()

void PTK_RigidTransform_d_setRotation ( PTK_RigidTransform_d *__restrict  M,
const double *__restrict  R 
)

Convenience function to update the rotation matrix embedded within this rigid transform. The rotation argument must be an orthonormal matrix, otherwise the subsequent behavior of the PTK_RigidTransform is undefined.

Parameters
[in,out]MThe transformation to update.
[in]R9 element array containing a 3x3 rotation matrix in row-major order

◆ PTK_RigidTransform_d_getRotation()

void PTK_RigidTransform_d_getRotation ( const PTK_RigidTransform_d *__restrict  M,
double *__restrict  R 
)

Convenience function to read the rotation matrix embedded within this rigid transform.

Parameters
[in]MThe transformation to update.
[out]R9 element array containing a 3x3 rotation matrix in row-major order

◆ PTK_RigidTransform_d_compose()

void PTK_RigidTransform_d_compose ( PTK_RigidTransform_d *__restrict  M31_out,
const PTK_RigidTransform_d *__restrict  M32_in,
const PTK_RigidTransform_d *__restrict  M21_in 
)

This creates a single transformation that acts as the composition of the two given transformations such that M31 = M32*M21. M31 must be distinct from both M21 and M32.

Parameters
[out]M31_outM31 transformation.
[in]M32_inM32 transformation.
[in]M21_inM21 transformation.

◆ PTK_RigidTransform_d_invert()

void PTK_RigidTransform_d_invert ( PTK_RigidTransform_d *__restrict  M21_out,
const PTK_RigidTransform_d *__restrict  M12_in 
)

This computes the inverse of the given rigid transformation. The output must be different from the input. Note that this assumes that a valid rigid transformation has been supplied: the rotation component must be an orthonormal matrix. A general matrix inversion is not used; instead an equation specific to inverting matrices that match the structure described above is used for efficiency.

Parameters
[out]M21_outWrite the inverse here.
[in]M12_inThe transform to compute the inverse of.

◆ PTK_RigidTransform_d_print()

void PTK_RigidTransform_d_print ( const PTK_RigidTransform_d M)

Prints the given transformation via platform-specific output mechanism.

Parameters
[in]MTransform to be printed.

◆ PTK_RigidTransform_d_convertToSingle()

void PTK_RigidTransform_d_convertToSingle ( PTK_RigidTransform *__restrict  Mout,
const PTK_RigidTransform_d *__restrict  Min 
)

Convert the given RigidTransform d from double to single precision.

Parameters
[out]MoutSingle precision version here.
[in]MinDouble precision transform to convert.