mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpimath] Memoize CoordinateSystem and CoordinateAxis statics (#4241)
This commit is contained in:
@@ -37,32 +37,32 @@ class WPILIB_DLLEXPORT CoordinateAxis {
|
||||
/**
|
||||
* Returns a coordinate axis corresponding to +X in the NWU coordinate system.
|
||||
*/
|
||||
static CoordinateAxis N();
|
||||
static const CoordinateAxis& N();
|
||||
|
||||
/**
|
||||
* Returns a coordinate axis corresponding to -X in the NWU coordinate system.
|
||||
*/
|
||||
static CoordinateAxis S();
|
||||
static const CoordinateAxis& S();
|
||||
|
||||
/**
|
||||
* Returns a coordinate axis corresponding to -Y in the NWU coordinate system.
|
||||
*/
|
||||
static CoordinateAxis E();
|
||||
static const CoordinateAxis& E();
|
||||
|
||||
/**
|
||||
* Returns a coordinate axis corresponding to +Y in the NWU coordinate system.
|
||||
*/
|
||||
static CoordinateAxis W();
|
||||
static const CoordinateAxis& W();
|
||||
|
||||
/**
|
||||
* Returns a coordinate axis corresponding to +Z in the NWU coordinate system.
|
||||
*/
|
||||
static CoordinateAxis U();
|
||||
static const CoordinateAxis& U();
|
||||
|
||||
/**
|
||||
* Returns a coordinate axis corresponding to -Z in the NWU coordinate system.
|
||||
*/
|
||||
static CoordinateAxis D();
|
||||
static const CoordinateAxis& D();
|
||||
|
||||
private:
|
||||
friend class CoordinateSystem;
|
||||
|
||||
@@ -42,21 +42,21 @@ class WPILIB_DLLEXPORT CoordinateSystem {
|
||||
*
|
||||
* The +X axis is north, the +Y axis is west, and the +Z axis is up.
|
||||
*/
|
||||
static CoordinateSystem NWU();
|
||||
static const CoordinateSystem& NWU();
|
||||
|
||||
/**
|
||||
* Returns an instance of the East-Down-North (EDN) coordinate system.
|
||||
*
|
||||
* The +X axis is east, the +Y axis is down, and the +Z axis is north.
|
||||
*/
|
||||
static CoordinateSystem EDN();
|
||||
static const CoordinateSystem& EDN();
|
||||
|
||||
/**
|
||||
* Returns an instance of the NED coordinate system.
|
||||
*
|
||||
* The +X axis is north, the +Y axis is east, and the +Z axis is down.
|
||||
*/
|
||||
static CoordinateSystem NED();
|
||||
static const CoordinateSystem& NED();
|
||||
|
||||
/**
|
||||
* Converts the given pose from one coordinate system to another.
|
||||
|
||||
Reference in New Issue
Block a user