Brief Index      Full Index      Events Index      I.M. Reference

Edit_NURBS_Curve

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)

Function Documentation

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.

Parameters:
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.

DETAILS

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.

NOTES

RESTRICTIONS

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.

See also:
Insert_NURBS_Curve, Show_NURBS_Curve, Delete_By_Key, Flush_Contents, Flush_By_Key.
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.

Parameters:
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.

DETAILS

No additional details. See Edit_NURBS_Curve().

Brief Index      Full Index      Events Index      I.M. Reference