WPILibC++  2020.3.2-60-g3011ebe
frc::CubicHermiteSpline Class Reference

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

#include <CubicHermiteSpline.h>

Inheritance diagram for frc::CubicHermiteSpline:
frc::Spline< 3 >

Public Member Functions

 CubicHermiteSpline (std::array< double, 2 > xInitialControlVector, std::array< double, 2 > xFinalControlVector, std::array< double, 2 > yInitialControlVector, std::array< double, 2 > yFinalControlVector)
 Constructs a cubic hermite spline with the specified control vectors. More...
 
- Public Member Functions inherited from frc::Spline< 3 >
 Spline (const Spline &)=default
 
 Spline (Spline &&)=default
 
Splineoperator= (const Spline &)=default
 
Splineoperator= (Spline &&)=default
 
PoseWithCurvature GetPoint (double t) const
 Gets the pose and curvature at some point t on the spline. More...
 

Protected Member Functions

Eigen::Matrix< double, 6, 3+1 > Coefficients () const override
 Returns the coefficients matrix. More...
 

Additional Inherited Members

- Public Types inherited from frc::Spline< 3 >
using PoseWithCurvature = std::pair< Pose2d, units::curvature_t >
 
- Static Protected Member Functions inherited from frc::Spline< 3 >
static Eigen::Vector2d ToVector (const Translation2d &translation)
 Converts a Translation2d into a vector that is compatible with Eigen. More...
 
static Translation2d FromVector (const Eigen::Vector2d &vector)
 Converts an Eigen vector into a Translation2d. More...
 

Detailed Description

Represents a hermite spline of degree 3.

Constructor & Destructor Documentation

◆ CubicHermiteSpline()

frc::CubicHermiteSpline::CubicHermiteSpline ( std::array< double, 2 >  xInitialControlVector,
std::array< double, 2 >  xFinalControlVector,
std::array< double, 2 >  yInitialControlVector,
std::array< double, 2 >  yFinalControlVector 
)

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()

Eigen::Matrix<double, 6, 3 + 1> frc::CubicHermiteSpline::Coefficients ( ) const
inlineoverrideprotectedvirtual

Returns the coefficients matrix.

Returns
The coefficients matrix.

Implements frc::Spline< 3 >.


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