com.jogamp.opengl.impl.glu.gl2.nurbs
Class GLUgl2nurbsImpl

java.lang.Object
  extended by com.jogamp.opengl.impl.glu.gl2.nurbs.GLUgl2nurbsImpl
All Implemented Interfaces:
GLUnurbs

public class GLUgl2nurbsImpl
extends Object
implements GLUnurbs

Base object for working with NURBS curves and surfaces

Author:
Tomas Hrasky

Field Summary
static int CT_NONE
          Curve type - no type
static int CT_NPWLCURVE
          Curve type - picewise linear curve
static int CT_NURBSCURVE
          Curve type - NURBS curve
 
Constructor Summary
GLUgl2nurbsImpl()
          Initializes default GLUgl2nurbs object
 
Method Summary
 void bgncurve()
          Begins new NURBS curve
 void bgnsurface()
          Begin new surface
 void defineMap(int type, int rational, int ncoords)
          Define a map of given properties
 void do_bgncurve(O_curve o_curve)
          Begins a NURBS curve
 void do_bgnsurface(O_surface o_surface)
          Begins new surface
 boolean do_check_knots(Knotvector knots, String msg)
          Check knot vector specification
 void do_endcurve()
          Ends a curve
 void do_endsurface()
          Ends surface
 void do_nurbscurve(O_nurbscurve o_nurbscurve)
          Draw a curve
 void do_nurbssurface(O_nurbssurface o_nurbssurface)
          Draw NURBS surface
 void do_setnurbsproperty(Property prop)
          Set given property to rendering hints
 void do_setnurbsproperty2(Property prop)
          Set parameters of existing property
 void endcurve()
          End a curve
 void endsurface()
          End current surface
 void nurbscurve(int nknots, float[] knot, int stride, float[] ctlarray, int order, int realType)
          Make a NURBS curve
 void nurbssurface(int sknot_count, float[] sknot, int tknot_count, float[] tknot, int s_stride, int t_stride, float[] ctlarray, int sorder, int torder, int type)
          Make NURBS surface
 void redefineMaps()
          (Re)Inicialize maps
 void set_is_domain_distance_sampling(int i)
          Sets wheteher we use domain distance sampling
 void setnurbsproperty(int type, int tag, float value)
          Set NURBS property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CT_NONE

public static final int CT_NONE
Curve type - no type

See Also:
Constant Field Values

CT_NURBSCURVE

public static final int CT_NURBSCURVE
Curve type - NURBS curve

See Also:
Constant Field Values

CT_NPWLCURVE

public static final int CT_NPWLCURVE
Curve type - picewise linear curve

See Also:
Constant Field Values
Constructor Detail

GLUgl2nurbsImpl

public GLUgl2nurbsImpl()
Initializes default GLUgl2nurbs object

Method Detail

bgncurve

public void bgncurve()
Begins new NURBS curve


do_bgncurve

public void do_bgncurve(O_curve o_curve)
Begins a NURBS curve

Parameters:
o_curve - curve object

do_bgnsurface

public void do_bgnsurface(O_surface o_surface)
Begins new surface

Parameters:
o_surface - surface object

endcurve

public void endcurve()
End a curve


do_endsurface

public void do_endsurface()
Ends surface


do_endcurve

public void do_endcurve()
Ends a curve


nurbscurve

public void nurbscurve(int nknots,
                       float[] knot,
                       int stride,
                       float[] ctlarray,
                       int order,
                       int realType)
Make a NURBS curve

Parameters:
nknots - number of knots in knot vector
knot - knot vector
stride - number of control points coordinates
ctlarray - control points
order - order of the curve
realType - type of the curve

do_check_knots

public boolean do_check_knots(Knotvector knots,
                              String msg)
Check knot vector specification

Parameters:
knots - knot vector
msg - error message
Returns:
knot vector is / is not valid

do_nurbscurve

public void do_nurbscurve(O_nurbscurve o_nurbscurve)
Draw a curve

Parameters:
o_nurbscurve - NURBS curve object

do_nurbssurface

public void do_nurbssurface(O_nurbssurface o_nurbssurface)
Draw NURBS surface

Parameters:
o_nurbssurface - NURBS surface object

redefineMaps

public void redefineMaps()
(Re)Inicialize maps


defineMap

public void defineMap(int type,
                      int rational,
                      int ncoords)
Define a map of given properties

Parameters:
type - map type
rational - is rational
ncoords - number of control point coordinates

setnurbsproperty

public void setnurbsproperty(int type,
                             int tag,
                             float value)
Set NURBS property

Parameters:
type - property type
tag - property tag
value - property value

do_setnurbsproperty2

public void do_setnurbsproperty2(Property prop)
Set parameters of existing property

Parameters:
prop - property

do_setnurbsproperty

public void do_setnurbsproperty(Property prop)
Set given property to rendering hints

Parameters:
prop - property to be set

set_is_domain_distance_sampling

public void set_is_domain_distance_sampling(int i)
Sets wheteher we use domain distance sampling

Parameters:
i - domain distance sampling flag

bgnsurface

public void bgnsurface()
Begin new surface


endsurface

public void endsurface()
End current surface


nurbssurface

public void nurbssurface(int sknot_count,
                         float[] sknot,
                         int tknot_count,
                         float[] tknot,
                         int s_stride,
                         int t_stride,
                         float[] ctlarray,
                         int sorder,
                         int torder,
                         int type)
Make NURBS surface

Parameters:
sknot_count - number of knots in s direction
sknot - knot vector in s direction
tknot_count - number of knots in t direction
tknot - knot vector in t direction
s_stride - number of coords of control points in s direction
t_stride - number of coords of control points in t direction
ctlarray - control points
sorder - order of curve in s direction
torder - order of curve in t direction
type - NURBS surface type (rational,...)


Copyright 2010 JogAmp Community.