|
TrajoptLib
Library for generating time-optimal trajectories for FRC robots.
|
#include <trajopt/geometry/rotation2.hpp>
Public Member Functions | |
| constexpr | Rotation2 ()=default |
| Constructs a rotation with a default angle of 0 degrees. | |
| constexpr | Rotation2 (const T &angle) |
| constexpr | Rotation2 (T cos, T sin) |
| constexpr | Rotation2 (double x, double y) |
| template<typename U> | |
| constexpr | Rotation2 (const Rotation2< U > &other) |
| constexpr Rotation2< T > | operator+ (const Rotation2< T > &other) const |
| constexpr Rotation2< T > | operator- (const Rotation2< T > &other) const |
| constexpr Rotation2< T > | operator- () const |
| template<typename U> | |
| constexpr Rotation2< U > | rotate_by (const Rotation2< U > &other) const |
| constexpr T | radians () const |
| constexpr T | degrees () const |
| constexpr const T & | cos () const |
| constexpr const T & | sin () const |
A rotation in a 2D coordinate frame represented by a point on the unit circle (cosine and sine).
|
inlineconstexpr |
Constructs a rotation with the given angle.
| angle | The angle in radians. |
|
inlineconstexpr |
Constructs a rotation with the given cosine and sine components.
| cos | The cosine component of the rotation. |
| sin | The sine component of the rotation. |
|
inlineconstexpr |
Constructs a rotation with the given x and y components. The x and y don't have to be normalized.
| x | The x component of the rotation. |
| y | The y component of the rotation. |
|
inlineexplicitconstexpr |
Coerces one rotation type into another.
| other | The other rotation type. |
|
inlineconstexpr |
Returns the cosine of the rotation.
|
inlineconstexpr |
Returns the rotation as an Euler angle in degrees.
|
inlineconstexpr |
Adds two rotations together, with the result being bounded between -pi and pi.
| other | The rotation to add. |
|
inlineconstexpr |
Takes the inverse of the current rotation.
|
inlineconstexpr |
Subtracts the new rotation from the current rotation and returns the new rotation.
| other | The rotation to subtract. |
|
inlineconstexpr |
Returns the rotation as an Euler angle in radians.
|
inlineconstexpr |
Adds the new rotation to the current rotation using a clockwise rotation matrix.
| other | The rotation to rotate by. |
|
inlineconstexpr |
Returns the sine of the rotation.