Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pulsatingscience
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
pulsatingscience
Commits
1ce2b8e0
Commit
1ce2b8e0
authored
Sep 16, 2011
by
Oliver Bock
Browse files
Options
Downloads
Patches
Plain Diff
Put pulsar radius into variable
parent
d5e73ff1
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pulsaranimationwidget.cpp
+5
-5
5 additions, 5 deletions
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.h
+6
-6
6 additions, 6 deletions
src/pulsaranimationwidget.h
with
11 additions
and
11 deletions
src/pulsaranimationwidget.cpp
+
5
−
5
View file @
1ce2b8e0
...
@@ -77,18 +77,18 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
...
@@ -77,18 +77,18 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
// initial binary system parameters (have to match GUI!)
// initial binary system parameters (have to match GUI!)
m_pulsarMass
=
1.4
;
m_pulsarMass
=
1.4
;
// initial companion is "Neutron Star"
m_pulsarRadius
=
1.0
;
m_companionMass
=
1.4
;
m_pulsarSpinAxisInclination
=
0.0
;
m_pulsarSpinAxisInclination
=
0.0
;
m_pulsarMagneticAxisInclination
=
60.0
;
m_pulsarMagneticAxisInclination
=
60.0
;
m_pulsarSemiMajorAxis
=
5.0
;
m_pulsarSemiMajorAxis
=
5.0
;
m_companionSemiMajorAxis
=
(
m_pulsarMass
/
m_companionMass
)
*
m_pulsarSemiMajorAxis
;
// initial spin frequency of 0.5 Hz
// initial spin frequency of 0.5 Hz
m_pulsarRotationDelta
=
(
360.0
*
0.5
)
/
m_framesPerSecond
;
m_pulsarRotationDelta
=
(
360.0
*
0.5
)
/
m_framesPerSecond
;
// beam properties (keep this order!)
// beam properties (keep this order!)
m_pulsarBeamLength
=
3.0f
;
m_pulsarBeamLength
=
3.0f
;
setPulsarBeamAngle
(
30
);
setPulsarBeamAngle
(
30
);
// initial companion is "Neutron Star"
m_companionMass
=
1.4
;
m_companionSemiMajorAxis
=
(
m_pulsarMass
/
m_companionMass
)
*
m_pulsarSemiMajorAxis
;
// update orbital period (based on settings above)
// update orbital period (based on settings above)
updateOrbitPeriod
();
updateOrbitPeriod
();
...
@@ -356,7 +356,7 @@ void PulsarAnimationWidget::paintGL()
...
@@ -356,7 +356,7 @@ void PulsarAnimationWidget::paintGL()
glEnable
(
GL_LIGHTING
);
glEnable
(
GL_LIGHTING
);
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
);
gluSphere
(
m_quadricPulsar
,
1.0
,
32
,
32
);
gluSphere
(
m_quadricPulsar
,
m_pulsarRadius
,
32
,
32
);
glDisable
(
GL_LIGHTING
);
glDisable
(
GL_LIGHTING
);
}
}
glPopMatrix
();
glPopMatrix
();
...
...
This diff is collapsed.
Click to expand it.
src/pulsaranimationwidget.h
+
6
−
6
View file @
1ce2b8e0
...
@@ -104,16 +104,16 @@ private:
...
@@ -104,16 +104,16 @@ private:
double
m_orbitRotationAngle
;
double
m_orbitRotationAngle
;
double
m_orbitRotationDelta
;
double
m_orbitRotationDelta
;
double
m_pulsarRadius
;
double
m_pulsarBeamLength
;
double
m_pulsarBeamAngle
;
double
m_pulsarBeamOuterRadius
;
double
m_pulsarMass
;
double
m_pulsarMass
;
double
m_pulsarSemiMajorAxis
;
double
m_pulsarSemiMajorAxis
;
double
m_companionMass
;
double
m_companionSemiMajorAxis
;
double
m_pulsarSpinAxisInclination
;
double
m_pulsarSpinAxisInclination
;
double
m_pulsarMagneticAxisInclination
;
double
m_pulsarMagneticAxisInclination
;
double
m_pulsarBeamLength
;
double
m_companionMass
;
double
m_pulsarBeamAngle
;
double
m_companionSemiMajorAxis
;
double
m_pulsarBeamOuterRadius
;
bool
m_showOrbits
;
bool
m_showOrbits
;
bool
m_showRotationAxes
;
bool
m_showRotationAxes
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment