Functions | |
void | Edit_Polyline (HC_KEY key, int offset, int ndelete, int insert, const HC_POINT *points) |
void | DEdit_Polyline (HC_KEY key, int offset, int ndelete, int insert, const HCD_POINT *points) |
void Edit_Polyline | ( | HC_KEY | key, | |
int | offset, | |||
int | ndelete, | |||
int | insert, | |||
const HC_POINT * | points | |||
) |
Adjusts the contents of a previously declared polyline.
key | - The numeric identifier returned by a previous call to Insert_Polyline() . | |
offset | - Entry number in original polyline definition just before which to begin editing. "0" is the first. If specified as "-1", editing starts after the last position. | |
ndelete | - Number of points to delete. | |
insert | - The number of points contained in points. | |
points | - Vector of x-y-z triplets to insert/append/prepend. (A simple N x 3 array may also be used.) Passed by reference always. |
Edit_Polyline() deletes, inserts, and replaces entries in the originally specified points vector (see Insert_Polyline() ), starting at offset. The ndelete is done first, then the insert. The effect of a "replace" operation can be gained by deleting the same number of points you're inserting.
The system ignores the points parameter if insert is equal to zero. In most languages, you still have to provide some sort of dummy array.
If the offset is specified as "-1", the "far end", any ndelete quantity is counted from the end of the list instead of the beginning.
If you insert or delete in the middle of the polyline, the offsets to points farther out on the polyline will be different next time.
Before HOOPS Version 2.0, the offset of the first point was (incorrectly) one, not zero.
NOTE
A polyline that was generated by inking can be edited similar to other polylines.
void DEdit_Polyline | ( | HC_KEY | key, | |
int | offset, | |||
int | ndelete, | |||
int | insert, | |||
const HCD_POINT * | points | |||
) |
Similar to Edit_Polyline(), but accepts double-precision values.
key | - The numeric identifier returned by a previous call to DInsert_Polyline() . | |
offset | - Entry number in original polyline definition just before which to begin editing. "0" is the first. If specified as "-1", editing starts after the last position. | |
ndelete | - Number of points to delete. | |
insert | - The number of points contained in points. | |
points | - Vector of x-y-z triplets to insert/append/prepend. (A simple N x 3 array may also be used.) Passed by reference always. |