VRay SDK for C++
|
A math object used to define object position, rotation and scale in 3D space. More...
#include <vraysdk.hpp>
Public Member Functions | |
Transform () noexcept=default | |
Default constructor - zero initializes all components. | |
Transform (const Matrix &matrix, const Vector &offset) noexcept | |
Transform (const Transform &) noexcept=default | |
Transform (int i) noexcept | |
Transform (Transform &&) noexcept=default | |
void | makeIdentity (void) noexcept |
Make the transformation the identity transformation. | |
void | makeInverse (void) noexcept |
Make the transformation the inverse of its current value. | |
void | makeZero (void) noexcept |
Make the transformation the zero transformation. | |
void | operator*= (float x) noexcept |
Multiply the transformation by a number. | |
void | operator+= (const Transform &tm) noexcept |
Add another transformation to this one. | |
void | operator-= (const Transform &tm) noexcept |
Subtract another tranformation from this one. | |
Transform & | operator= (const Transform &) noexcept=default |
Transform & | operator= (Transform &&) noexcept=default |
std::string | toString () const |
Vector | transformVec (const Vector &a) const noexcept |
Public Attributes | |
Matrix | matrix |
Vector | offset |
Related Functions | |
(Note that these are not member functions.) | |
Vector | inverseTransform (const Vector &a, const Transform &tm) noexcept |
bool | operator!= (const Transform &a, const Transform &b) noexcept |
Transform | operator* (const Transform &a, const Transform &b) noexcept |
Vector | operator* (const Transform &tm, const Vector &a) noexcept |
Transform | operator* (const Transform &tm, float x) noexcept |
Transform | operator* (float x, const Transform &tm) noexcept |
Transform | operator+ (const Transform &a, const Transform &b) noexcept |
Transform | operator- (const Transform &a, const Transform &b) noexcept |
Transform | operator- (const Transform &tm) noexcept |
Transform | operator/ (const Transform &tm, float x) noexcept |
bool | operator== (const Transform &a, const Transform &b) noexcept |
A math object used to define object position, rotation and scale in 3D space.
Constructor from a matrix and a vector.
matrix | The matrix (rotation+scale) portion. |
offset | The offset (translation) portion. |
|
inlinenoexcept |
Constructor to either the zero or the identity transformation.
i | If this is 0, the transformation is initialized to the zero transformation; if this is 1, the transformation is initialized to the identity transformation. |
Transform a vector by the transformation (ignores the translation part). This is different from the operator * with a vector, which adds in the translation part as well.
Inverse-transform a point with a transform. The transform must have an orthonormal matrix (no scaling).
Checks two transforms for inequality.
Mutiply two transformations, so that if p is a Vector, (a*b)*p == a*(b*p).
Transform a point with a transform.
Mutiply all components of a transformation by a number.
Mutiply all components of a transformation by a number.
Add two transformations, so that if p is a Vector, (a+b)*p == (a*p)+(b*p).
Subtract two transformations, so that if p is a Vector, (a-b)*p == (a*p)-(b*p).
Divide all components of a transformation by a number. Does not check if the number is zero.
Checks two transforms for exact equality. NOTE: You may want to perform your own approximate comparison, element by element