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

ExCMesh.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: ExCMesh.cpp,v 1.5 2002/07/01 09:23:36 data Exp $
00021  *
00022  */
00023 
00024 #include "ExCMesh.h"
00025 
00026 ExCMesh::ExCMesh(void)
00027 {
00028         m_AB=0;
00029         m_BC=0;
00030         m_CA=0;
00031         m_Smoothing=0;
00032         m_Material = new char[strlen("NONE")];
00033         sprintf(m_Material,"NONE");
00034         m_MeshNumber=0;
00035 }
00036 
00037 ExCMesh::ExCMesh(ExCVertex  a,ExCVertex  b,ExCVertex  c)
00038 {
00039         SetVertex(a,b,c);
00040 }
00041 
00042 ExCMesh::~ExCMesh(void)
00043 {
00044 
00045 }
00046 
00047 void ExCMesh::SetMaterial(const char *Material)
00048 {
00049 Guard(void ExCMesh::SetMaterial(char *Material));
00050         m_Material = new char[strlen(Material)];
00051         sprintf(m_Material,Material);
00052 UnGuard
00053 }
00054 
00055 void ExCMesh::SetVertex(ExCVertex  a,ExCVertex  b,ExCVertex  c)
00056 {
00057 Guard(void ExCMesh::SetVertex(ExCVertex  a,ExCVertex  b,ExCVertex  c))
00058         A=a;
00059         B=b;
00060         C=c;
00061 UnGuard
00062 }
00063 
00064 void ExCMesh::Affich(void)
00065 {
00066         std::cout<<"Mesh "<<m_MeshNumber<<":   AB :"<<m_AB<<" BC:"<<m_BC<<" CA:"<<m_CA<<std::endl;
00067         std::cout<<"Material:"<<m_Material<<std::endl;
00068         std::cout<<"Smoothing:"<<m_Smoothing<<std::endl;
00069 }

Généré le Tue Aug 6 20:25:25 2002 pour ExNihilo par doxygen1.2.17