Class PoseExtensions
Extension methods for the Pose struct, in order to improve the readability of some math.
Inherited Members
Namespace: Unity.MLAgents.Sensors
Assembly: Unity.ML-Agents.dll
Syntax
public static class PoseExtensions
Methods
Inverse(Pose)
Compute the inverse of a Pose. For any Pose P, P.Inverse() * P will equal the identity pose (within tolerance).
Declaration
public static Pose Inverse(this Pose pose)
Parameters
Type | Name | Description |
---|---|---|
Pose | pose | The pose to operate on. |
Returns
Type | Description |
---|---|
Pose | Inverse |
Multiply(Pose, Pose)
This is equivalent to Pose.GetTransformedBy(), but keeps the order more intuitive.
Declaration
public static Pose Multiply(this Pose pose, Pose rhs)
Parameters
Type | Name | Description |
---|---|---|
Pose | pose | The pose to transform by. |
Pose | rhs | The pose to be transformed. |
Returns
Type | Description |
---|---|
Pose | Multiplied |
Multiply(Pose, Vector3)
Transform the vector by the pose. Conceptually this is equivalent to treating the Pose as a 4x4 matrix and multiplying the augmented vector. See https://en.wikipedia.org/wiki/Affine_transformation#Augmented_matrix for more details.
Declaration
public static Vector3 Multiply(this Pose pose, Vector3 rhs)
Parameters
Type | Name | Description |
---|---|---|
Pose | pose | The pose to transform by. |
Vector3 | rhs | The vector to be transformed. |
Returns
Type | Description |
---|---|
Vector3 | Multiplied |