proj home

Files   Classes   Functions   Hierarchy  

cubedraw Class Reference

Interface for generic cube drawing class. More...

#include <cubedraw.h>

Inheritance diagram for cubedraw:
Collaboration diagram for cubedraw:

List of all members.

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.


Detailed Description

Interface for generic cube drawing class.

Definition at line 12 of file cubedraw.h.


Constructor & Destructor Documentation

cubedraw::cubedraw ( cube const &  cb_  ) 

Derived classes draw this cube.

Definition at line 4 of file cubedraw.cpp.

00005   : cb(cb_) {}


Member Function Documentation

void cubedraw::colorset ( uintc  index  )  const [inline]

Definition at line 25 of file cubedraw.h.

References cb, colorset(), and cube::xi.

Referenced by colorset().

00026     { colorset(cb.xi[index]); }

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.

00028 {}


Member Data Documentation

The cube being draw.

Definition at line 17 of file cubedraw.h.

Referenced by colorset(), cubedraw3d::draw(), and cubedraw2d::draw().


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:49:52 2011 for Chelton Evans Source by  doxygen 1.5.8