![]() |
IOLink 1.11.0
|
Create matrices for 3D transforms. More...
#include <iolink/TransformMatrixFactory.h>
Static Public Member Functions | |
static Matrix4d | translation (const Vector3d &v) |
Create a translation matrix. | |
static Matrix4d | rotationEuler (const Vector3d &angles, const std::string &convention) |
Create a rotation matrix for a rotation using Euler angles. | |
static Matrix4d | rotationOnAxis (double angle, const Vector3d &axis) |
Create a rotation matrix for a rotation around an axis. | |
static Matrix4d | scaling (const Vector3d &v) |
Create a scaling matrix. | |
Create matrices for 3D transforms.
|
static |
Create a rotation matrix for a rotation using Euler angles.
The rotation is described by three Euler angles, chaining rotations, following a given convention.
The convention is decribed by a three-character-string, where each character describes the axis of rotation for the corresponding angle. A lowercase convention means that we are describing an extrinsic rotation, while an uppercase convention means that we are describing an intrinsic rotation. A mixed case convention is invalid.
Extrinsinc and intrinsinc conventions are the inverse of each other, so for example, intrinsinc convention "ZYX" is equivalent to the extrinsic convention "xyz".
Common conventions:
angles | The Euler angles of the rotation. |
convention | The convention used for the rotation. |
InvalidArgument | If the convention is invalid. |
|
static |
Create a rotation matrix for a rotation around an axis.
Rotation is done counter-clockwise, around the given axis.
angle | The rotation angle. |
axis | The axis around which the rotation is done, must be normalized. |
Create a scaling matrix.
v | The scaling factors. |
Create a translation matrix.
v | The vector used for the translation. |