Brief Index      Full Index      I.M. Reference

Set_Polygonal_Clip_Region


Functions

void Set_Polygonal_Clip_Region (int count, const HC_POINT *points, const char *options)
void QSet_Polygonal_Clip_Region (const char *segment, int count, const HC_POINT *points, const char *options)
void UnSet_Clip_Region (void)
void QUnSet_Clip_Region (const char *segment)

Function Documentation

void Set_Polygonal_Clip_Region ( int  count,
const HC_POINT *  points,
const char *  options 
)

Defines a polygonal region in the segment tree, where all geometry in/beneath that segment will be drawn clipped to that region or masked out.

Parameters:
count - Number of (x,y,z) triplets in points.
points - The set of (x,y,z) triplets that define the polygonal clip region.
options - A comma separated list of the desired settings.

DETAILS

This function allows you to define a polygonal region on a segment such that all geometry in or beneath it will be clipped. It allows you to specify whether the region is a clip region in which case all the geometry "outside" the polygon will not be drawn or a mask region in which case all the geometry "inside" the polygon will not be drawn.

The list of valid choices for options string:

window | world

Specify the coordinate space. You can select either 'window' or 'world'. 'window' means that the coordinates specified in points array are in window space while 'world' indicate the values specifed in the points array are in world space.

type [= clip|mask]

If "type=clip", then everything in/below the currently opened segment which lies outside the defined polygon will not be drawn. If the "type=mask", then everything in/below the currently opened segment which lies inside the defined polygon will not be drawn.

If nothing is specified in the options string, then the region will be a clip region and the points will be assumed to be in window space.

NOTES

Where possible, display drivers make use of any hardware stencil buffers to accelerate this feature. Performance when using this feature is therefore greatly enhanced if the 'stencil' driver option is not turned off prior to the first update (it is on by default). Where not possible, some geometry may overstep the boundaries slightly. For example, text can often only be clipped away whole characters at a time, so parts of character may go outside.

RESTRICTIONS

The polygon must be convex. There can (for now) be only one clip region active, so any clip regions that are set replace those that might have been inherited from above. Future releases may, however, combine (rather than replace) clip regions.

See also:
Show_Clip_Region

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

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

Parameters:
segment - The root of the segment tree to which the clip should be applied.
count - Number of (x,y,z) triplets in points.
points - The set of (x,y,z) triplets that define the polygonal clip region.
options - Coordinate space for points, either 'world' or 'window' space

DETAILS

No additional details. See Set_Polygonal_Clip_Region()

void UnSet_Clip_Region ( void   ) 

Removes all clip regions set by a previous call to Set_Polygonal_Clip_Region().

DETAILS

No additional details. See Set_Polygonal_Clip_Region()

void QUnSet_Clip_Region ( const char *  segment  ) 

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

Parameters:
segment - The root of the segment tree to which the clip should be applied.

DETAILS

No additional details. See Set_Polygonal_Clip_Region()

Main Index
Brief Index      Full Index      I.M. Functions