Transform struct
#include <darts/transform.h>
Homogeneous coordinate transformation.
This class stores a general homogeneous coordinate transformation, 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.
Constructors, destructors, conversion operators
Public functions
- auto inverse() const -> Transform
- Return the inverse transformation.
- auto operator*(const Transform& t) const -> Transform
- Concatenate with another transform.
- auto vector(const Vec3f& v) const -> Vec3f
- Apply the homogeneous transformation to a 3D direction vector.
- auto normal(const Vec3f& n) const -> Vec3f
- Apply the homogeneous transformation to a 3D normal.
- auto point(const Vec3f& p) const -> Vec3f
- Transform a point by an arbitrary matrix in homogeneous coordinates.
- auto ray(const Ray3f& r) const -> Ray3f
- Apply the homogeneous transformation to a ray.
- auto box(const Box3f& box) const -> Box3f
- Transform the axis-aligned Box and return the bounding box of the result.