summaryrefslogtreecommitdiff
path: root/src/glview.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/glview.cc')
-rw-r--r--src/glview.cc45
1 files changed, 27 insertions, 18 deletions
diff --git a/src/glview.cc b/src/glview.cc
index 9d82443..896ff0a 100644
--- a/src/glview.cc
+++ b/src/glview.cc
@@ -50,32 +50,42 @@
GLView::GLView(QWidget *parent) : QGLWidget(parent), renderer(NULL)
{
- viewer_distance = 500;
- object_rot_x = 35;
- object_rot_y = 0;
- object_rot_z = 25;
- object_trans_x = 0;
- object_trans_y = 0;
- object_trans_z = 0;
+ init();
+}
- mouse_drag_active = false;
+GLView::GLView(const QGLFormat & format, QWidget *parent) : QGLWidget(format, parent)
+{
+ init();
+}
- orthomode = false;
- showaxes = false;
- showcrosshairs = false;
- showedges = false;
- showfaces = true;
+void GLView::init()
+{
+ this->viewer_distance = 500;
+ this->object_rot_x = 35;
+ this->object_rot_y = 0;
+ this->object_rot_z = 25;
+ this->object_trans_x = 0;
+ this->object_trans_y = 0;
+ this->object_trans_z = 0;
+
+ this->mouse_drag_active = false;
+
+ this->showedges = false;
+ this->showfaces = true;
+ this->orthomode = false;
+ this->showaxes = false;
+ this->showcrosshairs = false;
for (int i = 0; i < 10; i++)
- shaderinfo[i] = 0;
+ this->shaderinfo[i] = 0;
- statusLabel = NULL;
+ this->statusLabel = NULL;
setMouseTracking(true);
#ifdef ENABLE_OPENCSG
- opencsg_support = true;
+ this->opencsg_support = true;
static int sId = 0;
- opencsg_id = sId++;
+ this->opencsg_id = sId++;
#endif
}
@@ -527,4 +537,3 @@ void GLView::mouseReleaseEvent(QMouseEvent*)
mouse_drag_active = false;
releaseMouse();
}
-
contact: Jan Huwald // Impressum