Commit 619ed1b9 authored by Oliver Bock's avatar Oliver Bock

Nicer rotation axes (closed tops)

parent ace2c6ad
......@@ -329,15 +329,27 @@ void PulsarAnimationWidget::paintGL()
// draw spin axis
if(m_showRotationAxes) {
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glColor3f(1.0f, 1.0f, 1.0f);
glPushMatrix();
{
glTranslatef(0.0, 0.0, -4.0);
gluCylinder(m_quadricPulsarSpinAxis, 0.020, 0.020, 8.0, 32, 1);
}
glPopMatrix();
glPushMatrix();
{
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, translucent);
glTranslatef(0.0, 0.0, -5.0);
gluCylinder(m_quadricPulsarSpinAxis, 0.05, 0.05, 10.0, 32, 1);
glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
glTranslatef(0.0, 0.0, -4.0);
gluDisk(m_quadricPulsarSpinAxisTop1, 0, 0.020, 32, 8);
}
glPopMatrix();
glPushMatrix();
{
glTranslatef(0.0, 0.0, 4.0);
gluDisk(m_quadricPulsarSpinAxisTop2, 0, 0.020, 32, 8);
}
glPopMatrix();
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
}
// draw sphere, with proper lighting
......
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