Functions | |
void | Insert_NURBS_Curve (int degree, int cpcount, const HC_POINT *control_points, const float *weights, const float *knots, double start_u, double end_u) |
HC_KEY | KInsert_NURBS_Curve (int degree, int cpcount, const HC_POINT *control_points, const float *weights, const float *knots, double start_u, double end_u) |
void | QInsert_NURBS_Curve (const char *segment, int degree, int cpcount, const HC_POINT *control_points, const float *weights, const float *knots, double start_u, double end_u) |
HC_KEY | QKInsert_NURBS_Curve (const char *segment, int degree, int cpcount, const HC_POINT *control_points, const float *weights, const float *knots, double start_u, double end_u) |
void | DInsert_NURBS_Curve (int degree, int cpcount, const HCD_POINT *control_points, const float *weights, const float *knots, double start_u, double end_u) |
HC_KEY | DKInsert_NURBS_Curve (int degree, int cpcount, const HCD_POINT *control_points, const double *weights, const double *knots, double start_u, double end_u) |
void | DQInsert_NURBS_Curve (const char *segment, int degree, int cpcount, const HCD_POINT *control_points, const double *weights, const double *knots, double start_u, double end_u) |
HC_KEY | DQKInsert_NURBS_Curve (const char *segment, int degree, int cpcount, const HCD_POINT *control_points, const double *weights, const double *knots, double start_u, double end_u) |
void Insert_NURBS_Curve | ( | int | degree, | |
int | cpcount, | |||
const HC_POINT * | control_points, | |||
const float * | weights, | |||
const float * | knots, | |||
double | start_u, | |||
double | end_u | |||
) |
Generates a Non-Uniform Rational B-Spline (NURBS) curve.
degree | - Degree of the curve. | |
cpcount | - Number of valid points in control_points. | |
control_points | - points. (A simple N x 3 array may also be used.) Passed by reference always. | |
weights | - Control point weights. | |
knots | - Knot sequence. | |
start_u | - Start parameter. | |
end_u | - End parameter. |
For drawing purposes, a NURBS curve is a polyline. Visibility and other drawing attributes can be set as usual on the segment.
The order of the curve determines the form of the parametric equations which define the curve, as well as how smooth the curve 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 curve, while the knot sequence defines how the control points afffect the curve. The weights control the influence of the control points.
The relationships among the NURBS 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 curve is nonrational). If NULL is passed in for knots, then all knots will have default values of "0,1,2,...,knot count" (the curve is uniform) .
start_u and end_u are used to make the start and end of the curve invisible.
start_u and end_u are in normalized parameter space, and must range from 0.0 to 1.0. start_u must be less than end_u.
The invisible parts of the curve are never selectable.
If there is an error the KInsert routine returns "-1".
In the current version of HOOPS, there are no options defined for NURBS curves and the options string is ignored.
HC_KEY KInsert_NURBS_Curve | ( | int | degree, | |
int | cpcount, | |||
const HC_POINT * | control_points, | |||
const float * | weights, | |||
const float * | knots, | |||
double | start_u, | |||
double | end_u | |||
) |
Similar to Insert_NURBS_Curve(), but returns an HC_KEY to the object.
degree | - Degree of the curve. | |
cpcount | - Number of valid points in control_points. | |
control_points | - points. (A simple N x 3 array may also be used.) Passed by reference always. | |
weights | - Control point weights. | |
knots | - Knot sequence. | |
start_u | - Start parameter. | |
end_u | - End parameter. |
void QInsert_NURBS_Curve | ( | const char * | segment, | |
int | degree, | |||
int | cpcount, | |||
const HC_POINT * | control_points, | |||
const float * | weights, | |||
const float * | knots, | |||
double | start_u, | |||
double | end_u | |||
) |
Similar to Insert_NURBS_Curve(), but operates on a given segment rather than the currently open one.
segment | - Segment(s) to be inserted into, if other than the currently open segment. | |
degree | - Degree of the curve. | |
cpcount | - Number of valid points in control_points. | |
control_points | - points. (A simple N x 3 array may also be used.) Passed by reference always. | |
weights | - Control point weights. | |
knots | - Knot sequence. | |
start_u | - Start parameter. | |
end_u | - End parameter. |
HC_KEY QKInsert_NURBS_Curve | ( | const char * | segment, | |
int | degree, | |||
int | cpcount, | |||
const HC_POINT * | control_points, | |||
const float * | weights, | |||
const float * | knots, | |||
double | start_u, | |||
double | end_u | |||
) |
Similar to Insert_NURBS_Curve(), but operates on a given segment and returns an HC_KEY to the object.
segment | - Segment(s) to be inserted into, if other than the currently open segment. | |
degree | - Degree of the curve. | |
cpcount | - Number of valid points in control_points. | |
control_points | - points. (A simple N x 3 array may also be used.) Passed by reference always. | |
weights | - Control point weights. | |
knots | - Knot sequence. | |
start_u | - Start parameter. | |
end_u | - End parameter. |
void DInsert_NURBS_Curve | ( | int | degree, | |
int | cpcount, | |||
const HCD_POINT * | control_points, | |||
const float * | weights, | |||
const float * | knots, | |||
double | start_u, | |||
double | end_u | |||
) |
Similar to Insert_NURBS_Curve() but accepts and/or returns double precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.
degree | - Degree of the curve. | |
cpcount | - Number of valid points in control_points. | |
control_points | - points. (A simple N x 3 array may also be used.) Passed by reference always. | |
weights | - Control point weights. | |
knots | - Knot sequence. | |
start_u | - Start parameter. | |
end_u | - End parameter. |
HC_KEY DKInsert_NURBS_Curve | ( | int | degree, | |
int | cpcount, | |||
const HCD_POINT * | control_points, | |||
const double * | weights, | |||
const double * | knots, | |||
double | start_u, | |||
double | end_u | |||
) |
Similar to DInsert_NURBS_Curve(), but returns an HC_KEY to the object.
degree | - Degree of the curve. | |
cpcount | - Number of valid points in control_points. | |
control_points | - points. (A simple N x 3 array may also be used.) Passed by reference always. | |
weights | - Control point weights. | |
knots | - Knot sequence. | |
start_u | - Start parameter. | |
end_u | - End parameter. |
void DQInsert_NURBS_Curve | ( | const char * | segment, | |
int | degree, | |||
int | cpcount, | |||
const HCD_POINT * | control_points, | |||
const double * | weights, | |||
const double * | knots, | |||
double | start_u, | |||
double | end_u | |||
) |
Similar to DInsert_NURBS_Curve(), but operates on a given segment rather than the currently open one.
segment | - Segment(s) to be inserted into, if other than the currently open segment. | |
degree | - Degree of the curve. | |
cpcount | - Number of valid points in control_points. | |
control_points | - points. (A simple N x 3 array may also be used.) Passed by reference always. | |
weights | - Control point weights. | |
knots | - Knot sequence. | |
start_u | - Start parameter. | |
end_u | - End parameter. |
HC_KEY DQKInsert_NURBS_Curve | ( | const char * | segment, | |
int | degree, | |||
int | cpcount, | |||
const HCD_POINT * | control_points, | |||
const double * | weights, | |||
const double * | knots, | |||
double | start_u, | |||
double | end_u | |||
) |
Similar to DInsert_NURBS_Curve(), but operates on a given segment and returns an HC_KEY to the object.
segment | - Segment(s) to be inserted into, if other than the currently open segment. | |
degree | - Degree of the curve. | |
cpcount | - Number of valid points in control_points. | |
control_points | - points. (A simple N x 3 array may also be used.) Passed by reference always. | |
weights | - Control point weights. | |
knots | - Knot sequence. | |
start_u | - Start parameter. | |
end_u | - End parameter. |