|
|
| Translation3d (const EigenUnit::UnitVector< units::meter, units::meter, units::meter > &b) |
| | Translation3d (const Translation2d &t) |
| | Construct a 3D translation from a 2D translation (z = 0).
|
| | Translation3d (units::meter_t distance, const Rotation3d &direction) |
| | Construct a 3D translation from a distance and direction. Converts from spherical coordinates: distance along the given rotation's direction.
|
| | Translation3d (frc::Translation3d frcTrans) |
| | Construct a 3D translation from an frc::Translation3d.
|
| | Translation3d (frc::Translation2d frcTrans) |
| | Construct a 3D translation from an frc::Translation2d, setting Z to zero.
|
| Translation2d | ToTranslation2d () const |
| | Project this translation onto the X-Y plane.
|
| Translation3d | RotateBy (const Rotation3d &rot) const |
| | Rotate this translation by a Rotation3d.
|
| units::meter_t | Distance (const Translation3d &other) const |
| | Distance from this translation to another.
|
|
Translation3d | operator* (double scalar) const |
| | Scalar multiplication.
|
|
Translation3d | operator/ (double scalar) const |
| | Scalar division.
|
|
| NamedPhysicalVector (const EigenUnit::UnitVector< units::meter, units::meter, units::meter > &b) |
|
constexpr | UnitVector () |
| | Default constructor. Initializes all elements to zero.
|
|
constexpr UnitVector & | operator= (const UnitVector &)=default |
| | Copy assignment.
|
| constexpr const StorageType & | Raw () const |
| | Get a constant reference to the underlying raw Eigen data.
|
| constexpr auto | Get () const |
| | Get the value of the N-th element with its unit.
|
| void | Set (units::unit_t< std::tuple_element_t< N, UnitTuple > > val) |
| | Set the value of the N-th element.
|
| auto | Norm () const |
| | Computes the L2 norm (magnitude). Requires all elements to have the same unit tag.
|
| auto | Normalized () const |
| | Returns a normalized (unit-length) vector. Result is dimensionless. Only valid if all elements have the same unit.
|
| auto | Dot (const UnitVector< OtherTags... > &other) const |
| | Dot product with another UnitVector. Resulting unit is the product of the first tags of both vectors.
|
| constexpr auto | Head () const |
| | Extract the first N elements as a new UnitVector.
|
| constexpr auto | Tail () const |
| | Extract the last N elements as a new UnitVector.
|
| constexpr auto | Slice () const |
| | Extract N elements after the Start as a new UnitVector.
|
|
constexpr UnitVector | operator+ (const UnitVector< OtherTags... > &other) const |
| | Vector addition.
|
|
constexpr UnitVector | operator- (const UnitVector< OtherTags... > &other) const |
| | Vector subtraction.
|
|
constexpr UnitVector & | operator+= (const UnitVector< OtherTags... > &other) |
| | In-place vector addition.
|
|
constexpr UnitVector & | operator-= (const UnitVector< OtherTags... > &other) |
| | In-place vector subtraction.
|
| constexpr auto | operator* (const units::unit_t< ScalarTag > &scalar) const |
| | Multiplication by a scalar unit.
|
| constexpr auto | operator/ (const units::unit_t< ScalarTag > &scalar) const |
| | Division by a scalar unit.
|
|
bool | operator== (const UnitVector< OtherTags... > &other) const |
| | Equality operator.
|
| constexpr auto | CWiseProduct (const UnitVector< OtherTags... > &other) const |
| | Component-wise product with another UnitVector.
|
| constexpr auto | CWiseQuotient (const UnitVector< OtherTags... > &other) const |
| | Component-wise quotient with another UnitVector.
|
|
constexpr UnitVector | CWiseAbs () const |
| | Component-wise absolute value.
|
|
constexpr UnitVector | CWiseMin (const UnitVector &other) const |
| | Component-wise minimum.
|
|
constexpr UnitVector | CWiseMax (const UnitVector &other) const |
| | Component-wise maximum.
|
| constexpr UnitVector | Clamp (const UnitVector &lo, const UnitVector &hi) const |
| | Clamp each element between lo and hi vectors.
|
| bool | IsApprox (const UnitVector &other, units::unit_t< std::tuple_element_t< 0, UnitTuple > > tol=units::unit_t< std::tuple_element_t< 0, UnitTuple > >{1e-9}) const |
| | Check if two vectors are approximately equal.
|
|
auto | Sum () const |
| | Computes the sum of all elements. Only valid if all units are the same.
|
|
auto | Mean () const |
| | Computes the mean of all elements. Only valid if all units are the same.
|
|
constexpr auto | X () const |
| | Access the first element (x).
|
|
constexpr auto | Y () const |
| | Access the second element (y).
|
|
constexpr auto | Z () const |
| | Access the third element (z).
|
|
constexpr auto | W () const |
| | Access the fourth element (w).
|
| auto | AsDiagonal () const |
| | Converts the vector to a diagonal matrix.
|
| auto | LPNorm () const |
| | Computes the Lp norm.
|
|
auto | StableNorm () const |
| | Computes the stable norm.
|
|
constexpr auto | Begin () |
|
constexpr auto | End () |
|
|
using | StorageType |
| | The underlying Eigen storage type.
|
|
using | UnitTuple |
| | A tuple of the unit tags.
|
| static constexpr UnitVector | Zero () |
| | Create a zero-initialized vector.
|
| static UnitVector | FromArray (const std::array< double, Size > &arr) |
| | Construct a UnitVector from a std::array of doubles. Values are assumed to be in the target units.
|
| static UnitVector | FromSpan (const std::span< double, Size > &s) |
| | Construct a UnitVector from a std::span of doubles. Values are assumed to be in the target units.
|
| static UnitVector | Constant (units::unit_t< typename std::tuple_element_t< 0, UnitTuple > > val) |
| | Create a vector where all elements are set to a constant value. Only valid if all units are the same.
|
| static auto | Skew (const UnitVector< UnitTags... > &vec) |
| | Converts a 3D vector to a skew-symmetric matrix.
|
|
static constexpr std::size_t | Size |
| | The number of elements in the vector.
|
Represents a 3D translation vector (x, y, z).