Brief Index      Full Index      I.M. Reference

Insert_Polygon


Functions

void Insert_Polygon (int count, const HC_POINT *points)
HC_KEY KInsert_Polygon (int count, const HC_POINT *points)
void QInsert_Polygon (const char *segment, int count, const HC_POINT *points)
HC_KEY QKInsert_Polygon (const char *segment, int count, const HC_POINT *points)
void DInsert_Polygon (int count, const HCD_POINT *points)
HC_KEY DKInsert_Polygon (int count, const HCD_POINT *points)
void DQInsert_Polygon (const char *segment, int count, const HCD_POINT *points)
HC_KEY DQKInsert_Polygon (const char *segment, int count, const HCD_POINT *points)

Function Documentation

void Insert_Polygon ( int  count,
const HC_POINT *  points 
)

Generates a simple flat, infinitely thin, colored-in object.

Parameters:
count - Number of valid points in points.
points - Vector of x-y-z triplets for the coordinates along the edge of the Polygon. (A simple N x 3 array may also be used.) Passed by reference always.

DETAILS

A simple closed, flat, colored-in object with an angular edge is added to the current segment. (If you want a flat figure that looks as if it has a smooth edge, specify a lot of points.)

The depiction of the interior of the polygon can be adjusted with changes to Face Color and Face Pattern. The edges of polygons can be made distinct from the interiors through the use of Edge Color and Edge Pattern. The existence for drawing purposes of the interior and the edges can be controlled with face and edge Visibility.

It is not necessary to close the polygon explicitly by specifying a last point identical to the first. If you do close it, the system discards that last point (this is relevant to subsequent calls to Edit_Polygon() ).

Simple holes generated by the boundary crossing back and forth over itself are permissible. A point is within a hole and is not colored in if there are an even number of boundary edges lying in all directions from it. A point is in the interior. A point is to be colored if it has an odd number of boundaries surrounding it.

NOTES

If you only work in two dimensions, specify all the z coordinates as zero. The system takes note automatically.

If you insert a number of polygons in order to form a larger object, it might be more efficient to use Insert_Shell() or Insert_Mesh() instead.

If you work in 3-D, make sure all the points are coplanar. The system does not check for this---but displayed pictures might look strange.

There is no method implemented yet to obtain polygons with completely interior "doughnut" holes---but see faces-with-holes in Insert_Shell() .

If there is an error the KInsert routine returns a -1.

RESTRICTIONS

See also:
Insert_Shell, Insert_Mesh, Insert_Polyline, Insert_Circle, Insert_Ellipse, Set_Rendering_Options, Set_Visibility, Set_Face_Pattern, Set_Edge_Pattern, Set_Edge_Weight, Set_Color, Open_Face, Open_Edge, Open_Vertex, Renumber_Key.

HC_KEY KInsert_Polygon ( int  count,
const HC_POINT *  points 
)

Similar to Insert_Polygon(), but returns an HC_KEY to the object.

Parameters:
count - Number of valid points in points.
points - Vector of x-y-z triplets for the coordinates along the edge of the Polygon. (A simple N x 3 array may also be used.) Passed by reference always.
Returns:
key

DETAILS

No additional details. See Insert_Polygon()

void QInsert_Polygon ( const char *  segment,
int  count,
const HC_POINT *  points 
)

Similar to Insert_Polygon(), but operates on a given segment rather than the currently open one.

Parameters:
segment - Segment(s) to be inserted into, if other than the currently- open segment.
count - Number of valid points in points.
points - Vector of x-y-z triplets for the coordinates along the edge of the Polygon. (A simple N x 3 array may also be used.) Passed by reference always.

DETAILS

No additional details. See Insert_Polygon()

HC_KEY QKInsert_Polygon ( const char *  segment,
int  count,
const HC_POINT *  points 
)

Similar to Insert_Polygon(), but operates on a given segment and returns an HC_KEY to the object.

Parameters:
segment - Segment(s) to be inserted into, if other than the currently- open segment.
count - Number of valid points in points.
points - Vector of x-y-z triplets for the coordinates along the edge of the Polygon. (A simple N x 3 array may also be used.) Passed by reference always.
Returns:
key

DETAILS

No additional details. See Insert_Polygon()

void DInsert_Polygon ( int  count,
const HCD_POINT *  points 
)

Generates a simple flat, infinitely thin, colored-in object.

Parameters:
count - Number of valid points in points.
points - Vector of x-y-z triplets for the coordinates along the edge of the Polygon. (A simple N x 3 array may also be used.) Passed by reference always.

DETAILS

Similar to Insert_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.

HC_KEY DKInsert_Polygon ( int  count,
const HCD_POINT *  points 
)

Similar to DInsert_Polygon(), but returns an HC_KEY to the object.

Parameters:
count - Number of valid points in points.
points - Vector of x-y-z triplets for the coordinates along the edge of the Polygon. (A simple N x 3 array may also be used.) Passed by reference always.
Returns:
key

DETAILS

No additional details. See Insert_Polygon()

void DQInsert_Polygon ( const char *  segment,
int  count,
const HCD_POINT *  points 
)

Similar to DInsert_Polygon(), but operates on a given segment rather than the currently open one.

Parameters:
segment - Segment(s) to be inserted into, if other than the currently- open segment.
count - Number of valid points in points.
points - Vector of x-y-z triplets for the coordinates along the edge of the Polygon. (A simple N x 3 array may also be used.) Passed by reference always.

DETAILS

No additional details. See Insert_Polygon()

HC_KEY DQKInsert_Polygon ( const char *  segment,
int  count,
const HCD_POINT *  points 
)

Similar to DInsert_Polygon(), but operates on a given segment and returns an HC_KEY to the object.

Parameters:
segment - Segment(s) to be inserted into, if other than the currently- open segment.
count - Number of valid points in points.
points - Vector of x-y-z triplets for the coordinates along the edge of the Polygon. (A simple N x 3 array may also be used.) Passed by reference always.
Returns:
key

DETAILS

No additional details. See Insert_Polygon()

Main Index
Brief Index      Full Index      I.M. Functions