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

An affine transform in N-dimensional space, where N is any positive (non-zero) integer and T is a field. More...

#include <AffineTransformN.hpp>

Inheritance diagram for AffineTransformN< N, T >:
AffineTransformNBase< N, 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...
 
template<typename U >
AffineTransformN< N, U > cast () const
 Cast the transform to a different scalar type. More...
 
MatrixT const & getLinear () const
 Get linear transform component. More...
 
MatrixTgetLinear ()
 Get linear transform component. More...
 
VectorT const & getTranslation () const
 Get translation component. More...
 
VectorTgetTranslation ()
 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 AffineTransformT scaling (VectorT const &s)
 Construct a scaling transform. More...
 
static AffineTransformT scaling (T const &s)
 Construct a uniform scaling transform. More...
 
static AffineTransformT translation (VectorT const &v)
 Construct a translation. More...
 

Detailed Description

template<int N, typename T = Real>
class Thea::AffineTransformN< N, T >

An affine transform in N-dimensional space, where N is any positive (non-zero) integer and T is a field.

Definition at line 25 of file AffineTransformN.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 191 of file AffineTransformN.hpp.

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

Construct from a linear transform, followed by a translation.

Definition at line 194 of file AffineTransformN.hpp.

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

Copy constructor.

Definition at line 197 of file AffineTransformN.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 AffineTransformT scaling ( VectorT const &  s)
staticinherited

Construct a scaling transform.

Definition at line 58 of file AffineTransformN.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 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: