Commit c9285573 authored by Oliver Bock's avatar Oliver Bock

PI has already been defined

parent 4518d80a
......@@ -23,7 +23,6 @@
// workaround for lack of C99 support in C++
#define isnan(x) ((x) != (x))
#define GL_PI 3.1415f
const double PulsarAnimationWidget::deg2rad = PI/180.0;
PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
......@@ -377,7 +376,7 @@ void PulsarAnimationWidget::paintGL()
// Loop around in a circle and specify even points along the circle
// as the vertices of the triangle fan (32 sections)
for(angle = 0.0f; angle < (2.0f*GL_PI); angle += (GL_PI/32.0f))
for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f))
{
// Calculate x and y position of the next vertex
x = m_pulsarBeamOuterRadius * sin(angle);
......@@ -394,7 +393,7 @@ void PulsarAnimationWidget::paintGL()
{
glColor3f(0.66f, 0.66f, 0.0f);
glVertex3f(0.0f, 0.0f, m_pulsarBeamLength);
for(angle = 0.0f; angle < (2.0f*GL_PI); angle += (GL_PI/32.0f)) {
for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f)) {
x = m_pulsarBeamInnerRadius * sin(angle);
y = m_pulsarBeamInnerRadius * cos(angle);
glVertex2f(x, y);
......@@ -432,7 +431,7 @@ void PulsarAnimationWidget::paintGL()
// Loop around in a circle and specify even points along the circle
// as the vertices of the triangle fan (32 sections)
for(angle = 0.0f; angle < (2.0f*GL_PI); angle += (GL_PI/32.0f))
for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f))
{
// Calculate x and y position of the next vertex
x = m_pulsarBeamOuterRadius * sin(angle);
......@@ -449,7 +448,7 @@ void PulsarAnimationWidget::paintGL()
{
glColor3f(0.66f, 0.66f, 0.0f);
glVertex3f(0.0f, 0.0f, 3.0f);
for(angle = 0.0f; angle < (2.0f*GL_PI); angle += (GL_PI/32.0f)) {
for(angle = 0.0f; angle < (2.0f*PI); angle += (PI/32.0f)) {
x = m_pulsarBeamInnerRadius * sin(angle);
y = m_pulsarBeamInnerRadius * cos(angle);
glVertex2f(x, y);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment