/* Gowun Kim CS307 Fall 2005 Demo of Table object */ #include #include // #include "gkim1.cc" // will be changed to #include const GLfloat R = 6.0; // radius of the table surface, here used to set up bounding box const GLfloat H = 21.0; // height, for setting up bounding box // radius of the table round top surface const GLfloat surfaceBaseRadius = R; // colors chosen the table object in this particular scene twTriple surfaceColor = {204.0/255.0, 153.0/255.0, 102.0/255.0}; // similar to tan twTriple barColor = {255.0/255.0, 255.0/255.0, 204.0/255.0}; // very light yellow twTriple smallBarColor = {125.0/255.0, 125.0/255.0, 125.0/255.0}; // light gray twTriple baseColor = {95.0/255.0, 95.0/255.0, 95.0/255.0}; // dark gray void display(void) { twDisplayInit(); twCamera(); // sets up camera based on bounding box coordinates // draw the imported object - tall table gkim1DrawTable(surfaceColor, barColor, smallBarColor, baseColor); glFlush(); glutSwapBuffers(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); twInitWindowSize(500,500); glutCreateWindow(argv[0]); glutDisplayFunc(display); // create bounding box according to min/max of the coordinates twBoundingBox(-R,R,0,H,-R,R); twMainInit(); glutMainLoop(); return 0; }