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

Put pulsar radius into variable

parent d5e73ff1
......@@ -77,18 +77,18 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
// initial binary system parameters (have to match GUI!)
m_pulsarMass = 1.4;
// initial companion is "Neutron Star"
m_companionMass = 1.4;
m_pulsarRadius = 1.0;
m_pulsarSpinAxisInclination = 0.0;
m_pulsarMagneticAxisInclination = 60.0;
m_pulsarSemiMajorAxis = 5.0;
m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
// initial spin frequency of 0.5 Hz
m_pulsarRotationDelta = (360.0 * 0.5) / m_framesPerSecond;
// beam properties (keep this order!)
m_pulsarBeamLength = 3.0f;
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)
updateOrbitPeriod();
......@@ -356,7 +356,7 @@ void PulsarAnimationWidget::paintGL()
glEnable(GL_LIGHTING);
glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
gluSphere(m_quadricPulsar, 1.0, 32, 32);
gluSphere(m_quadricPulsar, m_pulsarRadius, 32, 32);
glDisable(GL_LIGHTING);
}
glPopMatrix();
......
......@@ -104,16 +104,16 @@ private:
double m_orbitRotationAngle;
double m_orbitRotationDelta;
double m_pulsarRadius;
double m_pulsarBeamLength;
double m_pulsarBeamAngle;
double m_pulsarBeamOuterRadius;
double m_pulsarMass;
double m_pulsarSemiMajorAxis;
double m_companionMass;
double m_companionSemiMajorAxis;
double m_pulsarSpinAxisInclination;
double m_pulsarMagneticAxisInclination;
double m_pulsarBeamLength;
double m_pulsarBeamAngle;
double m_pulsarBeamOuterRadius;
double m_companionMass;
double m_companionSemiMajorAxis;
bool m_showOrbits;
bool m_showRotationAxes;
......
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