IOLink 1.11.0
Loading...
Searching...
No Matches
iolink::TransformMatrix4Factory Class Reference

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.
 

Detailed Description

Create matrices for 3D transforms.

Member Function Documentation

◆ rotationEuler()

static Matrix4d iolink::TransformMatrix4Factory::rotationEuler ( const Vector3d angles,
const std::string &  convention 
)
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:

  • "ZYX": Rotation around Z, then Y, then X.
  • "ZXZ": Rotation around Z, then X, then Z.
Parameters
anglesThe Euler angles of the rotation.
conventionThe convention used for the rotation.
Returns
The rotation matrix.
Exceptions
InvalidArgumentIf the convention is invalid.

◆ rotationOnAxis()

static Matrix4d iolink::TransformMatrix4Factory::rotationOnAxis ( double  angle,
const Vector3d axis 
)
static

Create a rotation matrix for a rotation around an axis.

Rotation is done counter-clockwise, around the given axis.

Parameters
angleThe rotation angle.
axisThe axis around which the rotation is done, must be normalized.
Returns
The rotation matrix.

◆ scaling()

static Matrix4d iolink::TransformMatrix4Factory::scaling ( const Vector3d v)
static

Create a scaling matrix.

Parameters
vThe scaling factors.
Returns
The scaling matrix.

◆ translation()

static Matrix4d iolink::TransformMatrix4Factory::translation ( const Vector3d v)
static

Create a translation matrix.

Parameters
vThe vector used for the translation.
Returns
The translation matrix.

The documentation for this class was generated from the following file: