Nori

Transform Struct Reference

Homogeneous coordinate transformation. More...

#include <transform.h>

List of all members.

Public Member Functions

 Transform ()
 Create the identity transform.
 Transform (const Eigen::Matrix4f &trafo)
 Create a new transform instance for the given matrix.
 Transform (const Eigen::Matrix4f &trafo, const Eigen::Matrix4f &inv)
 Create a new transform instance for the given matrix and its inverse.
const Eigen::Matrix4f & getMatrix () const
 Return the underlying matrix.
const Eigen::Matrix4f & getInverseMatrix () const
 Return the inverse of the underlying matrix.
Transform inverse () const
 Return the inverse transformation.
Transform operator* (const Transform &t) const
 Concatenate with another transform.
Vector3f operator* (const Vector3f &v) const
 Apply the homogeneous transformation to a 3D vector.
Normal3f operator* (const Normal3f &n) const
 Apply the homogeneous transformation to a 3D normal.
Point3f operator* (const Point3f &p) const
 Transform a point by an arbitrary matrix in homogeneous coordinates.
Ray3f operator& (const Ray3f &r) const
 Apply the homogeneous transformation to a ray.
QString toString () const
 Return a string representation.

Detailed Description

Homogeneous coordinate transformation.

This class stores a general homogeneous coordinate tranformation, such as rotation, translation, uniform or non-uniform scaling, and perspective transformations. The inverse of this transformation is also recorded here, since it is required when transforming normal vectors.

Definition at line 35 of file transform.h.


Constructor & Destructor Documentation

Transform::Transform ( ) [inline]

Create the identity transform.

Definition at line 38 of file transform.h.

Transform::Transform ( const Eigen::Matrix4f &  trafo)

Create a new transform instance for the given matrix.

Transform::Transform ( const Eigen::Matrix4f &  trafo,
const Eigen::Matrix4f &  inv 
) [inline]

Create a new transform instance for the given matrix and its inverse.

Definition at line 46 of file transform.h.


Member Function Documentation

const Eigen::Matrix4f& Transform::getInverseMatrix ( ) const [inline]

Return the inverse of the underlying matrix.

Definition at line 55 of file transform.h.

const Eigen::Matrix4f& Transform::getMatrix ( ) const [inline]

Return the underlying matrix.

Definition at line 50 of file transform.h.

Transform Transform::inverse ( ) const [inline]

Return the inverse transformation.

Definition at line 60 of file transform.h.

Ray3f Transform::operator& ( const Ray3f r) const [inline]

Apply the homogeneous transformation to a ray.

Definition at line 84 of file transform.h.

Point3f Transform::operator* ( const Point3f p) const [inline]

Transform a point by an arbitrary matrix in homogeneous coordinates.

Definition at line 78 of file transform.h.

Vector3f Transform::operator* ( const Vector3f v) const [inline]

Apply the homogeneous transformation to a 3D vector.

Definition at line 68 of file transform.h.

Transform Transform::operator* ( const Transform t) const

Concatenate with another transform.

Normal3f Transform::operator* ( const Normal3f n) const [inline]

Apply the homogeneous transformation to a 3D normal.

Definition at line 73 of file transform.h.

QString Transform::toString ( ) const

Return a string representation.


The documentation for this struct was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines