gluBeginPolygon

王朝百科·作者佚名  2010-03-06  
宽屏版  字体: |||超大  

NAME

gluBeginPolygon, gluEndPolygon - delimit a polygon description

C SPECIFICATION

void gluBeginPolygon( GLUtriangulatorObj *tobj )

void gluEndPolygon( GLUtriangulatorObj *tobj )

PARAMETERS

tobj ? Specifies the tessellation object (created with gluNewTess).

DESCRIPTION

gluBeginPolygon and gluEndPolygon delimit the definition of a nonconvex polygon. To define such a polygon, first call gluBeginPolygon. Then define the contours of the polygon by calling gluTessVertex for each vertex and gluNextContour to start each new contour. Finally, call gluEndPolygon to signal the end of the definition. See the "gluTessVertex" and "gluNextContour" reference pages for more details.

Once gluEndPolygon is called, the polygon is tessellated, and the resulting triangles are described through callbacks. See "gluTessCallback" for descriptions of the callback functions.

EXAMPLE

A quadrilateral with a triangular hole in it can be described like this:

gluBeginPolygon(tobj);

gluTessVertex(tobj, v1, v1);

gluTessVertex(tobj, v2, v2);

gluTessVertex(tobj, v3, v3);

gluTessVertex(tobj, v4, v4);

gluNextContour(tobj, GLU_INTERIOR);

gluTessVertex(tobj, v5, v5);

gluTessVertex(tobj, v6, v6);

gluTessVertex(tobj, v7, v7);

gluEndPolygon(tobj);

SEE ALSO

"gluNewTess" , "gluNextContour" , "gluTessCallback" , "gluTessVertex"

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝百科 版权所有