geomc 1.0
A c++ linear algebra template library
Loading...
Searching...
No Matches
SplinePath< T, N, S, Derived > Class Template Reference

Base class for a path defined by a sequence of concatenated splines. More...

#include <geomc/shape/CubicPath.h>

Inheritance diagram for SplinePath< T, N, S, Derived >:
Dimensional< T, N >

Public Types

using elem_t
 The coordinate type of this object.
 
using point_t
 The type of a point in this object's space.
 
using Spline = S
 

Public Member Functions

VecType< T, Nacceleration (T s) const
 Evaluate the second derivative of the path at s, with respect to s.
 
Rect< T, Nbounds () const
 Compute the axis-aligned bounding box of the path.
 
VecType< T, Noperator() (T s) const
 Evaluate the path at s.
 
std::optional< size_t > segment (T s) const
 Return the index of the segment containing s.
 
VecType< T, Nvelocity (T s) const
 Evaluate the derivative of the path at s, with respect to s.
 

Static Public Attributes

static constexpr index_t N
 The dimension of this object.
 

Detailed Description

template<typename T, index_t N, CubicSplineObject< T, N > S, typename Derived>
class geom::SplinePath< T, N, S, Derived >

Base class for a path defined by a sequence of concatenated splines.

Member Typedef Documentation

◆ point_t

using point_t
inherited

The type of a point in this object's space.

An N-vector of T if N > 1, otherwise a T.

Member Function Documentation

◆ acceleration()

template<typename T, index_t N, CubicSplineObject< T, N > S, typename Derived>
VecType< T, N > acceleration ( T s) const
inline

Evaluate the second derivative of the path at s, with respect to s.

The range of s is the same as for operator().

◆ bounds()

template<typename T, index_t N, CubicSplineObject< T, N > S, typename Derived>
Rect< T, N > bounds ( ) const
inline

Compute the axis-aligned bounding box of the path.

O(n) on the number of segments.

◆ operator()()

template<typename T, index_t N, CubicSplineObject< T, N > S, typename Derived>
VecType< T, N > operator() ( T s) const
inline

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.

◆ segment()

template<typename T, index_t N, CubicSplineObject< T, N > S, typename Derived>
std::optional< size_t > segment ( T s) const
inline

Return the index of the segment containing s.

If there are no complete segments in the path, return std::nullopt.

◆ velocity()

template<typename T, index_t N, CubicSplineObject< T, N > S, typename Derived>
VecType< T, N > velocity ( T s) const
inline

Evaluate the derivative of the path at s, with respect to s.

The range of s is the same as for operator().


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