Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pulsatingscience
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
einsteinathome
pulsatingscience
Commits
032592bb
Commit
032592bb
authored
Dec 01, 2008
by
Oliver Bock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sent neutron star on same orbit as pulsar (and adjusted lights)
parent
21db0b15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.cpp
+8
-5
src/pulsaranimationwidget.h
src/pulsaranimationwidget.h
+1
-0
No files found.
src/pulsaranimationwidget.cpp
View file @
032592bb
...
...
@@ -69,7 +69,7 @@ void PulsarAnimationWidget::initializeGL()
glDepthFunc
(
GL_LEQUAL
);
glHint
(
GL_PERSPECTIVE_CORRECTION_HINT
,
GL_NICEST
);
GLfloat
LightAmbient
[]
=
{
0.
0
f
,
0.0
f
,
0.0
f
,
1.0
f
};
GLfloat
LightAmbient
[]
=
{
0.
3
f
,
0.3
f
,
0.3
f
,
1.0
f
};
GLfloat
LightDiffuse
[]
=
{
1.0
f
,
1.0
f
,
1.0
f
,
1.0
f
};
GLfloat
LightSpecular
[]
=
{
1.0
f
,
1.0
f
,
1.0
f
,
1.0
f
};
GLfloat
LightPosition
[]
=
{
0.0
f
,
0.0
f
,
3.0
f
,
1.0
f
};
...
...
@@ -79,9 +79,9 @@ void PulsarAnimationWidget::initializeGL()
glLightfv
(
GL_LIGHT0
,
GL_DIFFUSE
,
LightDiffuse
);
glLightfv
(
GL_LIGHT0
,
GL_SPECULAR
,
LightSpecular
);
glLightfv
(
GL_LIGHT0
,
GL_POSITION
,
LightPosition
);
glLightf
(
GL_LIGHT0
,
GL_SPOT_CUTOFF
,
2
0.0
);
glLightf
(
GL_LIGHT0
,
GL_SPOT_CUTOFF
,
5
0.0
);
glLightfv
(
GL_LIGHT0
,
GL_SPOT_DIRECTION
,
spot_direction
);
glLightf
(
GL_LIGHT0
,
GL_SPOT_EXPONENT
,
5
.0
);
glLightf
(
GL_LIGHT0
,
GL_SPOT_EXPONENT
,
10
.0
);
glLightModeli
(
GL_LIGHT_MODEL_LOCAL_VIEWER
,
GL_TRUE
);
glEnable
(
GL_LIGHT0
);
...
...
@@ -135,11 +135,13 @@ void PulsarAnimationWidget::paintGL()
glMaterialfv
(
GL_FRONT
,
GL_SHININESS
,
low_shininess
);
glMaterialfv
(
GL_FRONT
,
GL_EMISSION
,
no_mat
);
glRotatef
(
m_orbitRotationAngle
,
0.0
f
,
1.0
f
,
0.0
f
);
glPushMatrix
();
glTranslatef
(
0.0
f
,
0.0
f
,
m_orbitRadiusNeg
);
gluSphere
(
m_quadricPulsar
,
1.0
f
,
32
,
32
);
glPopMatrix
();
glRotatef
(
m_orbitRotationAngle
,
0.0
f
,
1.0
f
,
0.0
f
);
glTranslatef
(
0.0
f
,
0.0
f
,
m_orbitRadius
);
glPushMatrix
();
...
...
@@ -271,7 +273,8 @@ void PulsarAnimationWidget::setPulsarSpinFrequency(const float frequency)
void
PulsarAnimationWidget
::
setOrbitRadius
(
const
float
radius
)
{
m_orbitRadius
=
-
1.0
*
radius
;
m_orbitRadius
=
radius
;
m_orbitRadiusNeg
=
-
1.0
*
radius
;
}
void
PulsarAnimationWidget
::
setOrbitFrequency
(
const
float
frequency
)
...
...
src/pulsaranimationwidget.h
View file @
032592bb
...
...
@@ -75,6 +75,7 @@ protected:
float
m_pulsarRotationAngle
;
float
m_orbitRadius
;
float
m_orbitRadiusNeg
;
float
m_orbitFrequency
;
float
m_orbitRotationAngle
;
...
...
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