mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpimath] Add two-vector Rotation3d constructor (#4398)
This is useful for turning a 3D vector into an orientation relative a coordinate system vector.
This commit is contained in:
@@ -51,6 +51,18 @@ class WPILIB_DLLEXPORT Rotation3d {
|
||||
*/
|
||||
Rotation3d(const Vectord<3>& axis, units::radian_t angle);
|
||||
|
||||
/**
|
||||
* Constructs a Rotation3d that rotates the initial vector onto the final
|
||||
* vector.
|
||||
*
|
||||
* This is useful for turning a 3D vector (final) into an orientation relative
|
||||
* to a coordinate system vector (initial).
|
||||
*
|
||||
* @param initial The initial vector.
|
||||
* @param final The final vector.
|
||||
*/
|
||||
Rotation3d(const Vectord<3>& initial, const Vectord<3>& final);
|
||||
|
||||
/**
|
||||
* Adds two rotations together.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user