holoscan::SO2
holoscan::SO2
holoscan::SO2
Class representing 2D rotations using the SO(2) group.
This class represents rotations in 2D space as elements of the special orthogonal group SO(2). Internally, rotations are stored as normalized direction vectors (cos, sin) to avoid trigonometric function calls during composition and transformation operations.
Template parameters
Scalar type (typically float or double).
Default constructor creates an undefined rotation.
Use identity() to create the identity rotation.
Get the cosine of the rotation angle.
This is a simple getter and does not call trigonometric functions.
Returns: Cosine of the rotation angle.
Get the sine of the rotation angle.
This is a simple getter and does not call trigonometric functions.
Returns: Sine of the rotation angle.
Get the cos and sin of the rotation angle as a direction vector.
Returns: Direction vector (cos, sin).
Get the rotation angle in range [-π, π].
This uses a call to a trigonometric function.
Returns: Rotation angle in radians.
Get the 2×2 rotation matrix representation.
Returns: 2×2 rotation matrix.
Get the inverse rotation.
Returns: Inverse rotation.
Cast to a different scalar type.
Returns: Rotation cast to the target type.
Template parameters
Target scalar type.
Create the identity rotation.
Returns: Identity rotation (no rotation).
Create rotation from an angle.
This uses calls to trigonometric functions.
Returns: Rotation representing the given angle.
Parameters
Rotation angle in radians.
Create rotation from a not necessarily normalized direction vector.
Returns: Rotation aligned with the given direction.
Parameters
Direction vector (will be normalized internally).
Create rotation from a normalized cos/sin direction vector.
Returns: Rotation represented by the given cos/sin values.
Parameters
Normalized direction vector (cos, sin).