TinySpline
NURBS Library for a Multitude of Programming Languages
v0.3.0
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 are represented by homogeneous coordinates where the last component of a control point stores the weight of this control point. Bezier curves are B-Splines with 'num_control_points == order' and a clamped knot vector, therefore passing through their first and last control point (a property which does not necessarily apply to B-Splines and NURBS). If a Bezier curve consists of two control points only, we call it a line. Points, ultimately, are just very short lines consisting of a single control point.

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. NURBS are represented by homogeneous coordinates. For example, let's say we have a NURBS in 2D consisting of 11 control points where 'w_i' is the weight of the i'th control point. Then, the corresponding control points are stored as follows:

[x_0*w_0, y_0*w_0, w_0, x_1*w_1, y_1*w_1, w_1, ..., x_10*w_10, y_10*w_10, w_10]
+ Collaboration diagram for tsBSpline:

Member Data Documentation

◆ pImpl

struct tsBSplineImpl* tsBSpline::pImpl

The actual implementation.


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