Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
pulsatingscience
Commits
2e189760
Commit
2e189760
authored
Sep 16, 2011
by
Oliver Bock
Browse files
Visualize the pulse as a flash seen by the observer
parent
edec5a4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsaranimationwidget.cpp
View file @
2e189760
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment