arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

GLSurfaceWidget.cpp

Go to the documentation of this file.
00001 //------------------------------------------------------------------------
00002 //
00003 //   Joe Kniss
00004 //     9-15-03
00005 //                   ________    ____   ___ 
00006 //                  |        \  /    | /  /
00007 //                  +---+     \/     |/  /
00008 //                  +--+|  |\    /|     < 
00009 //                  |  ||  | \  / |  |\  \ 
00010 //                  |      |  \/  |  | \  \ 
00011 //                   \_____|      |__|  \__\
00012 //                       Copyright  2003 
00013 //                      Joe Michael Kniss
00014 //                   <<< jmk@cs.utah.edu >>>
00015 //               "All Your Base are Belong to Us"
00016 //-------------------------------------------------------------------------
00017 
00018 // GLSurfaceWidget.cpp
00019 
00020 #include "GLSurfaceWidget.h"
00021 #include <GL/glew.h>
00022 
00023 using namespace gutz;
00024 
00025 void GLSurfaceWidget::drawQuad()
00026 {
00027    glPushName(RENDERABLE_NAME);
00028    glPushName((unsigned int)(Renderable*)this);
00029 
00030    glColor3f(1,0,0);
00031    _gluitem.drawSphere(_lastPick, .02f);
00032 
00033    vec3f n = getPlane().n;
00034    n.normalize();
00035    glNormal3f( n.x, n.y, n.z );
00036 
00037    glColor3ub(171,207,229);
00038    glPushMatrix();
00039    {
00040       glMultMatrixf( _manip->getWorldTransform().m );
00041    
00042       glBegin(GL_QUADS);
00043       {
00044          glVertex3f( _corners[LL].x, _corners[LL].y, _corners[LL].z );
00045          glVertex3f( _corners[LR].x, _corners[LR].y, _corners[LR].z);
00046          glVertex3f( _corners[UR].x, _corners[UR].y, _corners[UR].z);
00047          glVertex3f( _corners[UL].x, _corners[UL].y, _corners[UL].z);
00048       }
00049       glEnd();
00050    }
00051    glPopMatrix();
00052    
00053    glPopName();
00054    glPopName();
00055 }

Send questions, comments, and bug reports to:
jmk