BloodknightStudios icon

Untitled

BloodknightStudios | PRO | 01/13/18 03:01:39 PM UTC | 0 ⭐ | 612 👁️ | Never ⏰ | []
text |

580 B

|

None

|

0 👍

/

0 👎

const float PI		= 3.1416;const float TWO_PI	= 6.2832f; /*** Function that draws a circle using a line loop.** Params:*	x - the x position of the circles center.*	x - the x position of the circles center.*	radius - circle radius*	segments - circle segments (default 8)*/inline void drawCircle(GLfloat x, GLfloat y, GLfloat z, GLfloat radius, int segments) {	if (segments == 0) segments = 100; 	glBegin(GL_LINE_LOOP);	for (int i = 0; i <= segments; i++) {		glVertex3f(x + (radius * cos(i *  TWO_PI / segments)), 0.0f, z + (radius * sin(i * TWO_PI / segments)));	}	glEnd();}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎