org.kabeja.math
Class NURBS

java.lang.Object
  extended by org.kabeja.math.NURBS

public class NURBS
extends java.lang.Object


Field Summary
protected  boolean closed
           
protected  Point[] controlPoints
           
protected  int degree
           
protected  double[] knots
           
protected  double[] weights
           
 
Constructor Summary
NURBS(Point[] controlPoints, double[] knots, double[] weights, int degree)
           
 
Method Summary
 int findSpawnIndex(double u)
           
 double[] getBasicFunctions(int i, double u)
           
 Point[] getControlPoints()
           
 int getDegree()
           
 double[] getKnots()
           
 Point getPointAt(double u)
           
 Point getPointAt(int i, double u)
           
 double[] getWeights()
           
 boolean isClosed()
           
 void setClosed(boolean closed)
           
 void setControlPoints(Point[] controlPoints)
           
 void setDegree(int degree)
           
 void setKnots(double[] knots)
           
 void setWeights(double[] weights)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controlPoints

protected Point[] controlPoints

knots

protected double[] knots

weights

protected double[] weights

degree

protected int degree

closed

protected boolean closed
Constructor Detail

NURBS

public NURBS(Point[] controlPoints,
             double[] knots,
             double[] weights,
             int degree)
Method Detail

getBasicFunctions

public double[] getBasicFunctions(int i,
                                  double u)

getPointAt

public Point getPointAt(int i,
                        double u)

getPointAt

public Point getPointAt(double u)

findSpawnIndex

public int findSpawnIndex(double u)

getControlPoints

public Point[] getControlPoints()

setControlPoints

public void setControlPoints(Point[] controlPoints)

getKnots

public double[] getKnots()

setKnots

public void setKnots(double[] knots)

getWeights

public double[] getWeights()

setWeights

public void setWeights(double[] weights)

getDegree

public int getDegree()

setDegree

public void setDegree(int degree)

isClosed

public boolean isClosed()

setClosed

public void setClosed(boolean closed)