Nori  24
Transform Struct Reference

Homogeneous coordinate transformation. More...

#include <transform.h>

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.
 
std::string 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.


The documentation for this struct was generated from the following files: