diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-10-14 02:07:23 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-10-14 02:07:23 (GMT) |
commit | 354ce0d5c8129ddfabfb137000c93a9d67983d85 (patch) | |
tree | 7b04913c0da074ff000193ea0a391c2b311980d4 /mainwin.cc | |
parent | f52fdc4f4da751a4c0f715b8f9f2e631a961129b (diff) |
Clifford Wolf:
Added advanced camera handling and crosshairs
git-svn-id: http://svn.clifford.at/openscad/trunk@98 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'mainwin.cc')
-rw-r--r-- | mainwin.cc | 42 |
1 files changed, 39 insertions, 3 deletions
@@ -163,6 +163,8 @@ MainWindow::MainWindow(const char *filename) actViewModeShowEdges->setCheckable(true); actViewModeShowAxis = menu->addAction("Show Axis", this, SLOT(viewModeShowAxis())); actViewModeShowAxis->setCheckable(true); + actViewModeShowCrosshairs = menu->addAction("Show Crosshairs", this, SLOT(viewModeShowCrosshairs())); + actViewModeShowCrosshairs->setCheckable(true); actViewModeAnimate = menu->addAction("Animate", this, SLOT(viewModeAnimate())); actViewModeAnimate->setCheckable(true); @@ -1134,6 +1136,12 @@ void MainWindow::viewModeShowAxis() screen->updateGL(); } +void MainWindow::viewModeShowCrosshairs() +{ + screen->showcrosshairs = actViewModeShowCrosshairs->isChecked(); + screen->updateGL(); +} + void MainWindow::viewModeAnimate() { if (actViewModeAnimate->isChecked()) { @@ -1147,50 +1155,78 @@ void MainWindow::viewModeAnimate() void MainWindow::viewAngleTop() { - screen->object_rot_y = 90; + screen->object_rot_x = 90; + screen->object_rot_y = 0; screen->object_rot_z = 0; + screen->object_trans_x = 0; + screen->object_trans_y = 0; + screen->object_trans_z = 0; screen->updateGL(); } void MainWindow::viewAngleBottom() { - screen->object_rot_y = 270; + screen->object_rot_x = 270; + screen->object_rot_y = 0; screen->object_rot_z = 0; + screen->object_trans_x = 0; + screen->object_trans_y = 0; + screen->object_trans_z = 0; screen->updateGL(); } void MainWindow::viewAngleLeft() { + screen->object_rot_x = 0; screen->object_rot_y = 0; screen->object_rot_z = 90; + screen->object_trans_x = 0; + screen->object_trans_y = 0; + screen->object_trans_z = 0; screen->updateGL(); } void MainWindow::viewAngleRight() { + screen->object_rot_x = 0; screen->object_rot_y = 0; screen->object_rot_z = 270; + screen->object_trans_x = 0; + screen->object_trans_y = 0; + screen->object_trans_z = 0; screen->updateGL(); } void MainWindow::viewAngleFront() { + screen->object_rot_x = 0; screen->object_rot_y = 0; screen->object_rot_z = 0; + screen->object_trans_x = 0; + screen->object_trans_y = 0; + screen->object_trans_z = 0; screen->updateGL(); } void MainWindow::viewAngleBack() { + screen->object_rot_x = 0; screen->object_rot_y = 0; screen->object_rot_z = 180; + screen->object_trans_x = 0; + screen->object_trans_y = 0; + screen->object_trans_z = 0; screen->updateGL(); } void MainWindow::viewAngleDiagonal() { - screen->object_rot_y = 35; + screen->object_rot_x = 35; + screen->object_rot_y = 0; screen->object_rot_z = 25; + screen->object_trans_x = 0; + screen->object_trans_y = 0; + screen->object_trans_z = 0; screen->updateGL(); } |