summaryrefslogtreecommitdiff
path: root/src/polyset.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/polyset.cc
parent85948590ee0c6a353502c5493ecaf45730e08984 (diff)
Rewrote some hard to read linear algebra code to use Eigen
Diffstat (limited to 'src/polyset.cc')
-rw-r--r--src/polyset.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/polyset.cc b/src/polyset.cc
index ec0cdf9..1d31005 100644
--- a/src/polyset.cc
+++ b/src/polyset.cc
@@ -31,7 +31,7 @@
#include <CGAL/assertions_behaviour.h>
#include <CGAL/exceptions.h>
#endif
-#include <Eigen/Core>
+#include "linalg.h"
#include <Eigen/LU>
#include <QColor>
@@ -112,13 +112,9 @@ static void gl_draw_triangle(GLint *shaderinfo, const Vector3d &p0, const Vector
}
}
-void PolySet::render_surface(colormode_e colormode, csgmode_e csgmode, double *m, GLint *shaderinfo) const
+void PolySet::render_surface(colormode_e colormode, csgmode_e csgmode, const Transform3d &m, GLint *shaderinfo) const
{
- Eigen::Matrix3f m3f;
- m3f << m[0], m[4], m[8],
- m[1], m[5], m[9],
- m[2], m[6], m[10];
- bool mirrored = m3f.determinant() < 0;
+ bool mirrored = m.matrix().determinant() < 0;
if (colormode == COLORMODE_MATERIAL) {
// FIXME: Reenable/rewrite - don't be dependant on GUI
contact: Jan Huwald // Impressum