home *** CD-ROM | disk | FTP | other *** search
- /*
- * FILE: cube.h
- * AUTHOR: R. Gonzalez
- * CREATED: October 6, 1990
- *
- * Defines cube for picture application.
- */
-
- # ifndef cube_h
- # define cube_h
-
- # include "segment.h"
- # include "color.h"
-
- /******************************************************************
- * cube. Nested segment consisting of 12 lines.
- ******************************************************************/
- struct Cube:Nested_Segment
- {
- boolean init(void);
- };
-
- /******************************************************************
- * fast cube. Not a nested segment. Faster because you only
- * calculate perspective projection for each line endpoint once.
- ******************************************************************/
- struct Fast_Cube:Segment
- {
- Coord3 *c[8];
- color cube_color;
-
- boolean init(void);
- /* not implemented:
- virtual void set(...);
- */
- void set_color(color);
- void draw(Camera*,Projector*,Transformation*);
- void move(Transformation*);
- boolean destroy(void);
- };
-
- # endif