Valkyrie 2026
Loading...
Searching...
No Matches
valor::geometry::HomogeneousVector3d Class Reference

Represents a 3D homogeneous transformation vector (x, y, z, 1). More...

#include <valkyrie/util/geometry/Pose.h>

Inheritance diagram for valor::geometry::HomogeneousVector3d:
valor::EigenUnit::UnitVector< units::meter, units::meter, units::meter, units::dimensionless::scalar >

Additional Inherited Members

Public Types inherited from valor::EigenUnit::UnitVector< units::meter, units::meter, units::meter, units::dimensionless::scalar >
using StorageType
 The underlying Eigen storage type.
using UnitTuple
 A tuple of the unit tags.
Public Member Functions inherited from valor::EigenUnit::UnitVector< units::meter, units::meter, units::meter, units::dimensionless::scalar >
constexpr UnitVector ()
 Default constructor. Initializes all elements to zero.
constexpr UnitVectoroperator= (const UnitVector &)=default
 Copy assignment.
constexpr const StorageTypeRaw () 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 UnitVectoroperator+= (const UnitVector< OtherTags... > &other)
 In-place vector addition.
constexpr UnitVectoroperator-= (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 ()
Static Public Member Functions inherited from valor::EigenUnit::UnitVector< units::meter, units::meter, units::meter, units::dimensionless::scalar >
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 Public Attributes inherited from valor::EigenUnit::UnitVector< units::meter, units::meter, units::meter, units::dimensionless::scalar >
static constexpr std::size_t Size
 The number of elements in the vector.

Detailed Description

Represents a 3D homogeneous transformation vector (x, y, z, 1).


The documentation for this class was generated from the following file:
  • src/main/include/valkyrie/util/geometry/Pose.h