|
ACF $AcfVersion:0$
|
Affine transformation in 3D space. More...
#include <CAffine3d.h>
Public Member Functions | |
| CAffine3d () | |
| Default constructor. | |
| CAffine3d (const CMatrix3d &matrix, const CVector3d &translation) | |
| Construct from matrix and translation. | |
| const CMatrix3d & | GetMatrix () const |
| Get matrix part (rotation/scale). | |
| void | SetMatrix (const CMatrix3d &matrix) |
| Set matrix part. | |
| const CVector3d & | GetTranslation () const |
| Get translation part. | |
| void | SetTranslation (const CVector3d &translation) |
| Set translation part. | |
| void | Reset () |
| Reset to identity transformation. | |
| CVector3d | Transform (const CVector3d &point) const |
| Transform a point. | |
| CVector3d | TransformDirection (const CVector3d &direction) const |
| Transform a direction vector (ignores translation). | |
| CAffine3d | GetInverse () const |
| Get inverse transformation. | |
| bool | GetInverse (CAffine3d &result) const |
| Get inverse transformation. | |
| void | Compose (const CAffine3d &other) |
| Compose this transformation with another (this = this * other). | |
| CAffine3d | GetComposed (const CAffine3d &other) const |
| Compose transformations (returns this * other). | |
| bool | Serialize (iser::IArchive &archive) |
| Serialize this transformation to specified archive. | |
| CAffine3d | operator* (const CAffine3d &other) const |
| CVector3d | operator* (const CVector3d &point) const |
| bool | operator== (const CAffine3d &other) const |
| bool | operator!= (const CAffine3d &other) const |
Static Public Member Functions | |
| static CAffine3d | GetIdentity () |
| Create identity transformation. | |
| static CAffine3d | CreateTranslation (const CVector3d &translation) |
| Create translation transformation. | |
| static CAffine3d | CreateRotation (const CQuaternion3d &rotation) |
| Create rotation transformation from quaternion. | |
| static CAffine3d | CreateRotation (const CVector3d &axis, double angle) |
| Create rotation transformation from axis and angle. | |
| static CAffine3d | CreateScale (double scale) |
| Create uniform scale transformation. | |
| static CAffine3d | CreateScale (double sx, double sy, double sz) |
| Create non-uniform scale transformation. | |
| static CAffine3d | CreateScale (const CVector3d &scale) |
| Create scale transformation from vector. | |
Affine transformation in 3D space.
Combines rotation/scale (matrix) and translation (vector). Represents transformations of the form: v' = M * v + t
Definition at line 20 of file CAffine3d.h.
|
inline |
Default constructor.
Creates identity transformation.
Definition at line 148 of file CAffine3d.h.
Referenced by CreateRotation(), CreateScale(), CreateTranslation(), GetComposed(), and GetIdentity().
Construct from matrix and translation.
| matrix | Rotation/scale matrix. |
| translation | Translation vector. |
Definition at line 155 of file CAffine3d.h.
|
inline |
Compose this transformation with another (this = this * other).
Definition at line 257 of file CAffine3d.h.
References GetComposed().
|
inlinestatic |
Create rotation transformation from quaternion.
Definition at line 174 of file CAffine3d.h.
References CAffine3d(), and i3d::CQuaternion3d::ToMatrix().
Referenced by CreateRotation().
Create rotation transformation from axis and angle.
| axis | Rotation axis. |
| angle | Rotation angle in radians. |
Definition at line 180 of file CAffine3d.h.
References CreateRotation(), and i3d::CQuaternion3d::FromAxisAngle().
Create scale transformation from vector.
Definition at line 198 of file CAffine3d.h.
References CreateScale(), i3d::CVector3d::GetX(), i3d::CVector3d::GetY(), and i3d::CVector3d::GetZ().
|
inlinestatic |
Create uniform scale transformation.
Definition at line 186 of file CAffine3d.h.
References CreateScale().
Referenced by CreateScale(), and CreateScale().
|
inlinestatic |
Create non-uniform scale transformation.
Definition at line 192 of file CAffine3d.h.
References CAffine3d().
Create translation transformation.
Definition at line 168 of file CAffine3d.h.
References CAffine3d(), and i3d::CMatrix3d::GetIdentity().
Compose transformations (returns this * other).
Definition at line 247 of file CAffine3d.h.
References CAffine3d(), and i3d::CMatrix3d::GetMultiplied().
Referenced by Compose(), and operator*().
|
inlinestatic |
| CAffine3d i3d::CAffine3d::GetInverse | ( | ) | const |
Get inverse transformation.
| bool i3d::CAffine3d::GetInverse | ( | CAffine3d & | result | ) | const |
Get inverse transformation.
|
inline |
Get matrix part (rotation/scale).
Definition at line 204 of file CAffine3d.h.
|
inline |
Get translation part.
Definition at line 216 of file CAffine3d.h.
|
inline |
Definition at line 281 of file CAffine3d.h.
Definition at line 263 of file CAffine3d.h.
References GetComposed().
Definition at line 269 of file CAffine3d.h.
References Transform().
|
inline |
Definition at line 275 of file CAffine3d.h.
|
inline |
Reset to identity transformation.
Definition at line 228 of file CAffine3d.h.
References i3d::CMatrix3d::GetIdentity().
| bool i3d::CAffine3d::Serialize | ( | iser::IArchive & | archive | ) |
Serialize this transformation to specified archive.
|
inline |
Set matrix part.
Definition at line 210 of file CAffine3d.h.
|
inline |
Set translation part.
Definition at line 222 of file CAffine3d.h.
Transform a point.
Definition at line 235 of file CAffine3d.h.
References i3d::CMatrix3d::GetMultiplied().
Referenced by operator*().
Transform a direction vector (ignores translation).
Definition at line 241 of file CAffine3d.h.
References i3d::CMatrix3d::GetMultiplied().