Logo Search packages:      
Sourcecode: blender version File versions

void glutil_draw_filled_arc ( float  start,
float  angle,
float  radius,
int  nsegments 

Draw a filled arc with the given radius, starting at angle start and arcing through angle. The arc is centered at the origin and drawn in the XY plane.

start The initial angle (in radians).
angle The length of the arc (in radians).
radius The arc radius.
nsegments The number of segments to use in drawing the arc.

Definition at line 152 of file glutil.c.

References glutil_draw_filled_arc().

Referenced by glutil_draw_filled_arc().

      int i;
      glVertex2f(0.0, 0.0);
      for (i=0; i<nsegments; i++) {
            float t= (float) i/(nsegments-1);
            float cur= start + t*angle;
            glVertex2f(cos(cur)*radius, sin(cur)*radius);

Generated by  Doxygen 1.6.0   Back to index