Commit 02ded9b6 authored by Oliver Bock's avatar Oliver Bock

Improve beam angle handling

* Limit beam angle to 120 degrees
* Limit (inner) beam cone radius to 0 (if outer radius is less than rim size)
parent 70874ddd
...@@ -637,6 +637,7 @@ void PulsarAnimationWidget::setPulsarBeamAngle(const int degrees) ...@@ -637,6 +637,7 @@ void PulsarAnimationWidget::setPulsarBeamAngle(const int degrees)
{ {
m_pulsarBeamOuterRadius = tan(deg2rad * degrees * 0.5f) * m_pulsarBeamLength; m_pulsarBeamOuterRadius = tan(deg2rad * degrees * 0.5f) * m_pulsarBeamLength;
m_pulsarBeamInnerRadius = m_pulsarBeamOuterRadius - m_pulsarBeamRimSize; m_pulsarBeamInnerRadius = m_pulsarBeamOuterRadius - m_pulsarBeamRimSize;
if(m_pulsarBeamInnerRadius < 0.0) m_pulsarBeamInnerRadius = 0.0;
updatePulseProfile(); updatePulseProfile();
updateGL(); updateGL();
......
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
<string>Use this slider to adjust the pulsar beam spread angle (aperture or width)</string> <string>Use this slider to adjust the pulsar beam spread angle (aperture or width)</string>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>180</number> <number>120</number>
</property> </property>
<property name="pageStep"> <property name="pageStep">
<number>5</number> <number>5</number>
......
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