Commit 399e2ccf authored by Oliver Bock's avatar Oliver Bock
Browse files

Added LLO

parent dc52b0fb
......@@ -57,8 +57,8 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
m_quadricCompanion = NULL;
m_quadricPulsarOrbitPlane = NULL;
m_quadricPulsar = NULL;
m_quadricPulsarCone1Shell = NULL;
m_quadricPulsarCone2Shell = NULL;
m_quadricLLOh = NULL;
m_quadricLLOv = NULL;
m_quadricPulsarSpinAxis = NULL;
m_quadricPulsarSpinAxisTop1 = NULL;
m_quadricLHOv = NULL;
......@@ -77,7 +77,7 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
// initial parameters (have to match GUI!)
m_LHOAngle = 180;
m_LLOAngle = 0;
m_LLOAngle = -100;
m_VirgoAngle = 0;
m_pulsarRadius = 3.0;
......@@ -120,8 +120,8 @@ PulsarAnimationWidget::~PulsarAnimationWidget()
if(m_quadricCompanion) gluDeleteQuadric(m_quadricCompanion);
if(m_quadricPulsarOrbitPlane) gluDeleteQuadric(m_quadricPulsarOrbitPlane);
if(m_quadricPulsar) gluDeleteQuadric(m_quadricPulsar);
if(m_quadricPulsarCone1Shell) gluDeleteQuadric(m_quadricPulsarCone1Shell);
if(m_quadricPulsarCone2Shell) gluDeleteQuadric(m_quadricPulsarCone2Shell);
if(m_quadricLLOh) gluDeleteQuadric(m_quadricLLOh);
if(m_quadricLLOv) gluDeleteQuadric(m_quadricLLOv);
if(m_quadricPulsarSpinAxis) gluDeleteQuadric(m_quadricPulsarSpinAxis);
if(m_quadricPulsarSpinAxisTop1) gluDeleteQuadric(m_quadricPulsarSpinAxisTop1);
if(m_quadricLHOv) gluDeleteQuadric(m_quadricLHOv);
......@@ -165,8 +165,8 @@ void PulsarAnimationWidget::initializeGL()
m_quadricCompanion = gluNewQuadric();
m_quadricPulsarOrbitPlane = gluNewQuadric();
m_quadricPulsar = gluNewQuadric();
m_quadricPulsarCone1Shell = gluNewQuadric();
m_quadricPulsarCone2Shell = gluNewQuadric();
m_quadricLLOh = gluNewQuadric();
m_quadricLLOv = gluNewQuadric();
m_quadricPulsarSpinAxis = gluNewQuadric();
m_quadricPulsarSpinAxisTop1 = gluNewQuadric();
m_quadricLHOv = gluNewQuadric();
......@@ -176,8 +176,8 @@ void PulsarAnimationWidget::initializeGL()
gluQuadricNormals(m_quadricCompanion, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsarOrbitPlane, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsar, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsarCone1Shell, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsarCone2Shell, GLU_SMOOTH);
gluQuadricNormals(m_quadricLLOh, GLU_SMOOTH);
gluQuadricNormals(m_quadricLLOv, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsarSpinAxis, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsarSpinAxisTop1, GLU_SMOOTH);
gluQuadricNormals(m_quadricLHOv, GLU_SMOOTH);
......@@ -330,6 +330,34 @@ void PulsarAnimationWidget::paintGL()
}
glPopMatrix();
// draw LLO
glPushMatrix();
{
glColor3f(1.0f, 1.0f, 1.0f);
glRotatef(-2, 0.0, 1.0, 0.0);
glRotatef(5, 1.0, 0.0, 0.0);
glRotatef(-60, 1.0, 1.0, 0.0);
glTranslatef(0.0, 0.0, m_pulsarRadius);
glRotatef(m_LLOAngle, 0.0, 0.0, 1.0);
glPushMatrix();
{
glRotatef(90, 0.0, 1.0, 0.0);
gluCylinder(m_quadricLLOh, 0.010, 0.010, 0.20, 32, 1);
}
glPopMatrix();
glPushMatrix();
{
glRotatef(90, 0.0, 1.0, 0.0);
glRotatef(90, 1.0, 0.0, 0.0);
glColor3f(1.0f, 0.5f, 0.5f);
gluCylinder(m_quadricLLOv, 0.010, 0.010, 0.20, 32, 1);
}
glPopMatrix();
}
glPopMatrix();
// draw source
glPushMatrix();
{
......@@ -584,8 +612,10 @@ void PulsarAnimationWidget::setLHOAngle(const double degrees)
void PulsarAnimationWidget::setLLOAngle(const double degrees)
{
m_LHOAngle = degrees;
m_LLOAngle = degrees - 100;
updatePulseProfile();
updateGL();
}
void PulsarAnimationWidget::setVirgoAngle(const int degrees)
......
......@@ -94,8 +94,8 @@ private:
GLUquadricObj *m_quadricCompanion;
GLUquadricObj *m_quadricPulsarOrbitPlane;
GLUquadricObj *m_quadricPulsar;
GLUquadricObj *m_quadricPulsarCone1Shell;
GLUquadricObj *m_quadricPulsarCone2Shell;
GLUquadricObj *m_quadricLLOh;
GLUquadricObj *m_quadricLLOv;
GLUquadricObj *m_quadricPulsarSpinAxis;
GLUquadricObj *m_quadricPulsarSpinAxisTop1;
GLUquadricObj *m_quadricLHOv;
......
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