TinySpline
Spline Library for a Multitude of Programming Languages
v0.3.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
tinyspline::BSpline Class Reference

Public Types

typedef tsBSplineType type
 

Public Member Functions

 BSpline (const BSpline &other)
 
 BSpline (size_t numControlPoints, size_t dimension=2, size_t degree=3, tinyspline::BSpline::type type=TS_CLAMPED)
 
BSplineoperator= (const BSpline &other)
 
DeBoorNet operator() (real u) const
 
size_t degree () const
 
size_t order () const
 
size_t dimension () const
 
std::vector< real > controlPoints () const
 
std_real_vector_out controlPointAt (size_t index) const
 
std::vector< real > knots () const
 
real knotAt (size_t index) const
 
tsBSplinedata ()
 
size_t numControlPoints () const
 
DeBoorNet eval (real u) const
 
std_real_vector_out evalAll (const std_real_vector_in us) const
 
std_real_vector_out sample (size_t num=0) const
 
DeBoorNet bisect (real value, real epsilon=TS_CONTROL_POINT_EPSILON, bool persnickety=false, size_t index=0, bool ascending=true, size_t maxIter=30) const
 
Domain domain () const
 
bool isClosed (real epsilon=TS_CONTROL_POINT_EPSILON) const
 
std::string toJson () const
 
void save (std::string path) const
 
void setControlPoints (const std::vector< real > &ctrlp)
 
void setControlPointAt (size_t index, const std_real_vector_in ctrlp)
 
void setKnots (const std::vector< real > &knots)
 
void setKnotAt (size_t index, real knot)
 
BSpline insertKnot (real u, size_t n) const
 
BSpline split (real u) const
 
BSpline tension (real tension) const
 
BSpline toBeziers () const
 
BSpline derive (size_t n=1, real epsilon=TS_CONTROL_POINT_EPSILON) const
 
std::string toString () const
 

Static Public Member Functions

static BSpline interpolateCubicNatural (const std_real_vector_in points, size_t dimension)
 
static BSpline interpolateCatmullRom (const std_real_vector_in points, size_t dimension, tsReal alpha=(tsReal) 0.5f, std::vector< tinyspline::real > *first=NULL, std::vector< tinyspline::real > *last=NULL, tsReal epsilon=TS_CONTROL_POINT_EPSILON)
 
static BSpline fromJson (std::string json)
 
static BSpline load (std::string path)
 

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