Files Classes Functions Hierarchy
#include <cubedraw.h>
Public Member Functions | |
| cubedraw (cube const &cb_) | |
| Derived classes draw this cube. | |
| void | colorset (cube::colordef const c) const |
| Write glColor3f associated with the color. | |
| void | colorset (uintc index) const |
| void | draw () |
| Draw the object. | |
Public Attributes | |
| cube const & | cb |
| The cube being draw. | |
Definition at line 12 of file cubedraw.h.
| cubedraw::cubedraw | ( | cube const & | cb_ | ) |
| void cubedraw::colorset | ( | uintc | index | ) | const [inline] |
Definition at line 25 of file cubedraw.h.
References cb, colorset(), and cube::xi.
Referenced by colorset().
| void cubedraw::colorset | ( | cube::colordef const | c | ) | const |
Write glColor3f associated with the color.
Definition at line 7 of file cubedraw.cpp.
References cube::blue, cube::green, cube::orange, cube::red, cube::white, and cube::yellow.
00008 { 00009 switch(c) 00010 { 00011 case cube::red: glColor3f(1.0,0.0,0.0); break; 00012 case cube::blue: glColor3f(0.0,0.0,1.0); break; 00013 case cube::orange: glColor3f(1.0,145./256.,0.0); break; 00014 case cube::green: glColor3f(0.0,1.0,0.0); break; 00015 case cube::yellow: glColor3f(1.0,1.0,0.0); break; 00016 case cube::white: glColor3f(1.0,1.0,1.0); break; 00017 } 00018 }
| void cubedraw::draw | ( | ) | [inline, virtual] |
Draw the object.
Implements gobj.
Reimplemented in cubedraw3d.
Definition at line 28 of file cubedraw.h.
| cube const& cubedraw::cb |
The cube being draw.
Definition at line 17 of file cubedraw.h.
Referenced by colorset(), cubedraw3d::draw(), and cubedraw2d::draw().
1.5.8