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

# ExCModelASC.h

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
    00021  *
    00022  */
    00023
    00024 #ifndef __EXCMODELASC_H__
    00025 #define __EXCMODELASC_H__
    00026 //--------------------------------
    00027 // File to include
    00028 //--------------------------------
    00029 #include "ExDefine.h"
    00030 #include "ExMath.h"
    00031 #include "ExCModel.h"
    00032 //--------------------------------
    00033 class ExCModelASC : public ExCModel
    00034 {
    00035 protected:
    00036 //--------------------------------
    00037 // Variable
    00038 //--------------------------------
    00039 struct MeshAsc
    00040 {
    00041         ExCVec3D VecAB,VecBC,VecCA;
    00042         ExCVec2D VecTAB,VecTBC,VecTCA;
    00043         std::string                     m_Material;
    00044 };
    00045
    00046
    00047 struct ObjAsc
    00048 {
    00049         std::vector<ExCVec3D >  m_VecVertex;
    00050         std::vector<ExCVec2D >  m_VecTexture;
    00051         std::vector<ExCVec3D >  m_VecFace;
    00052         std::string                             m_Texture;
    00053         std::string                             m_ObjectName;
    00054         int                                             m_Smoothing;
    00055
    00056         ExCVec3D                                m_BoxPoint[8];
    00057 };
    00058
    00059         GLuint                                  m_ListId;
    00060         ExCVec3D                                m_AmbiantLight;
    00061         int                                             m_NumberObject;
    00062         std::vector<ObjAsc>             m_VecObject;
    00063         std::vector<MeshAsc >   m_VecMesh;
    00064 //--------------------------------
    00065 // Methode
    00066 //--------------------------------
    00067         void BuildList(int Rendu);
    00068
    00069 public:
    00070 //--------------------------------
    00071 // Constructor // Destructor
    00072 //--------------------------------
    00073         ExCModelASC(void);
    00074         ExCModelASC(std::string FileName);
    00075         ~ExCModelASC(void);
    00076 //--------------------------------
    00077 // Methode
    00078 //--------------------------------
    00079         void Draw(void);
    00080         void ProcessLine(std::string Line);
    00081         bool LoadFile(std::string FileName);
    00082 };
    00083 #endif //__EXCMODELASC_H__