VizKit  3.3.7
Classes | Public Member Functions | Private Member Functions | Private Attributes
VizKit::VisualNurbs Class Reference

Nurbs (non-uniform rational b-spline) functionality. More...

#include <VisualNurbs.h>

List of all members.

Classes

class  NurbsTexture
 A texture of a NURBS. More...

Public Member Functions

 VisualNurbs (uint8 sKnotsCount, float *sKnotsPointer, uint8 tKnotsCount, float *tKnotsPointer, uint16 s_Stride, uint16 t_Stride, uint16 s_Order, uint16 t_Order)
 The constructor with all necessary arguments to create a NURBS.
 ~VisualNurbs ()
 The destructor.
 VisualNurbs (const VisualNurbs &other)
 Copy constructor.
VisualNurbsoperator= (const VisualNurbs &other)
 Assignment operator.
void setControlPoints (uint16 numberOfControlPoints, double *someControlPoints)
 Stores the control points of the NURBS.
void setTexture (uint8 sKnotsCount, float *sKnotsPointer, uint8 tKnotsCount, float *tKnotsPointer, uint16 s_Stride, uint16 t_Stride, uint16 s_Order, uint16 t_Order, uint32 aTextureName, bool canUseRectExtensionBool)
 Associates the NURBS with a texture.
void setTextureControlPoints (uint16 numberOfTextureControlPoints, float *someTextureControlPoints)
 Stores the control points of the texture.
void draw (void)
 Draws the NURBS on screen.
void setDisplayMode (NurbsDisplayMode requestedDisplayMode)
 Sets the display mode of the NURBS to filled or outlined polygon.
void setSamplingTolerance (double samplingTolerance)
 Sets the sampling tolerance of the NURBS.
void setControlPointsVisibility (Visibility visibility)
 Stores whether the control points of the NURBS should be drawn with the NURBS (or stay invisible).

Private Member Functions

void copy (const VisualNurbs &other)
 Copy method for assignment operator and copy constructor.
void setNurbsProperty (uint32 property, float value)
 Sets an OpenGL attribute of the NURBS object.

Private Attributes

GLUnurbsObj * nurbsObject
 The NURBS object.
uint8 sNumKnots
 The number of knots in horizontal direction.
float * sKnots
 An array of horizontal knot values.
uint8 tNumKnots
 The number of knots in vertical direction.
float * tKnots
 An array of vertical knot values.
uint16 sStride
 The offset between successive control points in u direction.
uint16 tStride
 The offset between successive control points in v direction.
uint16 sOrder
 The order of the NURBS surface in u direction.
uint16 tOrder
 The order of the NURBS surface in v direction.
float * controlPoints
 An array of control points.
Visibility controlPointsVisibility
 The visibility of the control points.
NurbsTexturenurbsTexture
 The texture of the NURBS.

Detailed Description

Nurbs (non-uniform rational b-spline) functionality.


Constructor & Destructor Documentation

VisualNurbs::VisualNurbs ( uint8  sKnotsCount,
float *  sKnotsPointer,
uint8  tKnotsCount,
float *  tKnotsPointer,
uint16  s_Stride,
uint16  t_Stride,
uint16  s_Order,
uint16  t_Order 
)

The constructor with all necessary arguments to create a NURBS.

Parameters:
sKnotsCountThe number of knots in horizontal direction.
sKnotsPointerA pointer to the array of horizontal knot values. The knot values are copied.
tKnotsCountThe number of knots in vertical direction.
tKnotsPointerA pointer to the array of vertical knot values. The knot values are copied.
s_StrideSpecifies the offset (as a number of single-precision floating point values) between successive control points in the parametric u direction in control.
t_StrideSpecifies the offset (as a number of single-precision floating point values) between successive control points in the parametric v direction in control.
s_OrderSpecifies the order of the NURBS surface in the parametric u direction. The order is one more than the degree, hence a surface that is cubic in u has a u order of 4.
t_OrderSpecifies the order of the NURBS surface in the parametric v direction. The order is one more than the degree, hence a surface that is cubic in v has a v order of 4.

The destructor.

Copy constructor.

Parameters:
otherReference to another VisualNurbs.

Member Function Documentation

void VisualNurbs::copy ( const VisualNurbs other) [private]

Copy method for assignment operator and copy constructor.

Parameters:
otherAnother VisualNurbs.
void VisualNurbs::draw ( void  )

Draws the NURBS on screen.

VisualNurbs & VisualNurbs::operator= ( const VisualNurbs other)

Assignment operator.

Parameters:
otherReference to another VisualNurbs.
void VisualNurbs::setControlPoints ( uint16  numberOfControlPoints,
double *  someControlPoints 
)

Stores the control points of the NURBS.

Parameters:
numberOfControlPointsThe number of control points.
someControlPointsA pointer to an array of control points. The control points are copied.

Stores whether the control points of the NURBS should be drawn with the NURBS (or stay invisible).

Parameters:
visibilityThe requested visibility of the control points.
void VisualNurbs::setDisplayMode ( NurbsDisplayMode  requestedDisplayMode)

Sets the display mode of the NURBS to filled or outlined polygon.

Parameters:
requestedDisplayModeThe requested display mode.
void VisualNurbs::setNurbsProperty ( uint32  property,
float  value 
) [private]

Sets an OpenGL attribute of the NURBS object.

void VisualNurbs::setSamplingTolerance ( double  samplingTolerance)

Sets the sampling tolerance of the NURBS.

Parameters:
samplingToleranceThe requested sampling tolerance.
void VisualNurbs::setTexture ( uint8  sKnotsCount,
float *  sKnotsPointer,
uint8  tKnotsCount,
float *  tKnotsPointer,
uint16  s_Stride,
uint16  t_Stride,
uint16  s_Order,
uint16  t_Order,
uint32  aTextureName,
bool  canUseRectExtensionBool 
)

Associates the NURBS with a texture.

Parameters:
sKnotsCountThe number of knots in horizontal direction.
sKnotsPointerA pointer to the array of horizontal knot values. The knot values are copied.
tKnotsCountThe number of knots in vertical direction.
tKnotsPointerA pointer to the array of vertical knot values. The knot values are copied.
s_StrideSpecifies the offset (as a number of single-precision floating point values) between successive control points in the parametric u direction in control.
t_StrideSpecifies the offset (as a number of single-precision floating point values) between successive control points in the parametric v direction in control.
s_OrderSpecifies the order of the NURBS surface in the parametric u direction. The order is one more than the degree, hence a surface that is cubic in u has a u order of 4.
t_OrderSpecifies the order of the NURBS surface in the parametric v direction. The order is one more than the degree, hence a surface that is cubic in v has a v order of 4.
aTextureNameThe name/number/id of the texture.
canUseRectExtensionBoolTrue if graphics system does support rectangular texture extension. False if only textures with power-of-2-dimensions are allowed.
void VisualNurbs::setTextureControlPoints ( uint16  numberOfTextureControlPoints,
float *  someTextureControlPoints 
)

Stores the control points of the texture.

Parameters:
numberOfTextureControlPointsThe number of control points.
someTextureControlPointsA pointer to an array of control points. The control points are copied.

Member Data Documentation

An array of control points.

The visibility of the control points.

GLUnurbsObj* VizKit::VisualNurbs::nurbsObject [private]

The NURBS object.

The texture of the NURBS.

float* VizKit::VisualNurbs::sKnots [private]

An array of horizontal knot values.

The number of knots in horizontal direction.

The order of the NURBS surface in u direction.

The offset between successive control points in u direction.

float* VizKit::VisualNurbs::tKnots [private]

An array of vertical knot values.

The number of knots in vertical direction.

The order of the NURBS surface in v direction.

The offset between successive control points in v direction.


The documentation for this class was generated from the following files:

Generated on Sun May 3 2015 20:26:32 for VizKit by doxygen 1.8.0