Functions | |
HC_KEY | Insert_NURBS_Surface (int u_degree, int v_degree, int u_count, int v_count, const HC_POINT *points, const float *weights, const float *u_knots, const float *v_knots) |
HC_KEY | DInsert_NURBS_Surface (int u_degree, int v_degree, int u_count, int v_count, const HCD_POINT *points, const double *weights, const double *u_knots, const double *v_knots) |
HC_KEY Insert_NURBS_Surface | ( | int | u_degree, |
int | v_degree, | ||
int | u_count, | ||
int | v_count, | ||
const HC_POINT * | points, | ||
const float * | weights, | ||
const float * | u_knots, | ||
const float * | v_knots | ||
) |
Generates a Non-Uniform Rational B-Spline (NURBS) surface.
u_degree | - Degree of the surface in the u direction. |
v_degree | - Degree of the surface in the v direction |
u_count | - Number of valid control points in the u direction |
v_count | - Number of valid control points in the v direction |
points | - Vector of x-y-z triplets for the coordinates of the control points. (A simple N x 3 array may also be used.) Passed by reference always. |
weights | - Control point weights. |
u_knots | - Knot sequence in the u direction |
v_knots | - Knot sequence in the v direction |
A NURBS surface is a parametric HOOPS primitive, i.e., it's goemetric properties are determined by a set of mathematical functions.
For drawing purposes, a NURBS surface is like a shell or mesh. Visibility and other drawing attributes can be set as usual on the segment.
The order of the surface determines the form of the parametric equations which define the surface, as well as how smooth the surface can be. The order is equal to 1 plus the maximum exponent (degree) of the variables in the parametric equations. The control points are points in object space that affect the shape of the surface, while the knot sequence defines how the control points afffect the surface. The weights control the influence of the control points.
The relationships among the NURBS surface parameters are as follows:
Knot values must be nondecreasing, and all weights should be nonnegative.
If NULL is passed in for weights, weights will be given a default value of 1.0 (the surface is nonrational). If NULL is passed in for knots, than and knots will have default values of "0,1,2,...,knot count" (the surface is uniform).
If there is an error the Insert routine returns "-1".
Tolerance settings to control the way that NURBS surfaces are tessellated are available in Set_Rendering_Options() . To get the tessellated represesentation in the form of a shell, open the surface with Open_Geometry() and use Show_Shell() (Show_Shell's "key" is ignored when the currently open item is a NURBS surface). If Show_Shell is called in this manner before the surface is ever shown as part of an update, however, it will use default tolerances to tessellate the surface rather than what would normally be inherited along the path from the driver at draw time.
HC_KEY DInsert_NURBS_Surface | ( | int | u_degree, |
int | v_degree, | ||
int | u_count, | ||
int | v_count, | ||
const HCD_POINT * | points, | ||
const double * | weights, | ||
const double * | u_knots, | ||
const double * | v_knots | ||
) |
Similar to Insert_NURBS_Surface() but accepts double-precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.
u_degree | - Degree of the surface in the u direction. |
v_degree | - Degree of the surface in the v direction |
u_count | - Number of valid control points in the u direction |
v_count | - Number of valid control points in the v direction |
points | - Vector of x-y-z triplets for the coordinates of the control points. (A simple N x 3 array may also be used.) Passed by reference always. |
weights | - Control point weights. |
u_knots | - Knot sequence in the u direction |
v_knots | - Knot sequence in the v direction |
No additional details. See Insert_NURBS_Surface().