Commit 1c6f58a7 authored by Oliver Bock's avatar Oliver Bock

Fixed spin/magnetic axis rotations to reflect new initial camera position

parent 6b75f14b
......@@ -262,7 +262,7 @@ void PulsarAnimationWidget::paintGL()
// draw pulsar
glPushMatrix();
glPushMatrix();
glRotatef(m_pulsarSpinAxisInclination, 0.0, 0.0, 1.0);
glRotatef(-m_pulsarSpinAxisInclination, 1.0, 0.0, 0.0);
glRotatef(m_pulsarRotationAngle, 0.0, 0.0, 1.0);
// draw spin axis
......@@ -303,10 +303,10 @@ void PulsarAnimationWidget::paintGL()
// first cone
glPushMatrix();
glRotatef(m_pulsarSpinAxisInclination, 0.0, 1.0, 0.0);
glRotatef(-m_pulsarSpinAxisInclination, 1.0, 0.0, 0.0);
glRotatef(-m_pulsarRotationAngle - 90.0, 0.0, 0.0, 1.0);
glRotatef(-m_pulsarMagneticAxisInclination, 1.0, 0.0, 0.0);
glRotatef(m_pulsarMagneticAxisInclination, 0.0, 1.0, 0.0);
// draw magnetic axis (for both cones)
if(m_showRotationAxes) {
......@@ -374,10 +374,10 @@ void PulsarAnimationWidget::paintGL()
// second cone
glPushMatrix();
glRotatef(180.0, 1.0, 0.0, 0.0);
glRotatef(-m_pulsarSpinAxisInclination, 0.0, 1.0, 0.0);
glRotatef(-m_pulsarSpinAxisInclination, 1.0, 0.0, 0.0);
glRotatef(m_pulsarRotationAngle - 90.0, 0.0, 0.0, 1.0);
glRotatef(m_pulsarMagneticAxisInclination, 1.0, 0.0, 0.0);
glRotatef(m_pulsarMagneticAxisInclination, 0.0, 1.0, 0.0);
glTranslatef(0.0, 0.0, -4.0);
......@@ -615,8 +615,8 @@ void PulsarAnimationWidget::updatePulseProfile()
const double yk = -m_cameraPosX;
const double zk = m_cameraPosY;
const double cam = pow(xk, 2.0) + pow(yk, 2.0) + pow(zk, 2.0);
const double alpha = deg2rad * (90.0 - m_mouseAngleH);
const double delta = deg2rad * m_mouseAngleV;
const double alpha = deg2rad * (90.0 - m_mouseAngleH);
const double delta = deg2rad * m_mouseAngleV;
const double gaussProfile = 0.012337;
for(int x = 0; x < 360; ++x) {
......
......@@ -144,7 +144,7 @@
<item row="2" column="1">
<widget class="QSlider" name="sliderPulsarSpinAxisInclination">
<property name="statusTip">
<string>Use this slider to adjust the inclination of the spin axis with respect to the orbit axis</string>
<string>Use this slider to adjust the inclination of the spin axis with respect to the line of sight to the observer</string>
</property>
<property name="maximum">
<number>180</number>
......@@ -241,6 +241,9 @@
</item>
<item row="4" column="1">
<widget class="QSlider" name="sliderPulsarBeamAngle">
<property name="statusTip">
<string>Use this slider to adjust the pulsar beam spread angle (aperture or width)</string>
</property>
<property name="maximum">
<number>180</number>
</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment