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

TFSurfaceWidget.cpp

Go to the documentation of this file.
00001 //------------------------------------------------------------------------
00002 //
00003 //   Joe Kniss
00004 //     9-01-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 // TFSurfaceWidget.cpp
00019 
00020 #include "TFSurfaceWidget.h"
00021 #include <GL/glew.h>
00022 
00023 using namespace gutz;
00024 
00025 TFSurfaceWidget::TFSurfaceWidget()
00026 : SurfaceWidget(0,0,false)
00027 {
00028 
00029 }
00030 
00031 
00032 
00033 ////////////////////////////////////////////////////////////////////////
00034 ////////////////////////////////////////////////////////////////////////
00035 // GLTFSurfaceWidget implementation:
00036 ////////////////////////////////////////////////////////////////////////
00037 ////////////////////////////////////////////////////////////////////////
00038 
00039 ////////////////////////////////////////////////////////////////////////
00040 // drawDef()
00041 ////////////////////////////////////////////////////////////////////////
00042 void GLTFSurfaceWidget::drawDef(const gutz::RenderEvent &r)
00043 {
00044    /// implementation (initially) copied from GLSurfaceWidget
00045    glPushName(RENDERABLE_NAME);
00046    glPushName((unsigned int)(Renderable*)this);
00047 
00048    vec3f n = getPlane().n;
00049    n.normalize();
00050 
00051    glNormal3f( n.x, n.y, n.z );
00052    glBegin(GL_QUADS);
00053    {
00054       glVertex3f( _corners[LL].x, _corners[LL].y, _corners[LL].z );
00055       glVertex3f( _corners[LR].x, _corners[LR].y, _corners[LR].z);
00056       glVertex3f( _corners[UR].x, _corners[UR].y, _corners[UR].z);
00057       glVertex3f( _corners[UL].x, _corners[UL].y, _corners[UL].z);
00058    }
00059    glEnd();
00060 
00061    glPopName();
00062    glPopName();
00063 }
00064 
00065 

Send questions, comments, and bug reports to:
jmk