Class ControlNet

java.lang.Object
toxi.geom.nurbs.ControlNet

public class ControlNet extends Object
A ControlNet for a NurbsSurface
Version:
1.0
Author:
sg
  • Constructor Details

    • ControlNet

      public ControlNet(Vec4D[][] cpnet) throws IllegalArgumentException
      Create a ControlNet from the given points the two dimensional array must be a Matrix else an IllegalArgumentException is thrown.
      Parameters:
      cpnet - "Matrix" of ControlPoints
      Throws:
      IllegalArgumentException
  • Method Details

    • center

      public void center(ReadonlyVec3D origin)
    • computeCentroid

      public Vec3D computeCentroid()
    • get

      public Vec4D get(int u, int v)
      Get the ControlPoint at the position u,v
      Parameters:
      u - index in u direction
      v - index in v direction
      Returns:
      The by u and v indexed ControlPoint
    • getControlPoints

      public Vec4D[][] getControlPoints()
      Get all the control points
      Returns:
      2D array
    • set

      public void set(int u, int v, Vec4D cp)
      Set the ControlPoint at the position u,v
      Parameters:
      u - index in u direction
      v - index in v direction
      cp - ControlPoint to set at the indexed position
    • uLength

      public int uLength()
      Get number of ControlPoints in u direction
      Returns:
      number of ControlPoints in u direction
    • vLength

      public int vLength()
      Get number of ControlPoints in v direction
      Returns:
      number of ControlPoints in v direction