Package toxi.geom.nurbs
Interface NurbsCurve
- All Known Implementing Classes:
BasicNurbsCurve
public interface NurbsCurve
Interface for Nurbs Curves
- Version:
- 1.0
- Author:
- sg
-
Method Summary
Modifier and TypeMethodDescriptionVec4D[][]
curveDerivCpts
(int d, int r1, int r2) Computes control points of dth derivative
Piegel, L.Vec3D[]
derivativesOnCurve
(float u, int d) Vec3D[]
derivativesOnCurve
(float u, int d, Vec3D[] ders) Vec4D[]
Get the ControlPoints of this curveint
Get the Degree of the curvefloat[]
getKnots()
Gets the Knot values of the Nurbs curvepointOnCurve
(float u) Calculate point on surface for the given u valuepointOnCurve
(float u, Vec3D out) Calculate point on surface for the given u valuetoPolygon2D
(int res)
-
Method Details
-
curveDerivCpts
Computes control points of dth derivative
Piegel, L. The Nurbs Book
Algorithm A3.3 -> Page 98
- Parameters:
d
- - dth derivativer1
- - from control point (0 for all control points)r2
- - to control point (n for all control points)- Returns:
- Vec4D[k][i] kth derivative, ith control point
-
derivativesOnCurve
-
derivativesOnCurve
-
getControlPoints
Vec4D[] getControlPoints()Get the ControlPoints of this curve- Returns:
- the ordered ControlPoints
-
getDegree
int getDegree()Get the Degree of the curve- Returns:
- degree of curve
-
getKnots
float[] getKnots()Gets the Knot values of the Nurbs curve- Returns:
- knot values
-
getKnotVector
KnotVector getKnotVector() -
pointOnCurve
Calculate point on surface for the given u value- Parameters:
u
- value to calculate point of- Returns:
- calculated Point
-
pointOnCurve
Calculate point on surface for the given u value- Parameters:
u
- value to calculate point ofout
- Point to place result in
-
toPolygon2D
-