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  

ExCMap.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  * $Id: ExCMap.h,v 1.11 2002/11/19 17:13:26 data Exp $
00021  *
00022  */
00023 
00024 #ifndef __EXMAP_H__
00025 #define __EXMAP_H__
00026 //--------------------------------
00027 // File to include
00028 //--------------------------------
00029 #include "ExDefine.h"
00030 #include "ExMath.h"
00031 #include "ExManagerTexture.h"
00032 #include "ExCGizmoRectangle.h"
00033 #include "ExCFrustum.h"
00034 #include "ExCOctree.h"
00035 #include "ExCObject3D.h"
00036 
00037 //--------------------------------
00038 class ExCMap :public ExCObject3D
00039 {
00040 protected:
00041 //--------------------------------
00042 // Variable
00043 //--------------------------------
00044 
00045         ExManagerTexture                *ManagerTexture;        
00046         
00047         std::vector<ExCVertex> m_VecVertex;
00048         std::vector<ExCVertex>::iterator m_ItVecVertex;
00049         std::vector<ExCMesh> m_VecMesh;
00050         std::vector<ExCMesh>::iterator m_ItVecMesh;
00051         
00052 
00053         long                    m_NumberMesh;
00054         long                    m_NumberVertex;
00055         int                             m_RenderMode;
00056         
00057         GLuint                  m_GlListId;
00058         GLuint                  m_GlSkyBoxListId;
00059 
00060         bool                    m_ShowSkybox;
00061         bool                    m_ShowMesh;
00062         bool                    m_OctreeState;
00063         bool                    m_ShowOctreeSubdivision;
00064 
00065         
00066 
00067         void DrawAllMesh(void);
00068         void DrawMeshInFrustrum(void);
00069         void BuildSkyBox(void);
00070         void BuildOctree(void);
00071         void BuilList(void);
00072         void BuildVertexArrays(void);
00073 
00074 
00075 
00076         //ExCOctree m_Octree;
00077         //ExCFrustum                            Frustrum;
00078 public:
00079 
00080         std::string                     m_STextureBoxNameTop;
00081         std::string                     m_STextureBoxNameBottom;
00082         std::string                     m_STextureBoxNameFront;
00083         std::string                     m_STextureBoxNameBack;
00084         std::string                     m_STextureBoxNameLeft;
00085         std::string                     m_STextureBoxNameRight;
00086 //--------------------------------
00087 // Constructor // Destructor
00088 //--------------------------------
00089         ExCMap(void);
00090         ~ExCMap(void);
00091 //--------------------------------
00092 // Methode
00093 //--------------------------------
00094         inline void ShowSkybox(void){m_ShowSkybox=true;}
00095         inline void HideSkybox(void){m_ShowSkybox=false;}
00096         inline void ShowMesh(void){m_ShowMesh=true;}
00097         inline void HideMesh(void){m_ShowMesh=false;}
00098         inline void EnableOctree(void){m_OctreeState=true;}
00099         inline void DisableOctree(void){m_OctreeState=false;}
00100         inline void ShowOctreeSubdivision(void){m_ShowOctreeSubdivision=true;}
00101         inline void HideOctreeSubdivision(void){m_ShowOctreeSubdivision=false;}
00102 
00103         std::ostrstream *Consol;
00104         void (*WriteToConsol)(const char *Label);
00105 
00106         inline void SetNumberMesh(long NumberMesh){m_NumberMesh=NumberMesh;}
00107 
00108         inline long GetNumberMesh(void){return m_NumberMesh;}
00109         inline int GetRenderMode(void){return m_RenderMode;}
00110         inline GLuint GetGlListId(void){return m_GlListId;}
00111         inline void SetManagerTexture(ExManagerTexture * Texture){ManagerTexture=Texture;}
00112         
00113         bool LoadMap(const char *FileName);
00114         void Draw(void);
00115 
00116 
00117 };
00118 #endif //__EXMAP_H__

Généré le Tue Dec 10 18:18:09 2002 pour ExNihilo par doxygen1.3-rc1