Logo Search packages:      
Sourcecode: blender version File versions

void glutil_draw_lined_arc ( float  start,
float  angle,
float  radius,
int  nsegments 
)

Draw a lined (non-looping) 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.

Parameters:
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 166 of file glutil.c.

References glutil_draw_lined_arc().

Referenced by glutil_draw_lined_arc().

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


Generated by  Doxygen 1.6.0   Back to index