Thea
Public Types | Public Member Functions | Static Public Member Functions | List of all members
AffineTransformN< 3, T > Class Template Reference

An affine transformation in 3-space, consisting of a linear transformation (3x3 matrix) plus a translation. More...

#include <AffineTransform3.hpp>

Inheritance diagram for AffineTransformN< 3, T >:
AffineTransformNBase< 3, T >

Public Types

typedef AffineTransformN< N, T > AffineTransformT
 N-dimensional affine transform type. More...
 

Public Member Functions

 AffineTransformN ()
 Default constructor. More...
 
 AffineTransformN (MatrixT const &linear_, VectorT const &translation_=VectorT::Zero())
 Construct from a linear transform, followed by a translation. More...
 
 AffineTransformN (AffineTransformN const &src)
 Copy constructor. More...
 
 AffineTransformN (VectorT const &x, VectorT const &y, VectorT const &z, VectorT const &translation_)
 Construct from 3 basis vectors, specifying the linear transform, and a translation. More...
 
 AffineTransformN (T const &m00, T const &m01, T const &m02, T const &m03, T const &m10, T const &m11, T const &m12, T const &m13, T const &m20, T const &m21, T const &m22, T const &m23)
 Construct from a 3x4 array. More...
 
AffineTransformN< N, U > cast () const
 Cast the transform to a different scalar type. More...
 
MatrixT const & getLinear () const
 Get linear transform component. More...
 
MatrixT & getLinear ()
 Get linear transform component. More...
 
VectorT const & getTranslation () const
 Get translation component. More...
 
VectorT & getTranslation ()
 Get translation component. More...
 
Matrix< N+1, N+1, T > homogeneous () const
 Convert to an (N + 1) x (N + 1) transformation matrix in homogeneous coordinates (last row is identity). More...
 
AffineTransformT inverse () const
 Get the inverse transform. More...
 
operator() (intx i, intx j) const
 Get an element of the N x (N + 1) matrix representing this transform. More...
 
T & operator() (intx i, intx j)
 Get an element of the N x (N + 1) matrix representing this transform. More...
 
AffineTransformT operator* (AffineTransformT const &rhs) const
 Compose this transform with another. More...
 
VectorT operator* (VectorT const &v) const
 Apply this transform to a vector. More...
 
void setIdentity ()
 Set the transform to identity. More...
 
void setLinear (MatrixT const &linear_)
 Set linear transform component. More...
 
void setTranslation (VectorT const &translation_)
 Set translation component. More...
 
Matrix< N, N+1, T > toMatrix () const
 Convert to an N x (N + 1) transformation matrix. More...
 
std::string toString () const
 Get a string representing the transform. More...
 

Static Public Member Functions

static AffineTransformT const & identity ()
 Get the identity transform. More...
 
static AffineTransformN rotationArc (VectorT const &start_dir, VectorT const &end_dir, bool normalize_dirs=true)
 Return the transformation corresponding to the rotation from one direction vector to another. More...
 
static AffineTransformN rotationAxisAngle (VectorT const &axis, Real radians)
 Construct a rotation specified by an angle (in radians) around an axis. More...
 
static AffineTransformN rotationEulerAnglesXYZ (Real yaw_radians, Real pitch_radians, Real roll_radians)
 Rotate about the Z axis by the roll angle, then the Y axis by the pitch angle, and finally the X axis by the yaw angle. More...
 
static AffineTransformN rotationEulerAnglesXZY (Real yaw_radians, Real pitch_radians, Real roll_radians)
 Rotate about the Y axis by the roll angle, then the Z axis by the pitch angle, and finally the X axis by the yaw angle. More...
 
static AffineTransformN rotationEulerAnglesYXZ (Real yaw_radians, Real pitch_radians, Real roll_radians)
 Rotate about the Z axis by the roll angle, then the X axis by the pitch angle, and finally the Y axis by the yaw angle. More...
 
static AffineTransformN rotationEulerAnglesYZX (Real yaw_radians, Real pitch_radians, Real roll_radians)
 Rotate about the X axis by the roll angle, then the Z axis by the pitch angle, and finally the Y axis by the yaw angle. More...
 
static AffineTransformN rotationEulerAnglesZXY (Real yaw_radians, Real pitch_radians, Real roll_radians)
 Rotate about the Y axis by the roll angle, then the X axis by the pitch angle, and finally the Z axis by the yaw angle. More...
 
static AffineTransformN rotationEulerAnglesZYX (Real yaw_radians, Real pitch_radians, Real roll_radians)
 Rotate about the X axis by the roll angle, then the Y axis by the pitch angle, and finally the Z axis by the yaw angle. More...
 
static AffineTransformT scaling (VectorT const &s)
 Construct a scaling transform. More...
 
static AffineTransformN scaling (T const &sx, T const &sy, T const &sz)
 Construct a scaling transform. More...
 
static AffineTransformT scaling (T const &s)
 Construct a uniform scaling transform. More...
 
static AffineTransformN translation (T const &tx, T const &ty, T const &tz)
 Construct a translation. More...
 
static AffineTransformT translation (VectorT const &v)
 Construct a translation. More...
 

Detailed Description

template<typename T>
class Thea::AffineTransformN< 3, T >

An affine transformation in 3-space, consisting of a linear transformation (3x3 matrix) plus a translation.

Definition at line 25 of file AffineTransform3.hpp.

Member Typedef Documentation

typedef AffineTransformN<N, T> AffineTransformT
inherited

N-dimensional affine transform type.

Definition at line 39 of file AffineTransformN.hpp.

Constructor & Destructor Documentation

Default constructor.

Does not initialize anything.

Definition at line 35 of file AffineTransform3.hpp.

AffineTransformN ( MatrixT const &  linear_,
VectorT const &  translation_ = VectorT::Zero() 
)

Construct from a linear transform, followed by a translation.

Definition at line 38 of file AffineTransform3.hpp.

AffineTransformN ( AffineTransformN< 3, T > const &  src)

Copy constructor.

Definition at line 41 of file AffineTransform3.hpp.

AffineTransformN ( VectorT const &  x,
VectorT const &  y,
VectorT const &  z,
VectorT const &  translation_ 
)

Construct from 3 basis vectors, specifying the linear transform, and a translation.

The four arguments form the columns of the 3x4 matrix specifying the transform.

Definition at line 47 of file AffineTransform3.hpp.

AffineTransformN ( T const &  m00,
T const &  m01,
T const &  m02,
T const &  m03,
T const &  m10,
T const &  m11,
T const &  m12,
T const &  m13,
T const &  m20,
T const &  m21,
T const &  m22,
T const &  m23 
)

Construct from a 3x4 array.

Definition at line 51 of file AffineTransform3.hpp.

Member Function Documentation

AffineTransformN<N, U> cast ( ) const
inherited

Cast the transform to a different scalar type.

Definition at line 52 of file AffineTransformN.hpp.

MatrixT const& getLinear ( ) const
inherited

Get linear transform component.

Definition at line 79 of file AffineTransformN.hpp.

MatrixT& getLinear ( )
inherited

Get linear transform component.

Definition at line 82 of file AffineTransformN.hpp.

VectorT const& getTranslation ( ) const
inherited

Get translation component.

Definition at line 88 of file AffineTransformN.hpp.

VectorT& getTranslation ( )
inherited

Get translation component.

Definition at line 91 of file AffineTransformN.hpp.

Matrix<N + 1, N + 1, T> homogeneous ( ) const
inherited

Convert to an (N + 1) x (N + 1) transformation matrix in homogeneous coordinates (last row is identity).

Definition at line 97 of file AffineTransformN.hpp.

static AffineTransformT const& identity ( )
staticinherited

Get the identity transform.

Definition at line 165 of file AffineTransformN.hpp.

AffineTransformT inverse ( ) const
inherited

Get the inverse transform.

Definition at line 127 of file AffineTransformN.hpp.

T operator() ( intx  i,
intx  j 
) const
inherited

Get an element of the N x (N + 1) matrix representing this transform.

Definition at line 134 of file AffineTransformN.hpp.

T& operator() ( intx  i,
intx  j 
)
inherited

Get an element of the N x (N + 1) matrix representing this transform.

Definition at line 141 of file AffineTransformN.hpp.

AffineTransformT operator* ( AffineTransformT const &  rhs) const
inherited

Compose this transform with another.

The other is applied first.

Definition at line 148 of file AffineTransformN.hpp.

VectorT operator* ( VectorT const &  v) const
inherited

Apply this transform to a vector.

Definition at line 154 of file AffineTransformN.hpp.

static AffineTransformN rotationArc ( VectorT const &  start_dir,
VectorT const &  end_dir,
bool  normalize_dirs = true 
)
static

Return the transformation corresponding to the rotation from one direction vector to another.

Parameters
start_dirThe vector to rotate from.
end_dirThe vector to rotate to.
normalize_dirsIf false, the directions will be assumed to have been pre-normalized to unit length before being passed to this function.

Definition at line 134 of file AffineTransform3.hpp.

static AffineTransformN rotationAxisAngle ( VectorT const &  axis,
Real  radians 
)
static

Construct a rotation specified by an angle (in radians) around an axis.

Definition at line 73 of file AffineTransform3.hpp.

static AffineTransformN rotationEulerAnglesXYZ ( Real  yaw_radians,
Real  pitch_radians,
Real  roll_radians 
)
static

Rotate about the Z axis by the roll angle, then the Y axis by the pitch angle, and finally the X axis by the yaw angle.

Definition at line 81 of file AffineTransform3.hpp.

static AffineTransformN rotationEulerAnglesXZY ( Real  yaw_radians,
Real  pitch_radians,
Real  roll_radians 
)
static

Rotate about the Y axis by the roll angle, then the Z axis by the pitch angle, and finally the X axis by the yaw angle.

Definition at line 89 of file AffineTransform3.hpp.

static AffineTransformN rotationEulerAnglesYXZ ( Real  yaw_radians,
Real  pitch_radians,
Real  roll_radians 
)
static

Rotate about the Z axis by the roll angle, then the X axis by the pitch angle, and finally the Y axis by the yaw angle.

Definition at line 97 of file AffineTransform3.hpp.

static AffineTransformN rotationEulerAnglesYZX ( Real  yaw_radians,
Real  pitch_radians,
Real  roll_radians 
)
static

Rotate about the X axis by the roll angle, then the Z axis by the pitch angle, and finally the Y axis by the yaw angle.

Definition at line 105 of file AffineTransform3.hpp.

static AffineTransformN rotationEulerAnglesZXY ( Real  yaw_radians,
Real  pitch_radians,
Real  roll_radians 
)
static

Rotate about the Y axis by the roll angle, then the X axis by the pitch angle, and finally the Z axis by the yaw angle.

Definition at line 113 of file AffineTransform3.hpp.

static AffineTransformN rotationEulerAnglesZYX ( Real  yaw_radians,
Real  pitch_radians,
Real  roll_radians 
)
static

Rotate about the X axis by the roll angle, then the Y axis by the pitch angle, and finally the Z axis by the yaw angle.

Definition at line 121 of file AffineTransform3.hpp.

static AffineTransformT scaling ( VectorT const &  s)
staticinherited

Construct a scaling transform.

Definition at line 58 of file AffineTransformN.hpp.

static AffineTransformN scaling ( T const &  sx,
T const &  sy,
T const &  sz 
)
static

Construct a scaling transform.

Definition at line 59 of file AffineTransform3.hpp.

static AffineTransformT scaling ( T const &  s)
staticinherited

Construct a uniform scaling transform.

Definition at line 64 of file AffineTransformN.hpp.

void setIdentity ( )
inherited

Set the transform to identity.

Definition at line 76 of file AffineTransformN.hpp.

void setLinear ( MatrixT const &  linear_)
inherited

Set linear transform component.

Definition at line 85 of file AffineTransformN.hpp.

void setTranslation ( VectorT const &  translation_)
inherited

Set translation component.

Definition at line 94 of file AffineTransformN.hpp.

Matrix<N, N + 1, T> toMatrix ( ) const
inherited

Convert to an N x (N + 1) transformation matrix.

Definition at line 112 of file AffineTransformN.hpp.

std::string toString ( ) const
inherited

Get a string representing the transform.

Definition at line 157 of file AffineTransformN.hpp.

static AffineTransformN translation ( T const &  tx,
T const &  ty,
T const &  tz 
)
static

Construct a translation.

Definition at line 67 of file AffineTransform3.hpp.

static AffineTransformT translation ( VectorT const &  v)
staticinherited

Construct a translation.

Definition at line 70 of file AffineTransformN.hpp.


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