Top Description Fields Constructors Methods
jogamp.opengl.glu.nurbs

public Class Knotvector

extends Object
Class Inheritance

Knot vector used in curve specification
Author
Tomas Hrasky

Field Summary

Modifier and TypeField and Description
pack-priv int
knotcount

Number of knots

pack-priv float[]
knotlist

Knots

private static final int
MAXORDER

Maximum curve order

pack-priv int
order

Curve order

pack-priv int
stride

Number of control points' coordinates

public static final float
TOLERANCE

Tolerance used when comparing knots - when difference is smaller, knots are considered equal

Constructor Summary

AccessConstructor and Description
public
Knotvector(final int
number of knots
nknots
,
final int
number of ctrl points' corrdinates
stride
,
final int
curve order
order
,
final float[]
knots
knot
)

Makes new knotvector

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

knots are/are not equal
identical
(final float
first knot
a
,
final float
second knot
b
)

Compares two knots for equality

public void
init(final int
number of knots
nknots
,
final int
number of ctrl points' corrdinates
stride
,
final int
curve order
order
,
final float[]
knots
knot
)

Initializes knotvector

public void
show(final String
message to be shown
msg
)

Show specified message

public int

Returns:

knot vector validity
validate
()

Validates knot vector parameters

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

knotcountback to summary
pack-priv int knotcount

Number of knots

knotlistback to summary
pack-priv float[] knotlist

Knots

MAXORDERback to summary
private static final int MAXORDER

Maximum curve order

orderback to summary
pack-priv int order

Curve order

strideback to summary
pack-priv int stride

Number of control points' coordinates

TOLERANCEback to summary
public static final float TOLERANCE

Tolerance used when comparing knots - when difference is smaller, knots are considered equal

Constructor Detail

Knotvectorback to summary
public Knotvector(final int nknots, final int stride, final int order, final float[] knot)

Makes new knotvector

Parameters
nknots:int

number of knots

stride:int

number of ctrl points' corrdinates

order:int

curve order

knot:float[]

knots

Method Detail

identicalback to summary
public static boolean identical(final float a, final float b)

Compares two knots for equality

Parameters
a:float

first knot

b:float

second knot

Returns:boolean

knots are/are not equal

initback to summary
public void init(final int nknots, final int stride, final int order, final float[] knot)

Initializes knotvector

Parameters
nknots:int

number of knots

stride:int

number of ctrl points' corrdinates

order:int

curve order

knot:float[]

knots

showback to summary
public void show(final String msg)

Show specified message

Parameters
msg:String

message to be shown

validateback to summary
public int validate()

Validates knot vector parameters

Returns:int

knot vector validity