summaryrefslogtreecommitdiff
path: root/src/CSGTermEvaluator.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-10-04 01:41:43 (GMT)
committerMarius Kintel <marius@kintel.net>2011-10-04 01:41:43 (GMT)
commitf5e0f3a531b0c8806e4ebc62cd91ca31275ae481 (patch)
tree98992f8b4f632ab8e29175eb362f4d3e03e06da3 /src/CSGTermEvaluator.cc
parent85948590ee0c6a353502c5493ecaf45730e08984 (diff)
Rewrote some hard to read linear algebra code to use Eigen
Diffstat (limited to 'src/CSGTermEvaluator.cc')
-rw-r--r--src/CSGTermEvaluator.cc13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/CSGTermEvaluator.cc b/src/CSGTermEvaluator.cc
index 2467c05..d1af987 100644
--- a/src/CSGTermEvaluator.cc
+++ b/src/CSGTermEvaluator.cc
@@ -147,18 +147,7 @@ Response CSGTermEvaluator::visit(State &state, const CsgNode &node)
Response CSGTermEvaluator::visit(State &state, const TransformNode &node)
{
if (state.isPrefix()) {
- double m[16];
-
- for (int i = 0; i < 16; i++)
- {
- int c_row = i%4;
- int m_col = i/4;
- m[i] = 0;
- for (int j = 0; j < 4; j++) {
- m[i] += state.matrix()[c_row + j*4] * node.matrix[m_col*4 + j];
- }
- }
- state.setMatrix(m);
+ state.setMatrix(state.matrix() * node.matrix);
}
if (state.isPostfix()) {
applyToChildren(node, CSGT_UNION);
contact: Jan Huwald // Impressum