WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::math::CubicHermiteSpline Class Reference

Represents a hermite spline of degree 3. More...

#include <wpi/math/spline/CubicHermiteSpline.hpp>

Inheritance diagram for wpi::math::CubicHermiteSpline:
wpi::math::Spline< 3 >

Public Member Functions

 CubicHermiteSpline (wpi::util::array< double, 2 > xInitialControlVector, wpi::util::array< double, 2 > xFinalControlVector, wpi::util::array< double, 2 > yInitialControlVector, wpi::util::array< double, 2 > yFinalControlVector)
 Constructs a cubic hermite spline with the specified control vectors.
Matrixd< 6, 3+1 > Coefficients () const override
 Returns the coefficients matrix.
const ControlVector & GetInitialControlVector () const override
 Returns the initial control vector that created this spline.
const ControlVector & GetFinalControlVector () const override
 Returns the final control vector that created this spline.
Public Member Functions inherited from wpi::math::Spline< 3 >
constexpr Spline ()=default
constexpr Splineoperator= (const Spline &)=default
virtual constexpr ~Spline ()=default
std::optional< PoseWithCurvatureGetPoint (double t) const
 Gets the pose and curvature at some point t on the spline.

Additional Inherited Members

Public Types inherited from wpi::math::Spline< 3 >
using PoseWithCurvature
Static Protected Member Functions inherited from wpi::math::Spline< 3 >
static constexpr Eigen::Vector2d ToVector (const Translation2d &translation)
 Converts a Translation2d into a vector that is compatible with Eigen.
static constexpr Translation2d FromVector (const Eigen::Vector2d &vector)
 Converts an Eigen vector into a Translation2d.

Detailed Description

Represents a hermite spline of degree 3.

Constructor & Destructor Documentation

◆ CubicHermiteSpline()

wpi::math::CubicHermiteSpline::CubicHermiteSpline ( wpi::util::array< double, 2 > xInitialControlVector,
wpi::util::array< double, 2 > xFinalControlVector,
wpi::util::array< double, 2 > yInitialControlVector,
wpi::util::array< double, 2 > yFinalControlVector )
inline

Constructs a cubic hermite spline with the specified control vectors.

Each control vector contains info about the location of the point and its first derivative.

Parameters
xInitialControlVectorThe control vector for the initial point in the x dimension.
xFinalControlVectorThe control vector for the final point in the x dimension.
yInitialControlVectorThe control vector for the initial point in the y dimension.
yFinalControlVectorThe control vector for the final point in the y dimension.

Member Function Documentation

◆ Coefficients()

Matrixd< 6, 3+1 > wpi::math::CubicHermiteSpline::Coefficients ( ) const
inlineoverridevirtual

Returns the coefficients matrix.

Returns
The coefficients matrix.

Implements wpi::math::Spline< 3 >.

◆ GetFinalControlVector()

const ControlVector & wpi::math::CubicHermiteSpline::GetFinalControlVector ( ) const
inlineoverridevirtual

Returns the final control vector that created this spline.

Returns
The final control vector that created this spline.

Implements wpi::math::Spline< 3 >.

◆ GetInitialControlVector()

const ControlVector & wpi::math::CubicHermiteSpline::GetInitialControlVector ( ) const
inlineoverridevirtual

Returns the initial control vector that created this spline.

Returns
The initial control vector that created this spline.

Implements wpi::math::Spline< 3 >.


The documentation for this class was generated from the following file: