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
da11546c
Commit
da11546c
authored
Sep 07, 2017
by
Oliver Bock
Browse files
Adjust unitial zoom and relative sizes
parent
a15339d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsaranimationwidget.cpp
View file @
da11546c
...
...
@@ -102,7 +102,7 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
// initial view settings
m_mouseAngleH
=
0.0
;
m_mouseAngleV
=
0.0
;
m_cameraZoom
=
1
5
0.0
;
m_cameraZoom
=
1
0
0.0
;
m_cameraZoomLBound
=
10.0
;
m_cameraZoomUBound
=
4500.0
;
m_mouseLastX
=
0
;
...
...
@@ -321,39 +321,39 @@ void PulsarAnimationWidget::paintGL()
glColor3f
(
1.0
f
,
0.0
f
,
0.0
f
);
glPushMatrix
();
{
glTranslatef
(
0.0
,
0.0
,
-
2
.0
);
gluCylinder
(
m_quadricPulsarSpinAxis
,
0.020
,
0.020
,
3
.5
,
32
,
1
);
glTranslatef
(
0.0
,
0.0
,
-
1
.0
);
gluCylinder
(
m_quadricPulsarSpinAxis
,
0.020
,
0.020
,
1
.5
,
32
,
1
);
}
glPopMatrix
();
glPushMatrix
();
{
glTranslatef
(
0.0
,
0.0
,
-
2
.0
);
glTranslatef
(
0.0
,
0.0
,
-
1
.0
);
gluDisk
(
m_quadricPulsarSpinAxisTop1
,
0
,
0.020
,
32
,
8
);
}
glPopMatrix
();
glPushMatrix
();
{
glTranslatef
(
0.0
,
0.0
,
1.0
);
glTranslatef
(
0.0
,
0.0
,
0.5
);
gluDisk
(
m_quadricPulsarSpinAxisTop2
,
0
,
0.020
,
32
,
8
);
}
glPopMatrix
();
glPushMatrix
();
{
glTranslatef
(
0.0
,
0.0
,
1.2
5
f
);
glTranslatef
(
0.0
,
0.0
,
0.
5
f
);
glBegin
(
GL_TRIANGLE_FAN
);
{
// Pinnacle of cone is shared vertex for fan, moved up z-axis
// to produce a cone instead of a circle
glVertex3f
(
0.0
f
,
0.0
f
,
0.
7
5
f
);
glVertex3f
(
0.0
f
,
0.0
f
,
0.5
f
);
// Loop around in a circle and specify even points along the circle
// as the vertices of the triangle fan (32 sections)
for
(
angle
=
0.0
f
;
angle
<
(
2.0
f
*
PI
);
angle
+=
(
PI
/
32.0
f
))
{
// Calculate x and y position of the next vertex
x
=
0.
25
f
*
sin
(
angle
);
y
=
0.
25
f
*
cos
(
angle
);
x
=
0.
1
f
*
sin
(
angle
);
y
=
0.
1
f
*
cos
(
angle
);
// Specify the next vertex for the triangle fan
glVertex2f
(
x
,
y
);
...
...
@@ -371,7 +371,7 @@ void PulsarAnimationWidget::paintGL()
{
gluDisk
(
m_quadricPulsarOrbitPlane
,
0
,
2
,
1.0
,
64
,
1
);
}
glPopMatrix
();
...
...
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