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
4081dce8
Commit
4081dce8
authored
Dec 01, 2008
by
Oliver Bock
Browse files
Dedicated material for "lighthouse" cones
parent
ba9e75c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsaranimationwidget.cpp
View file @
4081dce8
...
@@ -119,14 +119,10 @@ void PulsarAnimationWidget::paintGL()
...
@@ -119,14 +119,10 @@ void PulsarAnimationWidget::paintGL()
// TODO: should be located elsewhere
// TODO: should be located elsewhere
static
GLfloat
no_mat
[]
=
{
0.0
,
0.0
,
0.0
,
1.0
};
static
GLfloat
no_mat
[]
=
{
0.0
,
0.0
,
0.0
,
1.0
};
static
GLfloat
mat_ambient
[]
=
{
0.7
,
0.7
,
0.7
,
1.0
};
static
GLfloat
mat_ambient_color
[]
=
{
0.8
,
0.8
,
0.2
,
1.0
};
static
GLfloat
mat_diffuse
[]
=
{
0.5
,
0.5
,
0.5
,
1.0
};
static
GLfloat
mat_diffuse
[]
=
{
0.5
,
0.5
,
0.5
,
1.0
};
static
GLfloat
mat_specular
[]
=
{
1.0
,
1.0
,
1.0
,
1.0
};
static
GLfloat
mat_specular
[]
=
{
1.0
,
1.0
,
1.0
,
1.0
};
static
GLfloat
no_shininess
[]
=
{
0.0
};
static
GLfloat
low_shininess
[]
=
{
5.0
};
static
GLfloat
low_shininess
[]
=
{
5.0
};
static
GLfloat
high_shininess
[]
=
{
100.0
};
static
GLfloat
mat_emission
[]
=
{
0.3
,
0.2
,
0.2
,
0.0
};
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
no_mat
);
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
no_mat
);
glMaterialfv
(
GL_FRONT
,
GL_DIFFUSE
,
mat_diffuse
);
glMaterialfv
(
GL_FRONT
,
GL_DIFFUSE
,
mat_diffuse
);
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
mat_specular
);
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
mat_specular
);
...
@@ -150,6 +146,15 @@ void PulsarAnimationWidget::paintGL()
...
@@ -150,6 +146,15 @@ void PulsarAnimationWidget::paintGL()
gluSphere
(
m_quadricPulsar
,
1.0
f
,
32
,
32
);
gluSphere
(
m_quadricPulsar
,
1.0
f
,
32
,
32
);
glPopMatrix
();
glPopMatrix
();
// TODO: should be located elsewhere
static
GLfloat
coneAmbient
[]
=
{
1.0
,
1.0
,
0.0
,
1.0
};
static
GLfloat
coneDiffuse
[]
=
{
1.0
,
1.0
,
0.0
,
1.0
};
static
GLfloat
coneSpecular
[]
=
{
1.0
,
1.0
,
0.5
,
1.0
};
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
coneAmbient
);
glMaterialfv
(
GL_FRONT
,
GL_DIFFUSE
,
coneDiffuse
);
glMaterialfv
(
GL_FRONT
,
GL_SPECULAR
,
coneSpecular
);
glPushMatrix
();
glPushMatrix
();
glRotatef
(
m_pulsarRotationAngle
-
90
,
0.0
f
,
1.0
f
,
0.0
f
);
glRotatef
(
m_pulsarRotationAngle
-
90
,
0.0
f
,
1.0
f
,
0.0
f
);
glTranslatef
(
0.0
f
,
0.0
f
,
-
4.0
f
);
glTranslatef
(
0.0
f
,
0.0
f
,
-
4.0
f
);
...
...
Write
Preview
Supports
Markdown
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