Package toxi.geom.nurbs
Class CurveCreator
java.lang.Object
toxi.geom.nurbs.CurveCreator
Convenience class to create dynamically NurbsCurves.
- Version:
- 1.0
- Author:
- sg
-
Constructor Summary
ConstructorsConstructorDescriptionCurveCreator(int degree) Create a new CurveCretor object which can create Curves from the given degree -
Method Summary
Modifier and TypeMethodDescriptionaddControlPoint(Vec3D cp) Add a normal Point as ControlPoint to the CurveCreator.addControlPoint(Vec4D cp) Add a new Controlpoint to the current CurveCreator.getCurve()Get the curve NurbsCurve of the CurveCreator
-
Constructor Details
-
CurveCreator
public CurveCreator(int degree) Create a new CurveCretor object which can create Curves from the given degree- Parameters:
degree- Degree the created NurbsCurve will have.
-
-
Method Details
-
addControlPoint
Add a normal Point as ControlPoint to the CurveCreator. The newly added Point has automatically the weight one.- Parameters:
cp- Controlpoint to add with weight one.- Returns:
- the actual NurbsCurve if any exists, or null otherwise (to less control for the given degree).
-
addControlPoint
Add a new Controlpoint to the current CurveCreator.- Parameters:
cp- ControlPoint to add.- Returns:
- the actual NurbsCurve if any exists, or null otherwise (to less control for the given degree).
-
getCurve
Get the curve NurbsCurve of the CurveCreator- Returns:
- the actual NurbsCurve if any exists, or null otherwise (to less control for the given degree).
-