diff options
author | Giles Bathgate <gilesbathgate@gmail.com> | 2011-04-09 06:14:04 (GMT) |
---|---|---|
committer | Giles Bathgate <gilesbathgate@gmail.com> | 2011-04-09 06:14:04 (GMT) |
commit | d3c9e3ad84bdc64aef58b2b4b6417804c040d421 (patch) | |
tree | 16faa06c4a292e776ae45c00985956ac8cf20b0f /src/CGAL_renderer.h | |
parent | a262be69f7420f01427df29f50db4c1f3d304dfc (diff) |
Whoops accidentally removed the code that initialised the colors array.
Diffstat (limited to 'src/CGAL_renderer.h')
-rw-r--r-- | src/CGAL_renderer.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/CGAL_renderer.h b/src/CGAL_renderer.h index b5709b8..a8bdc43 100644 --- a/src/CGAL_renderer.h +++ b/src/CGAL_renderer.h @@ -49,6 +49,7 @@ namespace OGL class Polyhedron : public CGAL::OGL::Polyhedron { public: + enum RenderColor { CGAL_NEF3_MARKED_VERTEX_COLOR, CGAL_NEF3_MARKED_EDGE_COLOR, @@ -59,6 +60,15 @@ public: NUM_COLORS }; + Polyhedron() { + setColor(CGAL_NEF3_MARKED_VERTEX_COLOR,0xb7,0xe8,0x5c); + setColor(CGAL_NEF3_MARKED_EDGE_COLOR,0xab,0xd8,0x56); + setColor(CGAL_NEF3_MARKED_FACET_COLOR,0x9d,0xcb,0x51); + setColor(CGAL_NEF3_UNMARKED_VERTEX_COLOR,0xff,0xf6,0x7c); + setColor(CGAL_NEF3_UNMARKED_EDGE_COLOR,0xff,0xec,0x5e); + setColor(CGAL_NEF3_UNMARKED_FACET_COLOR,0xf9,0xd7,0x2c); + } + void draw(bool showedges) const { if(this->style == SNC_BOUNDARY) { glCallList(this->object_list_+2); @@ -89,7 +99,7 @@ public: } void setColor(Polyhedron::RenderColor color_index, - unsigned char r, unsigned char g, unsigned char b) { + unsigned char r, unsigned char g, unsigned char b) { assert(color_index < Polyhedron::NUM_COLORS); this->colors[color_index] = CGAL::Color(r,g,b); } |