summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CGAL_renderer.h11
-rw-r--r--src/mainwin.cc6
2 files changed, 6 insertions, 11 deletions
diff --git a/src/CGAL_renderer.h b/src/CGAL_renderer.h
index f8b41bd..a2b3b72 100644
--- a/src/CGAL_renderer.h
+++ b/src/CGAL_renderer.h
@@ -88,20 +88,15 @@ public:
CGAL::Color c = f->mark() ? colors[CGAL_NEF3_UNMARKED_FACET_COLOR] : colors[CGAL_NEF3_MARKED_FACET_COLOR];
return c;
}
-};
-template<typename Nef_polyhedron>
-class Nef3_Converter : public CGAL::OGL::Nef3_Converter<Nef_polyhedron>
-{
-public:
- static void setColor(Polyhedron* p, Polyhedron::RenderColor color_index,
+ void setColor(Polyhedron::RenderColor color_index,
unsigned char r, unsigned char g, unsigned char b) {
assert(color_index < Polyhedron::NUM_COLORS);
- p->colors[color_index] = CGAL::Color(r,g,b);
+ this->colors[color_index] = CGAL::Color(r,g,b);
}
-}; // Nef3_Converter
+}; // Polyhedron
} // namespace OGL
diff --git a/src/mainwin.cc b/src/mainwin.cc
index d3df908..24136bf 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -78,7 +78,7 @@
#if 1
#include "CGAL_renderer.h"
using OpenSCAD::OGL::Polyhedron;
-using OpenSCAD::OGL::Nef3_Converter;
+using CGAL::OGL::Nef3_Converter;
#else
// a little hackish: we need access to default-private members of
// CGAL::OGL::Nef3_Converter so we can implement our own draw function
@@ -1493,11 +1493,11 @@ static void renderGLviaCGAL(void *vp)
Polyhedron *p = (Polyhedron*)m->cgal_ogl_p;
if (!p) {
m->cgal_ogl_p = p = new Polyhedron();
- Nef3_Converter<CGAL_Nef_polyhedron3>::setColor(p,Polyhedron::CGAL_NEF3_MARKED_FACET_COLOR,
+ p->setColor(Polyhedron::CGAL_NEF3_MARKED_FACET_COLOR,
Preferences::inst()->color(Preferences::CGAL_FACE_BACK_COLOR).red(),
Preferences::inst()->color(Preferences::CGAL_FACE_BACK_COLOR).green(),
Preferences::inst()->color(Preferences::CGAL_FACE_BACK_COLOR).blue());
- Nef3_Converter<CGAL_Nef_polyhedron3>::setColor(p,Polyhedron::CGAL_NEF3_UNMARKED_FACET_COLOR,
+ p->setColor(Polyhedron::CGAL_NEF3_UNMARKED_FACET_COLOR,
Preferences::inst()->color(Preferences::CGAL_FACE_FRONT_COLOR).red(),
Preferences::inst()->color(Preferences::CGAL_FACE_FRONT_COLOR).green(),
Preferences::inst()->color(Preferences::CGAL_FACE_FRONT_COLOR).blue());
contact: Jan Huwald // Impressum