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
fb2caaff
Commit
fb2caaff
authored
Jan 29, 2009
by
Oliver Bock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that orbital planes overlap nicely
parent
c9bfa5fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.cpp
+23
-13
No files found.
src/pulsaranimationwidget.cpp
View file @
fb2caaff
...
...
@@ -304,23 +304,33 @@ void PulsarAnimationWidget::paintGL()
if
(
m_cameraInteraction
)
{
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT_AND_DIFFUSE
,
translucent
);
// companion
glPushMatrix
();
glRotatef
(
90.0
f
,
1.0
f
,
0.0
f
,
0.0
f
);
glTranslatef
(
0.0
f
,
0.0
f
,
0.0
f
);
gluDisk
(
m_quadricCompanionOrbitPlane
,
m_companionSemiMajorAxis
-
0.25
f
,
m_companionSemiMajorAxis
+
0.25
f
,
64
,
1
);
glPopMatrix
();
static
float
sizeOffset
=
0.25
f
;
// companion's plane (only if not identical with pulsar's)
if
(
m_companionSemiMajorAxis
!=
m_pulsarSemiMajorAxis
)
{
glPushMatrix
();
glRotatef
(
90.0
f
,
1.0
f
,
0.0
f
,
0.0
f
);
// separate them slightly in case of overlap
// based on ugly mass diff check (no collision detection)
// single known problematic pair: (m_c=1.4, m_p=1.5)
if
((
int
)(
10
*
(
m_pulsarMass
-
m_companionMass
)
+
0.5
f
)
==
1
){
glTranslatef
(
0.0
f
,
0.0
f
,
0.01
f
);
}
gluDisk
(
m_quadricCompanionOrbitPlane
,
m_companionSemiMajorAxis
-
sizeOffset
,
m_companionSemiMajorAxis
+
sizeOffset
,
64
,
1
);
glPopMatrix
();
}
// pulsar
// pulsar
's plane
glPushMatrix
();
glRotatef
(
90.0
f
,
1.0
f
,
0.0
f
,
0.0
f
);
glTranslatef
(
0.0
f
,
0.0
f
,
0.1
f
);
gluDisk
(
m_quadricPulsarOrbitPlane
,
m_pulsarSemiMajorAxis
-
0.25
f
,
m_pulsarSemiMajorAxis
+
0.25
f
,
m_pulsarSemiMajorAxis
-
sizeOffset
,
m_pulsarSemiMajorAxis
+
sizeOffset
,
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