TinySpline  0.7.0
Spline Library for a Multitude of Programming Languages
Public Attributes | List of all members
tsBSpline Struct Reference

#include <tinyspline.h>

Public Attributes

struct tsBSplineImplpImpl
 

Detailed Description

Represents a B-Spline, which may also be used for NURBS, Bezier curves, lines, and points. NURBS use homogeneous coordinates to store their control points (i.e. the last component of a control point stores the weight). Bezier curves are B-Splines with 'num_control_points == order' and a clamped knot vector, which lets them pass through their first and last control point (a property which does not necessarily apply to B-Splines and NURBS). Lines and points, on that basis, are Bezier curves of degree 1 (lines) and 0 (points).

Two dimensional control points are stored as follows:

[x_0, y_0, x_1, y_1, ..., x_n-1, y_n-1]

Tree dimensional control points are stored as follows:

[x_0, y_0, z_0, x_1, y_1, z_1, ..., x_n-1, y_n-1, z_n-1]

... and so on. As already mentioned, NURBS use homogeneous coordinates to store their control points. For example, a NURBS in 2D stores its control points as follows:

[x_0*w_0, y_0*w_0, w_0, x_1*w_1, y_1*w_1, w_1, ...]

where 'w_i' is the weight of the i'th control point.

Member Data Documentation

◆ pImpl

struct tsBSplineImpl* tsBSpline::pImpl

The actual implementation.


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