00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OGRE 00004 (Object-oriented Graphics Rendering Engine) 00005 For the latest info, see http://ogre.sourceforge.net/ 00006 00007 Copyright © 2000-2002 The OGRE Team 00008 Also see acknowledgements in Readme.html 00009 00010 This program is free software; you can redistribute it and/or modify it under 00011 the terms of the GNU Lesser General Public License as published by the Free Software 00012 Foundation; either version 2 of the License, or (at your option) any later 00013 version. 00014 00015 This program is distributed in the hope that it will be useful, but WITHOUT 00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License along with 00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00022 http://www.gnu.org/copyleft/lesser.txt. 00023 ----------------------------------------------------------------------------- 00024 */ 00025 #ifndef __MeshFileFormat_H__ 00026 #define __MeshFileFormat_H__ 00027 00028 #include "OgrePrerequisites.h" 00029 00030 namespace Ogre { 00031 00048 enum MeshChunkID { 00049 M_HEADER = 0x1000, 00050 // char* version : Version number check 00051 M_MATERIAL = 0x2000, 00052 // char* name 00053 // AMBIENT 00054 // Real r, g, b 00055 // DIFFUSE 00056 // Real r, g, b 00057 // SPECULAR 00058 // Real r, g, b 00059 // SHININESS 00060 // Real val; 00061 M_TEXTURE_LAYER = 0x2200, // optional, repeat per layer 00062 // char* name 00063 // TODO - scale, offset, effects 00064 M_MESH = 0x3000, 00065 // M_GEOMETRY chunk 00066 M_SUBMESH = 0x4000, 00067 // char* materialName 00068 // bool useSharedVertices 00069 // unsigned short numFaces 00070 // unsigned short* faceVertexIndices ((v1, v2, v3) * numFaces) 00071 // M_GEOMETRY chunk (Optional: present only if useSharedVertices = false) 00072 M_SUBMESH_BONE_ASSIGNMENT = 0x4100, 00073 // Optional bone weights (repeating section) 00074 // unsigned short vertexIndex; 00075 // unsigned short boneIndex; 00076 // Real weight; 00077 M_GEOMETRY = 0x5000, // NB this chunk is embedded within M_MESH and M_SUBMESH 00078 // unsigned short numVertices 00079 // Real* pVertices (x, y, z order x numVertices) 00080 M_GEOMETRY_NORMALS = 0x5100, //(Optional) 00081 // Real* pNormals (x, y, z order x numVertices) 00082 M_GEOMETRY_COLOURS = 0x5200, //(Optional) 00083 // unsigned long* pColours (RGBA 8888 format x numVertices) 00084 M_GEOMETRY_TEXCOORDS = 0x5300, //(Optional, REPEATABLE, each one adds an extra set) 00085 // unsigned short dimensions (1 for 1D, 2 for 2D, 3 for 3D) 00086 // Real* pTexCoords (u [v] [w] order, dimensions x numVertices) 00087 M_MESH_SKELETON_LINK = 0x6000, 00088 // Optional link to skeleton 00089 // char* skeletonName : name of .skeleton to use 00090 M_MESH_BONE_ASSIGNMENT = 0x7000, 00091 // Optional bone weights (repeating section) 00092 // unsigned short vertexIndex; 00093 // unsigned short boneIndex; 00094 // Real weight; 00095 M_MESH_LOD = 0x8000, 00096 // Optional LOD information 00097 // unsigned short numLevels; 00098 // bool manual; (true for manual alternate meshes, false for generated) 00099 M_MESH_LOD_USAGE = 0x8100, 00100 // Repeating section, ordered in increasing depth 00101 // NB LOD 0 (full detail from 0 depth) is omitted 00102 // Real fromSquaredDepth; 00103 M_MESH_LOD_MANUAL = 0x8110, 00104 // Required if M_MESH_LOD section manual = true 00105 // String manualMeshName; 00106 M_MESH_LOD_GENERATED = 0x8120 00107 // Required if M_MESH_LOD section manual = false 00108 // Repeating section (1 per submesh) 00109 // unsigned short numFaces; 00110 // unsigned short* faceIndexes; ((v1, v2, v3) * numFaces) 00111 00112 00113 00114 00115 00116 00117 00118 }; 00119 00120 } // namespace 00121 00122 00123 #endif
Copyright © 2002 by The OGRE Team