Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

LinAlg::Transform3< T > Class Template Reference

#include <Transform3.h>

Inheritance diagram for LinAlg::Transform3< T >:

LinAlg::Mat4< T > List of all members.

Detailed Description

template<typename T>
class LinAlg::Transform3< T >

A 3D affine transformation represented as a 4x4 matrix.

This version supports translation, rotation, and uniform scales.


Public Member Functions

 Transform3 ()
 The identity transform.

 Transform3 (const Mat4< T > &values)
 Initialize from a matrix of values.

 Transform3 (const Matrix< T, 4 > &values)
 Initialize from a matrix of values.

 Transform3 (const Mat3< T > &R, const Vec3< T > &t)
 Initialize from a rotation/scaling matrix and a translation vector.

 Transform3 (const Transform3 &other)
 Copy an affine transform.

Transform3operator= (const Transform3 &other)
 Assign an affine transform to this one.

getScale () const
 Return the uniform scaling factor.

getScaleSqr () const
 Return the uniform scaling factor squared.

Vec3< T > getTranslation () const
 Return the translation.

Transform3 inverse () const
 Calculate the inverse of the transfromation.

Vec3< T > transPoint (const Vec3< T > &v) const
 Transform a point.

Vec3< T > transVector (const Vec3< T > &v) const
 Transform a vector.


Static Public Member Functions

Various affine transforms creators.
Transform3 identity ()
 Return the identity transform.

Transform3 translation (const Vec3< T > &v)
 Return a translation transform.

Transform3 scale (const T &s)
 Return a uniform scaling transform.

Transform3 rotation (const T angle, const Vec3< T > &v)
 Return a rotation transform of angle radians about the unit vector axis.

Transform3 rotation (const Vec3< T > &axisAngle)
 Return a rotation transform of axis.length() radians about the unit vector in the direction of axis.


Member Function Documentation

template<typename T>
Transform3 LinAlg::Transform3< T >::rotation const Vec3< T > &  axisAngle  )  [inline, static]
 

Return a rotation transform of axis.length() radians about the unit vector in the direction of axis.

Note:
This clearly won't work very well for integer types T.

template<typename T>
Transform3 LinAlg::Transform3< T >::rotation const T  angle,
const Vec3< T > &  v
[inline, static]
 

Return a rotation transform of angle radians about the unit vector axis.

Note:
This clearly won't work very well for integer types T.


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

© 2005-2008 Adrian Secord.