Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

modelloader.h

00001 /***************************************************************************
00002                         modelloader.h  -  description
00003                             -------------------
00004     begin                : sam mai 22 2004
00005     copyright            : (C) 2004-2006 by Duong-Khang NGUYEN
00006     email                : neoneurone @ users sourceforge net
00007     
00008     $Id: modelloader.h 82 2006-11-05 16:22:20Z neoneurone $
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   any later version.                                                    *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef _OPENCITY_MODELLOADER_H_
00021 #define _OPENCITY_MODELLOADER_H_ 1
00022 
00023 #include "main.h"
00024 
00025 #include "ac3dobject.h"         // Vertex struct
00026 #include "ac3dmaterial.h"
00027 
00028 #include <map>                  // Used for texture loading cache
00029 #include <vector>
00030 
00031 using std::map;
00032 using std::vector;
00033 
00034 using AC3D::Vertex;
00035 
00036 class Model;
00037 
00038 
00039 //========================================================================
00043 class ModelLoader {
00044 public:
00045 
00046 
00047 //========================================================================
00051     static Model* const
00052     Load(
00053         const string & rcsFileName );
00054 
00055 
00056 //========================================================================
00059     static Model* const
00060     LoadOCM(
00061         const string & rcsFileName );
00062 
00063 
00064 //========================================================================
00067     static Model* const
00068     LoadAC3D(
00069         const string & rcsFileName );
00070 
00071 
00072 //========================================================================
00075     static Vertex
00076     GetNormal(
00077         Vertex & vO,
00078         Vertex & vA,
00079         Vertex & vB );
00080 
00081 
00082 private:
00083     static void
00084     _AC3DTextureToGL(
00085         const string& strPath,
00086         const AC3D::AC3DObject* const pObject,
00087         map<string, GLuint>& mapTexture
00088     );
00089 
00090 
00091     static void
00092     _AC3DVertexToGL(
00093         const string& strPath,
00094         const vector<AC3D::AC3DMaterial>& vMaterial,
00095         const AC3D::AC3DObject* const pObject,
00096         const bool bProcessTranslucent = false
00097     );
00098 };
00099 #endif
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 
00134 

Generated on Sat Nov 11 10:21:10 2006 for OpenCity by  doxygen 1.4.2