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: ExCEntite.h,v 1.4 2002/06/16 00:51:04 binny Exp $ 00021 * 00022 */ 00023 00024 #ifndef __EXCENTITE_H__ 00025 #define __EXCENTITE_H__ 00026 //-------------------------------- 00027 // File to include 00028 //-------------------------------- 00029 #include "ExDefine.h" 00030 #include "ExMath.h" 00031 #include "ExCObject.h" 00032 #include "ExCGizmoRectangle.h" 00033 //-------------------------------- 00034 class ExCEntite : public ExCObject 00035 { 00036 protected: 00037 //-------------------------------- 00038 // Variable 00039 //-------------------------------- 00040 std::vector<ExCVertex> m_VecVertex; 00041 std::vector<ExCVertex>::iterator m_ItVecVertex; 00042 std::vector<ExCMesh> m_VecMesh; 00043 std::vector<ExCMesh>::iterator m_ItVecMesh; 00044 00045 long m_NumberVertex; 00046 long m_NumberMesh; 00047 int m_RenderMode; 00048 GLuint m_GlListId; 00049 00050 00051 //-------------------------------- 00052 // Methode 00053 //-------------------------------- 00054 00055 public: 00056 ExCGizmoRectangle m_BoxPvs; 00057 //-------------------------------- 00058 // Constructor // Destructor 00059 //-------------------------------- 00060 ExCEntite(void); 00061 ~ExCEntite(void); 00062 //-------------------------------- 00063 // Methode 00064 //-------------------------------- 00065 inline void SetNumberVertex(long NumberVertex){m_NumberVertex=NumberVertex;} 00066 inline void SetNumberMesh(long NumberMesh){m_NumberMesh=NumberMesh;} 00067 00068 inline long GetNumberVertex(void){return m_NumberVertex;} 00069 inline long GetNumberMesh(void){return m_NumberMesh;} 00070 inline int GetRenderMode(void){return m_RenderMode;} 00071 inline GLuint GetGlListId(void){return m_GlListId;} 00072 00073 virtual void Draw(void); 00074 void DrawWithoutList(void); 00075 virtual bool LoadAsc(char *FileName); 00076 virtual void MakeList(void); 00077 virtual void SetRenderMode(int RenderMode); 00078 00079 void AddVertex(ExCVertex Vertex); 00080 void AddMesh(ExCMesh Mesh); 00081 ExCVertex GetVertex(int pos); 00082 00083 void BuildPvsBox(void); 00084 }; 00085 #endif //__EXCENTITE_H__