Commit 2e189760 authored by Oliver Bock's avatar Oliver Bock

Visualize the pulse as a flash seen by the observer

parent edec5a4f
......@@ -554,6 +554,14 @@ void PulsarAnimationWidget::paintGL()
renderText(10, 25, -100, QString::fromLocal8Bit("Copyright © 2009-2011"), font);
renderText(10, 10, -100, QString::fromLocal8Bit("Max-Planck-Insitut für Gravitationsphysik"), font);
// render pulse "flash"
int profileIndex = (int) round(m_pulsarRotationAngle);
profileIndex = profileIndex == 360 ? 0 : profileIndex;
GLfloat flashAlpha = m_pulseProfile[profileIndex];
glColor4f(1.0, 1.0, 0.0, 0.75 * flashAlpha);
glTranslatef(0.0, 0.0, -1.0);
glRectf(0.0, 0.0, width(), height());
// restore original state
glMatrixMode(GL_PROJECTION);
}
......
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