summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2010-09-13 16:40:08 (GMT)
committerMarius Kintel <marius@kintel.net>2010-10-31 00:42:39 (GMT)
commit819ae6d181883767e1bfc46e6860479eed5a3b8c (patch)
tree54db4c3a174b40b92e7cca61dd39de70281fdd88 /src
parent455a8e22c17bcce4b8b6e922981665c38959306c (diff)
bugfix: Matrix initialization state was wrong, made CSGTermRenderer fail
Diffstat (limited to 'src')
-rw-r--r--src/mainwin.cc7
-rw-r--r--src/state.h3
2 files changed, 2 insertions, 8 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 88b7d40..f812ede 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -703,13 +703,6 @@ void MainWindow::compileCSG(bool procevents)
if (procevents)
QApplication::processEvents();
- double m[20];
-
- for (int i = 0; i < 16; i++)
- m[i] = i % 5 == 0 ? 1.0 : 0.0;
- for (int i = 16; i < 20; i++)
- m[i] = -1;
-
// Main CSG evaluation
QTime t;
t.start();
diff --git a/src/state.h b/src/state.h
index 9b9e09d..512586d 100644
--- a/src/state.h
+++ b/src/state.h
@@ -6,7 +6,8 @@ class State
public:
State(const class AbstractNode *parent)
: parentnode(parent), isprefix(false), ispostfix(false), numchildren(0) {
- for (int i=0;i<20;i++) this->m[i] = 0.0;
+ for (int i=0;i<16;i++) this->m[i] = i % 5 == 0 ? 1.0 : 0.0;
+ for (int i=16;i<20;i++) this->m[i] = -1.0;
}
virtual ~State() {}
contact: Jan Huwald // Impressum