#include <HomogeneousTransform.hpp>
Public Member Functions | |
| HomogeneousTransform () | |
| void | concatenate (const HomogeneousTransform &transform) |
| void | perspectiveZ (double f) |
| void | rotateX (double cos, double sin) |
| void | rotateY (double cos, double sin) |
| void | rotateZ (double cos, double sin) |
| void | scale (double x, double y, double z) |
| void | transform (double x, double y, double z, double w, double &outx, double &outy, double &outz, double &outw) const |
| Vec | transform (Vec p) const |
| void | translate (double x, double y, double z) |
Private Attributes | |
| double | M [4][4] |
Consider homogeneous coordinates
Vice versa, given the homogeneous coordinates
A homogeneous coordinate transformation can be written as
A HomogeneousTransform instance represents the
| HomogeneousTransform::HomogeneousTransform | ( | ) |
The default constructor; it creates an identity transform.
| void HomogeneousTransform::concatenate | ( | const HomogeneousTransform & | transform | ) |
This function concatenates the specified tranform to the current transform.
| void HomogeneousTransform::perspectiveZ | ( | double | f | ) |
This function concatenates to the current transform a perspective along the z axis with the specified focal length.
| void HomogeneousTransform::rotateX | ( | double | cos, |
| double | sin | ||
| ) |
This function concatenates to the current transform a rotation about the x axis over an angle
| void HomogeneousTransform::rotateY | ( | double | cos, |
| double | sin | ||
| ) |
This function concatenates to the current transform a rotation about the y axis over an angle
| void HomogeneousTransform::rotateZ | ( | double | cos, |
| double | sin | ||
| ) |
This function concatenates to the current transform a rotation about the z axis over an angle
| void HomogeneousTransform::scale | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
This function concatenates to the current transform a scaling by the specified factor along each coordinate axis.
| void HomogeneousTransform::transform | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | w, | ||
| double & | outx, | ||
| double & | outy, | ||
| double & | outz, | ||
| double & | outw | ||
| ) | const |
This function applies the current transform to the specified homogeneous coordinates and stores the result in homogeneous coordinates in the output variables.
This function applies the current transform to a position vector specified in regular coordinates and returns the transformed position vector in regular coordinates. If the transformed position is at infinity, the value of the returned vector is undefined.
| void HomogeneousTransform::translate | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
This function concatenates to the current transform a translation over the specified offset along each coordinate axis.