Functions | |
void | Edit_NURBS_Curve (HC_KEY key, int cp_offset, int knot_offset, int cp_count, int knot_count, const HC_POINT *control_points, const float *weights, const float *knots) |
void | DEdit_NURBS_Curve (HC_KEY key, int cp_offset, int knot_offset, int cp_count, int knot_count, const HCD_POINT *control_points, const double *weights, const double *knots) |
void Edit_NURBS_Curve | ( | HC_KEY | key, |
int | cp_offset, | ||
int | knot_offset, | ||
int | cp_count, | ||
int | knot_count, | ||
const HC_POINT * | control_points, | ||
const float * | weights, | ||
const float * | knots | ||
) |
Modifies the control points, weights, and/or knots of a previously-inserted NURBS curve.
key | - The numeric identifier returned by a previous call to Insert_NURBS_Curve() . |
cp_offset | - Index of the control point and/or weight in the original NURBS curve definition at which to begin editing (indices start at 0). |
knot_offset | - Index of the knot in the original NURBS curve definition at which to begin editing. |
cp_count | - The number of control points and/or weights to replace. |
knot_count | - The number of knots to replace. |
control_points | - Vector of x-y-z triplets. (A simple N x 3 array may also be used. Passed by reference always. Can be NULL if not interested) |
weights | - Control point weights. Passed by reference always. Can be NULL if not interested. |
knots | - Knot sequence. Passed by reference always. Can be NULL if not interested. |
Edit_NURBS_Curve() lets you modify a NURBS curve as it sits in the database. In many circumstances, this function allows you to avoid deleting and reinserting the NURBS curve from scratch.
Edit_NURBS_Curve() replaces entries in the originally specified control_points, weights and/or knots (see Insert_NURBS_Curve()), starting at cp_offset for the control points and weights, and knot_offset for the knots. To retain the curve's original values, simply pass NULL for that parameter.
cp_offset + cp_count must be less than the number of control points in the curve. knot_offset + knot_count must be less than the number of knots points in the curve (control points + order).
The system ignores the control_points and weights parameter if cp_count is equal to zero, and ignores the knots parameter if knot_count is equal to zero.
This function replaces, but does not add, values in the control point, weight and knot arrays. In other words, this function does not provide an interface to change the curve degree, control point count, or knot count. If any of those values need to be changed, the curve must be deleted and reinserted.
void DEdit_NURBS_Curve | ( | HC_KEY | key, |
int | cp_offset, | ||
int | knot_offset, | ||
int | cp_count, | ||
int | knot_count, | ||
const HCD_POINT * | control_points, | ||
const double * | weights, | ||
const double * | knots | ||
) |
Similar to Edit_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.
key | - The numeric identifier returned by a previous call to Insert_NURBS_Curve() . |
cp_offset | - Index of the control point and/or weight in the original NURBS curve definition at which to begin editing (indices start at 0). |
knot_offset | - Index of the knot in the original NURBS curve definition at which to begin editing. |
cp_count | - The number of control points and/or weights to replace. |
knot_count | - The number of knots to replace. |
control_points | - Vector of x-y-z triplets. (A simple N x 3 array may also be used. Passed by reference always. Can be NULL if not interested) |
weights | - Control point weights. Passed by reference always. Can be NULL if not interested. |
knots | - Knot sequence. Passed by reference always. Can be NULL if not interested. |
No additional details. See Edit_NURBS_Curve().