Class CurveCreator

java.lang.Object
toxi.geom.nurbs.CurveCreator

public class CurveCreator extends Object
Convenience class to create dynamically NurbsCurves.
Version:
1.0
Author:
sg
  • 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

      public NurbsCurve addControlPoint(Vec3D cp)
      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

      public NurbsCurve addControlPoint(Vec4D cp)
      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

      public NurbsCurve 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).