Commit e4a1186f authored by Oliver Bock's avatar Oliver Bock
Browse files

Renamed remaining objects

parent ef27e12e
......@@ -52,12 +52,12 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
// initialize quadric pointers
m_quadricVirgoh = NULL;
m_quadricVirgov = NULL;
m_quadricPulsarOrbitPlane = NULL;
m_quadricPulsar = NULL;
m_quadricEarth = NULL;
m_quadricLLOh = NULL;
m_quadricLLOv = NULL;
m_quadricPulsarSpinAxis = NULL;
m_quadricPulsarSpinAxisTop1 = NULL;
m_quadricSourcePlane = NULL;
m_quadricSourcePlaneNormal = NULL;
m_quadricSourcePlaneNormalCap = NULL;
m_quadricLHOv = NULL;
m_quadricLHOh = NULL;
......@@ -68,10 +68,10 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
m_LHOAngle = 180;
m_LLOAngle = -100;
m_VirgoAngle = 165;
m_sourceIota = 0.0;
m_sourceInclination = 0;
m_pulsarRadius = 3.0;
m_pulsarSpinAxisInclination = 0.0;
m_earthRadius = 3.0;
// initial view features
m_cameraInteraction = false;
......@@ -93,12 +93,12 @@ PulsarAnimationWidget::~PulsarAnimationWidget()
{
if(m_quadricVirgoh) gluDeleteQuadric(m_quadricVirgoh);
if(m_quadricVirgov) gluDeleteQuadric(m_quadricVirgov);
if(m_quadricPulsarOrbitPlane) gluDeleteQuadric(m_quadricPulsarOrbitPlane);
if(m_quadricPulsar) gluDeleteQuadric(m_quadricPulsar);
if(m_quadricEarth) gluDeleteQuadric(m_quadricEarth);
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_quadricSourcePlane) gluDeleteQuadric(m_quadricSourcePlane);
if(m_quadricSourcePlaneNormal) gluDeleteQuadric(m_quadricSourcePlaneNormal);
if(m_quadricSourcePlaneNormalCap) gluDeleteQuadric(m_quadricSourcePlaneNormalCap);
if(m_quadricLHOv) gluDeleteQuadric(m_quadricLHOv);
if(m_quadricLHOh) gluDeleteQuadric(m_quadricLHOh);
......@@ -137,23 +137,23 @@ void PulsarAnimationWidget::initializeGL()
m_quadricVirgoh = gluNewQuadric();
m_quadricVirgov = gluNewQuadric();
m_quadricPulsarOrbitPlane = gluNewQuadric();
m_quadricPulsar = gluNewQuadric();
m_quadricEarth = gluNewQuadric();
m_quadricLLOh = gluNewQuadric();
m_quadricLLOv = gluNewQuadric();
m_quadricPulsarSpinAxis = gluNewQuadric();
m_quadricPulsarSpinAxisTop1 = gluNewQuadric();
m_quadricSourcePlane = gluNewQuadric();
m_quadricSourcePlaneNormal = gluNewQuadric();
m_quadricSourcePlaneNormalCap = gluNewQuadric();
m_quadricLHOv = gluNewQuadric();
m_quadricLHOh = gluNewQuadric();
gluQuadricNormals(m_quadricVirgoh, GLU_SMOOTH);
gluQuadricNormals(m_quadricVirgov, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsarOrbitPlane, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsar, GLU_SMOOTH);
gluQuadricNormals(m_quadricEarth, GLU_SMOOTH);
gluQuadricNormals(m_quadricLLOh, GLU_SMOOTH);
gluQuadricNormals(m_quadricLLOv, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsarSpinAxis, GLU_SMOOTH);
gluQuadricNormals(m_quadricPulsarSpinAxisTop1, GLU_SMOOTH);
gluQuadricNormals(m_quadricSourcePlane, GLU_SMOOTH);
gluQuadricNormals(m_quadricSourcePlaneNormal, GLU_SMOOTH);
gluQuadricNormals(m_quadricSourcePlaneNormalCap, GLU_SMOOTH);
gluQuadricNormals(m_quadricLHOv, GLU_SMOOTH);
gluQuadricNormals(m_quadricLHOh, GLU_SMOOTH);
......@@ -244,11 +244,11 @@ void PulsarAnimationWidget::paintGL()
glRotatef(180, 1.0, 1.0, 0.0);
// create texture coordinates and enable texturing
gluQuadricTexture(m_quadricPulsar, GL_TRUE);
gluQuadricTexture(m_quadricEarth, GL_TRUE);
glBindTexture(GL_TEXTURE_2D, m_beamTexture);
glEnable(GL_TEXTURE_2D);
gluSphere(m_quadricPulsar, m_pulsarRadius, 32, 32);
gluSphere(m_quadricEarth, m_earthRadius, 32, 32);
}
glPopMatrix();
}
......@@ -260,7 +260,7 @@ void PulsarAnimationWidget::paintGL()
glColor3f(1.0f, 1.0f, 1.0f);
glRotatef(-81, 1.0, 1.0, 0.0);
glTranslatef(0.0, 0.0, m_pulsarRadius);
glTranslatef(0.0, 0.0, m_earthRadius);
glRotatef(m_LHOAngle, 0.0, 0.0, 1.0);
glPushMatrix();
{
......@@ -288,7 +288,7 @@ void PulsarAnimationWidget::paintGL()
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);
glTranslatef(0.0, 0.0, m_earthRadius);
glRotatef(m_LLOAngle, 0.0, 0.0, 1.0);
glPushMatrix();
{
......@@ -315,7 +315,7 @@ void PulsarAnimationWidget::paintGL()
glRotatef(50, 0.0, 1.0, 0.0);
glRotatef(-43, 1.0, 0.0, 0.0);
glTranslatef(0.0, 0.0, m_pulsarRadius);
glTranslatef(0.0, 0.0, m_earthRadius);
glRotatef(m_VirgoAngle, 0.0, 0.0, 1.0);
glPushMatrix();
{
......@@ -348,7 +348,7 @@ void PulsarAnimationWidget::paintGL()
glPushMatrix();
{
glRotatef(m_pulsarSpinAxisInclination, 1.0, 0.0, 0.0);
glRotatef(m_sourceIota, 1.0, 0.0, 0.0);
glRotatef(-45, 1.0, 0.0, 0.0);
// draw source plane normal
......@@ -356,13 +356,13 @@ void PulsarAnimationWidget::paintGL()
glPushMatrix();
{
glTranslatef(0.0, 0.0, -1.0);
gluCylinder(m_quadricPulsarSpinAxis, 0.020, 0.020, 1.5, 32, 1);
gluCylinder(m_quadricSourcePlaneNormal, 0.020, 0.020, 1.5, 32, 1);
}
glPopMatrix();
glPushMatrix();
{
glTranslatef(0.0, 0.0, -1.0);
gluDisk(m_quadricPulsarSpinAxisTop1, 0, 0.020, 32, 8);
gluDisk(m_quadricSourcePlaneNormalCap, 0, 0.020, 32, 8);
}
glPopMatrix();
glPushMatrix();
......@@ -396,7 +396,7 @@ void PulsarAnimationWidget::paintGL()
glPushMatrix();
{
gluDisk(m_quadricPulsarOrbitPlane,
gluDisk(m_quadricSourcePlane,
0,
1.0,
64, 1);
......@@ -540,9 +540,9 @@ void PulsarAnimationWidget::setVirgoAngle(const int degrees)
updateGL();
}
void PulsarAnimationWidget::setPulsarSpinAxisInclination(const int degrees)
void PulsarAnimationWidget::setSourceIota(const int degrees)
{
m_pulsarSpinAxisInclination = degrees;
m_sourceIota = degrees;
updatePulseProfile();
updateGL();
......
......@@ -48,7 +48,7 @@ public:
void setLHOAngle(const double degrees);
void setLLOAngle(const double degrees);
void setVirgoAngle(const int degrees);
void setPulsarSpinAxisInclination(const int degrees);
void setSourceIota(const int degrees);
void setSourceInclination(const double length);
void getCameraPosition(double& cameraAngleH, double& cameraAngleV, double& cameraZoom);
void resetCameraPosition(const double angleH, const double angleV, const double zoom);
......@@ -71,22 +71,22 @@ private:
GLUquadricObj *m_quadricVirgoh;
GLUquadricObj *m_quadricVirgov;
GLUquadricObj *m_quadricPulsarOrbitPlane;
GLUquadricObj *m_quadricPulsar;
GLUquadricObj *m_quadricSourcePlane;
GLUquadricObj *m_quadricEarth;
GLUquadricObj *m_quadricLLOh;
GLUquadricObj *m_quadricLLOv;
GLUquadricObj *m_quadricPulsarSpinAxis;
GLUquadricObj *m_quadricPulsarSpinAxisTop1;
GLUquadricObj *m_quadricSourcePlaneNormal;
GLUquadricObj *m_quadricSourcePlaneNormalCap;
GLUquadricObj *m_quadricLHOv;
GLUquadricObj *m_quadricLHOh;
GLuint m_beamTexture;
double m_pulsarRadius;
double m_earthRadius;
double m_LHOAngle;
double m_LLOAngle;
double m_VirgoAngle;
double m_pulsarSpinAxisInclination;
double m_sourceIota;
double m_sourceInclination;
bool m_cameraInteraction;
......
......@@ -143,7 +143,7 @@ void PulsatingScience::on_sliderVirgoAngle_valueChanged(int value)
void PulsatingScience::on_sliderPulsarSpinAxisInclination_valueChanged(int value)
{
ui.pulsarGlWidget->setPulsarSpinAxisInclination(value);
ui.pulsarGlWidget->setSourceIota(value);
ui.lcdPulsarSpinAxisInclination->display(QString::number(value));
}
......
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