geomc 1.0
A c++ linear algebra template library
Loading...
Searching...
No Matches
geom::CubicSplineObject Concept Reference

Concept for a cubic spline. More...

#include <geomc/shape/CubicSpline.h>

Concept definition

template<typename S, typename T, index_t N>
concept geom::CubicSplineObject = requires (S s, const VecType<T,N> control_pts[4]) {
S(control_pts);
S(control_pts[0], control_pts[1], control_pts[2], control_pts[3]);
{ S::basis() } -> std::convertible_to<const SimpleMatrix<T,4,4>&>;
{ S::inverse_basis() } -> std::convertible_to<const SimpleMatrix<T,4,4>&>;
{ s.control_points() } -> std::convertible_to<const VecType<T,N>*>;
{ s.bounds() } -> std::same_as<Rect<T,N>>;
{ s.velocity(T(0)) } -> std::same_as<VecType<T,N>>;
{ s(T(0)) } -> std::same_as<VecType<T,N>>;
}
Concept for a cubic spline.
Definition CubicSpline.h:50
typename PointType< T, N >::point_t VecType
The type of a vector in N dimensions with elements of type T.
Definition LinalgTypes.h:265

Detailed Description

Concept for a cubic spline.

A cubic spline is a curve defined by four control points, and a basis matrix. The control points have different meanings for each type of spline, but all cubic splines are interconvertible.

The basis matrix converts control points to cubic polynomial coefficients. The resultant vector has the coefficients in order of increasing power.