Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

glt/zplane.cpp

Go to the documentation of this file.
00001 #include "zplane.h"
00002 
00015 #include <glt/viewport.h>
00016 #include <math/real.h>
00017 
00018 void 
00019 drawZat(const GLdouble z)
00020 {
00021     glPushAttrib(GL_ENABLE_BIT);
00022 
00023         glDisable(GL_LIGHTING);
00024 
00025         GltViewport viewport(true);
00026 
00027         glMatrixMode(GL_PROJECTION);
00028         glPushMatrix();
00029         glLoadIdentity();
00030         glOrtho(0,viewport.width(),0,viewport.height(),0,1);
00031 
00032         glMatrixMode(GL_MODELVIEW);
00033         glPushMatrix();
00034         glLoadIdentity();
00035 
00036         glTranslated(0,0,-CLAMP(z,0.0,1.0));
00037         viewport.drawQuad();
00038 
00039         glPopMatrix();
00040         glMatrixMode(GL_PROJECTION);
00041         glPopMatrix();
00042         glMatrixMode(GL_MODELVIEW);
00043 
00044     glPopAttrib();
00045 }
00046 
00047 void 
00048 drawZnear()
00049 {
00050     drawZat(0.0);
00051 }
00052 
00053 void 
00054 drawZfar()
00055 {
00056     drawZat(1.0);
00057 }
00058 

Generated on Tue Nov 5 11:11:04 2002 for GLT by doxygen1.2.18