Commit 117adb5f authored by Oliver Bock's avatar Oliver Bock
Browse files

Draw fixed earth

parent 2ed55d0f
...@@ -297,16 +297,19 @@ void PulsarAnimationWidget::paintGL() ...@@ -297,16 +297,19 @@ void PulsarAnimationWidget::paintGL()
} }
glPopMatrix(); glPopMatrix();
// draw companion // enable wireframe mode
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
// draw earth
glPushMatrix(); glPushMatrix();
{ {
glTranslatef(sin((m_orbitRotationAngle + 180.0) * deg2rad) * m_companionSemiMajorAxis, glRotatef(90, 1.0, 0.0, 0.0);
0.0,
cos((m_orbitRotationAngle + 180.0) * deg2rad) * m_companionSemiMajorAxis);
// draw, with proper lighting // draw sphere, with proper lighting
glEnable(GL_LIGHTING); glEnable(GL_LIGHTING);
gluSphere(m_quadricCompanion, 1.0, 32, 32); glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
gluSphere(m_quadricPulsar, m_pulsarRadius, 32, 32);
glDisable(GL_LIGHTING); glDisable(GL_LIGHTING);
} }
glPopMatrix(); glPopMatrix();
......
Supports Markdown
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