|
geomc 1.0
A c++ linear algebra template library
|
An extendable path defined by a sequence of guide knots. More...
#include <geomc/shape/CubicPath.h>
Public Types | |
| using | elem_t |
| The coordinate type of this object. | |
| using | Knot = VecType<T,N> |
| using | point_t |
| The type of a point in this object's space. | |
| using | Spline |
Public Member Functions | |
| BSplinePath ()=default | |
| Construct an empty path. | |
| BSplinePath (const BSpline< T, N > &segment) | |
| Construct a path having a single segment. | |
| BSplinePath (const std::initializer_list< VecType< T, N > > knots) | |
| Construct a path from a sequence of guide knots. | |
| VecType< T, N > | acceleration (T s) const |
Evaluate the second derivative of the path at s, with respect to s. | |
| Rect< T, N > | bounds () const |
| Compute the axis-aligned bounding box of the path. | |
| size_t | n_segments () const |
| Return the number of complete segments in the path. | |
| VecType< T, N > | operator() (T s) const |
Evaluate the path at s. | |
| std::optional< BSpline< T, N > > | operator[] (size_t i) const |
Return the ith segment in the path. | |
| std::optional< size_t > | segment (T s) const |
Return the index of the segment containing s. | |
| VecType< T, N > | velocity (T s) const |
Evaluate the derivative of the path at s, with respect to s. | |
Public Attributes | |
| std::vector< VecType< T, N > > | knots |
| The sequence of guide knots. | |
Static Public Attributes | |
| static constexpr index_t | N |
| The dimension of this object. | |
An extendable path defined by a sequence of guide knots.
B-spline paths are concatenated cubic B-splines, where each segment shares its first three control points with the previous segment.
B-spline curves are C2 continuous, and do not necessarily pass through the guide knots.
|
inherited |
The type of a point in this object's space.
An N-vector of T if N > 1, otherwise a T.
Evaluate the second derivative of the path at s, with respect to s.
The range of s is the same as for operator().
Compute the axis-aligned bounding box of the path.
O(n) on the number of segments.
|
inline |
Return the number of complete segments in the path.
A single segment is defined by four consecutive control points.
Evaluate the path at s.
Segment i is evaluated for s in the range [i, i + 1]. If s is outside the range [0, n_segments()], the path is extrapolated using the first or last segment.
|
inline |
Return the ith segment in the path.
If there are no complete segments in the path, return std::nullopt.
|
inlineinherited |
Return the index of the segment containing s.
If there are no complete segments in the path, return std::nullopt.
Evaluate the derivative of the path at s, with respect to s.
The range of s is the same as for operator().