Rotation matrix.
More...
#include <Rotation.h>
|
static biorbd::utils::Rotation | fromSpatialTransform (const RigidBodyDynamics::Math::SpatialTransform &st) |
| set the Rotation from a spatial transform More...
|
|
static biorbd::utils::Rotation | fromEulerAngles (const biorbd::utils::Vector &rot, const biorbd::utils::String &seq) |
| Create a Rotation from Euler angles. More...
|
|
static biorbd::utils::Matrix | fromMarkersNonNormalized (const std::pair< biorbd::rigidbody::NodeSegment, biorbd::rigidbody::NodeSegment > &axis1markers, const std::pair< biorbd::rigidbody::NodeSegment, biorbd::rigidbody::NodeSegment > &axis2markers, const std::pair< biorbd::utils::String, biorbd::utils::String > &axesNames, const biorbd::utils::String &axisToRecalculate) |
| fromMarkers Creates a system of axes from two axes defined by markers More...
|
|
static biorbd::utils::Rotation | fromMarkers (const std::pair< biorbd::rigidbody::NodeSegment, biorbd::rigidbody::NodeSegment > &axis1markers, const std::pair< biorbd::rigidbody::NodeSegment, biorbd::rigidbody::NodeSegment > &axis2markers, const std::pair< biorbd::utils::String, biorbd::utils::String > &axesNames, const biorbd::utils::String &axisToRecalculate) |
| fromMarkers Creates a system of axes from two axes defined by markers More...
|
|
static biorbd::utils::Vector | toEulerAngles (const biorbd::utils::Rotation &r, const biorbd::utils::String &seq) |
| Return extracted angles from the rotation matrix into Euler angles using the provided sequence. More...
|
|
static biorbd::utils::Rotation | mean (const std::vector< biorbd::utils::Rotation > &mToMean) |
| Get the mean of the Rotation matrices. More...
|
|
Rotation matrix.
Definition at line 32 of file Rotation.h.
◆ Rotation() [1/4]
biorbd::utils::Rotation::Rotation |
( |
const RigidBodyDynamics::Math::Matrix3d & |
matrix = RigidBodyDynamics::Math::Matrix3d::Identity() | ) |
|
◆ Rotation() [2/4]
biorbd::utils::Rotation::Rotation |
( |
const biorbd::utils::Scalar & |
v00, |
|
|
const biorbd::utils::Scalar & |
v01, |
|
|
const biorbd::utils::Scalar & |
v02, |
|
|
const biorbd::utils::Scalar & |
v10, |
|
|
const biorbd::utils::Scalar & |
v11, |
|
|
const biorbd::utils::Scalar & |
v12, |
|
|
const biorbd::utils::Scalar & |
v20, |
|
|
const biorbd::utils::Scalar & |
v21, |
|
|
const biorbd::utils::Scalar & |
v22 |
|
) |
| |
Rotation Construct a Rotation matrix by elements.
- Parameters
-
v00 | Row 0, Col 0 |
v01 | Row 0, Col 1 |
v02 | Row 0, Col 2 |
v10 | Row 1, Col 0 |
v11 | Row 1, Col 1 |
v12 | Row 1, Col 2 |
v20 | Row 2, Col 0 |
v21 | Row 2, Col 1 |
v22 | Row 2, Col 2 |
Definition at line 30 of file Rotation.cpp.
◆ Rotation() [3/4]
Contruct a Rotation matrix.
- Parameters
-
rotation | The Euler angles vector |
rotationSequence | The rotation sequence |
The number of rotation must match the number of axes in the rotation sequence
Definition at line 39 of file Rotation.cpp.
◆ Rotation() [4/4]
biorbd::utils::Rotation::Rotation |
( |
const RigidBodyDynamics::Math::SpatialTransform & |
st | ) |
|
Contruct Rototrans.
- Parameters
-
st | Spatial Transform vector |
Definition at line 47 of file Rotation.cpp.
◆ axe()
Get a particular axis of the Rotation matrix.
- Parameters
-
idx | The index of axis (x = 0, y = 1 and z = 2) |
- Returns
- The axis
Definition at line 54 of file Rotation.cpp.
◆ checkUnitary()
void biorbd::utils::Rotation::checkUnitary |
( |
| ) |
|
|
protected |
Check if the Rotation is a unitary matrix of rotation.
That function throws a runtime_error if the check fails
Definition at line 316 of file Rotation.cpp.
◆ fromEulerAngles()
Create a Rotation from Euler angles.
- Parameters
-
rot | The Euler angles vector |
seq | The rotation sequence |
The number of rotation must match the number of axes in the rotation sequence
Definition at line 66 of file Rotation.cpp.
◆ fromMarkers()
fromMarkers Creates a system of axes from two axes defined by markers
- Parameters
-
axis1markers | The beginning and ending of the vector of the first axis |
axis2markers | The beginning and ending of the vector of the second axis |
axesNames | The names ("x", "y" or "z") of the axes |
axisToRecalculate | The axis to recalculate to ensure orthonormal system of axes |
- Returns
- The system of axes
Definition at line 179 of file Rotation.cpp.
◆ fromMarkersNonNormalized()
fromMarkers Creates a system of axes from two axes defined by markers
- Parameters
-
axis1markers | The beginning and ending of the vector of the first axis |
axis2markers | The beginning and ending of the vector of the second axis |
axesNames | The names ("x", "y" or "z") of the axes |
axisToRecalculate | The axis to recalculate to ensure orthonormal system of axes |
- Returns
- The system of axes
Definition at line 104 of file Rotation.cpp.
◆ fromSpatialTransform()
biorbd::utils::Rotation biorbd::utils::Rotation::fromSpatialTransform |
( |
const RigidBodyDynamics::Math::SpatialTransform & |
st | ) |
|
|
static |
◆ mean()
◆ toEulerAngles()
Return extracted angles from the rotation matrix into Euler angles using the provided sequence.
- Parameters
-
r | The Rotation matrix to extract angles from |
seq | The angle sequence |
- Returns
- The angles (the length of the vector will match the length of sequence)
The rotation sequence can be any combination of x, y and z
Definition at line 197 of file Rotation.cpp.
The documentation for this class was generated from the following files: