CamSim  0.0.0
A rasterization-based simulator for various types of cameras
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CamSim::Transformation Class Reference

Defines a pose, consisting of translation, rotation, and scaling. More...

Public Member Functions

 Transformation ()
 Constructor for zero translation, zero rotation, and scale factor 1. More...
 
QMatrix4x4 toMatrix4x4 () const
 Return this pose as a 4x4 matrix. More...
 

Static Public Member Functions

static Transformation fromMatrix4x4 (const QMatrix4x4 &M)
 Extract a pose from a 4x4 matrix. This should be avoided if possible. This function assumes that the matrix contains tanslation, rotation, and positive scaling components, and nothing else. More...
 
static Transformation interpolate (const Transformation &p0, const Transformation &p1, float alpha)
 Interpolate two poses. The value of alpha should be in [0,1], where 0 results in p0, and 1 results in p1. Positions are interpolated linearly and rotations are interpolated via spherical linear interpolation (slerp). More...
 

Public Attributes

QVector3D translation
 Translation. More...
 
QQuaternion rotation
 Rotation. More...
 
QVector3D scaling
 Scaling. More...
 

Detailed Description

Defines a pose, consisting of translation, rotation, and scaling.

Constructor & Destructor Documentation

◆ Transformation()

CamSim::Transformation::Transformation ( )

Constructor for zero translation, zero rotation, and scale factor 1.

Member Function Documentation

◆ fromMatrix4x4()

static Transformation CamSim::Transformation::fromMatrix4x4 ( const QMatrix4x4 &  M)
static

Extract a pose from a 4x4 matrix. This should be avoided if possible. This function assumes that the matrix contains tanslation, rotation, and positive scaling components, and nothing else.

◆ interpolate()

static Transformation CamSim::Transformation::interpolate ( const Transformation p0,
const Transformation p1,
float  alpha 
)
static

Interpolate two poses. The value of alpha should be in [0,1], where 0 results in p0, and 1 results in p1. Positions are interpolated linearly and rotations are interpolated via spherical linear interpolation (slerp).

◆ toMatrix4x4()

QMatrix4x4 CamSim::Transformation::toMatrix4x4 ( ) const

Return this pose as a 4x4 matrix.

Member Data Documentation

◆ rotation

QQuaternion CamSim::Transformation::rotation

Rotation.

◆ scaling

QVector3D CamSim::Transformation::scaling

Scaling.

◆ translation

QVector3D CamSim::Transformation::translation

Translation.


The documentation for this class was generated from the following file: