Functions | |
void | Edit_Polygon (HC_KEY key, int offset, int ndelete, int insert, const HC_POINT *points) |
void | DEdit_Polygon (HC_KEY key, int offset, int delete, int insert, const HCD_POINT *points) |
Adjusts the boundary of a previously declared polygon.
key | - The unique identifier returned by a previous call to Insert_Polygon() . |
offset | - Number of the point in the original polygon definition just before which to start 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. (A simple N x 3 array may also be used.) Passed by reference always. |
Edit_Polygon() lets you modify a polygon with a long boundary as it sits in the database. You don't have to delete and reinsert it from scratch.
Edit_Polygon() changes the originally specified points vector (see Insert_Polygon() ), starting at offset in the vector. First ndelete points are removed, then insert points, obtained from the points vector, are inserted.
If you delete point #1 and point #2 from a polygon, the next time around the point that was "#3" will now be #1. Insertion works in a similar manner.
If you work in 3-D, make sure all the points are still coplanar. The system does not check for this and displayed pictures might be strange.
If you originally specified a last point your first point, the first point is considered redundant and trimmed off.
Before HOOPS version 2.0, the offset of the first point was (incorrectly) one, not zero.
void DEdit_Polygon | ( | HC_KEY | key, |
int | offset, | ||
int | delete, | ||
int | insert, | ||
const HCD_POINT * | points | ||
) |
Similar to Edit_Polygon() 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 unique identifier returned by a previous call to DInsert_Polygon() . |
offset | - Number of the point in the original polygon definition just before which to start editing. "0" is the first. If specified as "-1", editing starts after the last position. |
delete | - Number of points to delete. |
insert | - The number of points contained in points. |
points | - Vector of x-y-z triplets to insert. (A simple N x 3 array may also be used.) Passed by reference always. |
No additional details. See Edit_Polygon().