com.jogamp.opengl.impl.glu.nurbs
Class Knotvector

java.lang.Object
  extended by com.jogamp.opengl.impl.glu.nurbs.Knotvector

public class Knotvector
extends Object

Knot vector used in curve specification

Author:
Tomas Hrasky

Field Summary
static float TOLERANCE
          Tolerance used when comparing knots - when difference is smaller, knots are considered equal
 
Constructor Summary
Knotvector(int nknots, int stride, int order, float[] knot)
          Makes new knotvector
 
Method Summary
static boolean identical(float a, float b)
          Compares two knots for equality
 void init(int nknots, int stride, int order, float[] knot)
          Initializes knotvector
 void show(String msg)
          Show specified message
 int validate()
          Validates knot vector parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOLERANCE

public static final float TOLERANCE
Tolerance used when comparing knots - when difference is smaller, knots are considered equal

See Also:
Constant Field Values
Constructor Detail

Knotvector

public Knotvector(int nknots,
                  int stride,
                  int order,
                  float[] knot)
Makes new knotvector

Parameters:
nknots - number of knots
stride - number of ctrl points' corrdinates
order - curve order
knot - knots
Method Detail

init

public void init(int nknots,
                 int stride,
                 int order,
                 float[] knot)
Initializes knotvector

Parameters:
nknots - number of knots
stride - number of ctrl points' corrdinates
order - curve order
knot - knots

validate

public int validate()
Validates knot vector parameters

Returns:
knot vector validity

show

public void show(String msg)
Show specified message

Parameters:
msg - message to be shown

identical

public static boolean identical(float a,
                                float b)
Compares two knots for equality

Parameters:
a - first knot
b - second knot
Returns:
knots are/are not equal


Copyright 2010 JogAmp Community.