Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Membres des namespaces | Composants | Déclarations

ExCGizmoRectangle.cpp

Aller à la documentation de ce fichier.
00001 /*
00002  * ExNihilo 3D Engine
00003  * 
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  *
00018  * Please read AUTHORS file !!!
00019  * 
00020  * $Id: ExCGizmoRectangle.cpp,v 1.5 2002/08/14 15:40:05 data Exp $
00021  *
00022  */
00023 
00024 #include "ExCGizmoRectangle.h"
00025 
00026 ExCGizmoRectangle::ExCGizmoRectangle(void)
00027 {
00028 Guard(ExCGizmoRectangle::ExCGizmoRectangle(void))
00029         SetName("ExCGizmoRectangle");
00030         SetType(typeid(this).name());
00031         m_Vertex[0]=ExCVec3D(-10.0f,-10.0f,-10.0f);
00032         m_Vertex[1]=ExCVec3D(-10.0f,-10.0f,10.0f);
00033         m_Vertex[2]=ExCVec3D(-10.0f,10.0f,10.0f);
00034         m_Vertex[3]=ExCVec3D(-10.0f,10.0f,-10.0f);
00035         m_Vertex[4]=ExCVec3D(10.0f,10.0f,-10.0f);
00036         m_Vertex[5]=ExCVec3D(10.0f,10.0f,10.0f);
00037         m_Vertex[6]=ExCVec3D(10.0f,-10.0f,10.0f);
00038         m_Vertex[7]=ExCVec3D(10.0f,-10.0f,-10.0f);
00039 UnGuard
00040 }
00041 
00042 ExCGizmoRectangle::~ExCGizmoRectangle(void)
00043 {
00044 Guard(ExCGizmoRectangle::~ExCGizmoRectangle(void))
00045 UnGuard
00046 }
00047 
00048 void ExCGizmoRectangle::Draw(void)
00049 {
00050 Guard(void ExCGizmoRectangle::Draw(void))
00051         
00052         glDisable(GL_LIGHTING);
00053         glBegin(GL_LINE_LOOP);
00054                 //upper face
00055                 glVertex3f(m_Vertex[0].GetX(),m_Vertex[0].GetY(),m_Vertex[0].GetZ());
00056                 glVertex3f(m_Vertex[1].GetX(),m_Vertex[1].GetY(),m_Vertex[1].GetZ());
00057                 glVertex3f(m_Vertex[2].GetX(),m_Vertex[2].GetY(),m_Vertex[2].GetZ());
00058                 glVertex3f(m_Vertex[3].GetX(),m_Vertex[3].GetY(),m_Vertex[3].GetZ());
00059         glEnd();
00060         glBegin(GL_LINE_LOOP);
00061                 //down face
00062             glVertex3f(m_Vertex[4].GetX(),m_Vertex[4].GetY(),m_Vertex[4].GetZ());
00063                 glVertex3f(m_Vertex[5].GetX(),m_Vertex[5].GetY(),m_Vertex[5].GetZ());
00064                 glVertex3f(m_Vertex[6].GetX(),m_Vertex[6].GetY(),m_Vertex[6].GetZ());
00065                 glVertex3f(m_Vertex[7].GetX(),m_Vertex[7].GetY(),m_Vertex[7].GetZ());
00066         glEnd();
00067         glBegin(GL_LINES);
00068                 //4 line for 4 face
00069                 glVertex3f(m_Vertex[1].GetX(),m_Vertex[1].GetY(),m_Vertex[1].GetZ());
00070                 glVertex3f(m_Vertex[6].GetX(),m_Vertex[6].GetY(),m_Vertex[6].GetZ());
00071                 glVertex3f(m_Vertex[2].GetX(),m_Vertex[2].GetY(),m_Vertex[2].GetZ());
00072                 glVertex3f(m_Vertex[5].GetX(),m_Vertex[5].GetY(),m_Vertex[5].GetZ());
00073                 
00074                 glVertex3f(m_Vertex[0].GetX(),m_Vertex[0].GetY(),m_Vertex[0].GetZ());
00075                 glVertex3f(m_Vertex[7].GetX(),m_Vertex[7].GetY(),m_Vertex[7].GetZ());
00076                 glVertex3f(m_Vertex[3].GetX(),m_Vertex[3].GetY(),m_Vertex[3].GetZ());
00077                 glVertex3f(m_Vertex[4].GetX(),m_Vertex[4].GetY(),m_Vertex[4].GetZ());
00078         glEnd();
00079 UnGuard
00080 }

Généré le Tue Oct 28 12:43:30 2003 pour ExNihilo par doxygen 1.3.4