Main Page Namespace List Class Hierarchy Alphabetical List Data Structures File List Namespace Members Data Fields Globals

# ExCGizmoRectangle.cpp

Go to the documentation of this file.

    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 UnGuard
    00032 }
    00033
    00034 ExCGizmoRectangle::~ExCGizmoRectangle(void)
    00035 {
    00036 Guard(ExCGizmoRectangle::~ExCGizmoRectangle(void))
    00037 UnGuard
    00038 }
    00039
    00040 void ExCGizmoRectangle::Draw(void)
    00041 {
    00042 Guard(void ExCGizmoRectangle::Draw(void))
    00043
    00044         glDisable(GL_LIGHTING);
    00045         glBegin(GL_LINE_LOOP);
    00046                 //upper face
    00047                 glVertex3f(m_Vertex[0].GetX(),m_Vertex[0].GetY(),m_Vertex[0].GetZ());
    00048                 glVertex3f(m_Vertex[1].GetX(),m_Vertex[1].GetY(),m_Vertex[1].GetZ());
    00049                 glVertex3f(m_Vertex[2].GetX(),m_Vertex[2].GetY(),m_Vertex[2].GetZ());
    00050                 glVertex3f(m_Vertex[3].GetX(),m_Vertex[3].GetY(),m_Vertex[3].GetZ());
    00051         glEnd();
    00052         glBegin(GL_LINE_LOOP);
    00053                 //down face
    00054             glVertex3f(m_Vertex[4].GetX(),m_Vertex[4].GetY(),m_Vertex[4].GetZ());
    00055                 glVertex3f(m_Vertex[5].GetX(),m_Vertex[5].GetY(),m_Vertex[5].GetZ());
    00056                 glVertex3f(m_Vertex[6].GetX(),m_Vertex[6].GetY(),m_Vertex[6].GetZ());
    00057                 glVertex3f(m_Vertex[7].GetX(),m_Vertex[7].GetY(),m_Vertex[7].GetZ());
    00058         glEnd();
    00059         glBegin(GL_LINES);
    00060                 //4 line for 4 face
    00061                 glVertex3f(m_Vertex[0].GetX(),m_Vertex[0].GetY(),m_Vertex[0].GetZ());
    00062                 glVertex3f(m_Vertex[4].GetX(),m_Vertex[4].GetY(),m_Vertex[4].GetZ());
    00063                 glVertex3f(m_Vertex[1].GetX(),m_Vertex[1].GetY(),m_Vertex[1].GetZ());
    00064                 glVertex3f(m_Vertex[5].GetX(),m_Vertex[5].GetY(),m_Vertex[5].GetZ());
    00065                 glVertex3f(m_Vertex[2].GetX(),m_Vertex[2].GetY(),m_Vertex[2].GetZ());
    00066                 glVertex3f(m_Vertex[6].GetX(),m_Vertex[6].GetY(),m_Vertex[6].GetZ());
    00067                 glVertex3f(m_Vertex[7].GetX(),m_Vertex[7].GetY(),m_Vertex[7].GetZ());
    00068                 glVertex3f(m_Vertex[3].GetX(),m_Vertex[3].GetY(),m_Vertex[3].GetZ());
    00069         glEnd();
    00070 UnGuard
    00071 }