|
VizKit
3.3.7
|
Nurbs (non-uniform rational b-spline) functionality. More...
#include <VisualNurbs.h>
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. | |
| VisualNurbs & | operator= (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. | |
| NurbsTexture * | nurbsTexture |
| The texture of the NURBS. | |
Nurbs (non-uniform rational b-spline) functionality.
| 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.
| sKnotsCount | The number of knots in horizontal direction. |
| sKnotsPointer | A pointer to the array of horizontal knot values. The knot values are copied. |
| tKnotsCount | The number of knots in vertical direction. |
| tKnotsPointer | A pointer to the array of vertical knot values. The knot values are copied. |
| s_Stride | Specifies the offset (as a number of single-precision floating point values) between successive control points in the parametric u direction in control. |
| t_Stride | Specifies the offset (as a number of single-precision floating point values) between successive control points in the parametric v direction in control. |
| s_Order | Specifies 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_Order | Specifies 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.
| VisualNurbs::VisualNurbs | ( | const VisualNurbs & | other | ) |
Copy constructor.
| other | Reference to another VisualNurbs. |
| void VisualNurbs::copy | ( | const VisualNurbs & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
| other | Another VisualNurbs. |
| void VisualNurbs::draw | ( | void | ) |
Draws the NURBS on screen.
| VisualNurbs & VisualNurbs::operator= | ( | const VisualNurbs & | other | ) |
Assignment operator.
| other | Reference to another VisualNurbs. |
| void VisualNurbs::setControlPoints | ( | uint16 | numberOfControlPoints, |
| double * | someControlPoints | ||
| ) |
Stores the control points of the NURBS.
| numberOfControlPoints | The number of control points. |
| someControlPoints | A pointer to an array of control points. The control points are copied. |
| void VisualNurbs::setControlPointsVisibility | ( | Visibility | visibility | ) |
Stores whether the control points of the NURBS should be drawn with the NURBS (or stay invisible).
| visibility | The requested visibility of the control points. |
| void VisualNurbs::setDisplayMode | ( | NurbsDisplayMode | requestedDisplayMode | ) |
Sets the display mode of the NURBS to filled or outlined polygon.
| requestedDisplayMode | The 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.
| samplingTolerance | The 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.
| sKnotsCount | The number of knots in horizontal direction. |
| sKnotsPointer | A pointer to the array of horizontal knot values. The knot values are copied. |
| tKnotsCount | The number of knots in vertical direction. |
| tKnotsPointer | A pointer to the array of vertical knot values. The knot values are copied. |
| s_Stride | Specifies the offset (as a number of single-precision floating point values) between successive control points in the parametric u direction in control. |
| t_Stride | Specifies the offset (as a number of single-precision floating point values) between successive control points in the parametric v direction in control. |
| s_Order | Specifies 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_Order | Specifies 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. |
| aTextureName | The name/number/id of the texture. |
| canUseRectExtensionBool | True 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.
| numberOfTextureControlPoints | The number of control points. |
| someTextureControlPoints | A pointer to an array of control points. The control points are copied. |
float* VizKit::VisualNurbs::controlPoints [private] |
An array of control points.
The visibility of the control points.
GLUnurbsObj* VizKit::VisualNurbs::nurbsObject [private] |
The NURBS object.
NurbsTexture* VizKit::VisualNurbs::nurbsTexture [private] |
The texture of the NURBS.
float* VizKit::VisualNurbs::sKnots [private] |
An array of horizontal knot values.
uint8 VizKit::VisualNurbs::sNumKnots [private] |
The number of knots in horizontal direction.
uint16 VizKit::VisualNurbs::sOrder [private] |
The order of the NURBS surface in u direction.
uint16 VizKit::VisualNurbs::sStride [private] |
The offset between successive control points in u direction.
float* VizKit::VisualNurbs::tKnots [private] |
An array of vertical knot values.
uint8 VizKit::VisualNurbs::tNumKnots [private] |
The number of knots in vertical direction.
uint16 VizKit::VisualNurbs::tOrder [private] |
The order of the NURBS surface in v direction.
uint16 VizKit::VisualNurbs::tStride [private] |
The offset between successive control points in v direction.