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 __SubMesh_H_ 00026 #define __SubMesh_H_ 00027 00028 #include "OgrePrerequisites.h" 00029 00030 #include "OgreGeometryData.h" 00031 #include "OgreMaterial.h" 00032 #include "OgreRenderOperation.h" 00033 #include "OgreVertexBoneAssignment.h" 00034 #include "OgreProgressiveMesh.h" 00035 00036 namespace Ogre { 00037 00051 class _OgreExport SubMesh 00052 { 00053 friend class Mesh; 00054 friend class MeshSerializer; 00055 public: 00056 SubMesh(); 00057 ~SubMesh(); 00058 00059 00061 bool useSharedVertices; 00062 00064 bool useTriStrips; 00065 00066 00081 GeometryData geometry; 00082 00084 unsigned short numFaces; 00085 00087 unsigned short* faceVertexIndices; 00088 00089 ProgressiveMesh::LODFaceList mLodFaceList; 00090 00092 Mesh* parent; 00093 00095 void setMaterialName(const String& matName); 00096 const String& getMaterialName(void) const; 00097 00100 bool isMatInitialised(void) const; 00101 00108 void _getRenderOperation(RenderOperation& rend, ushort lodIndex = 0); 00109 00122 void addBoneAssignment(const VertexBoneAssignment& vertBoneAssign); 00123 00129 void clearBoneAssignments(void); 00130 00132 typedef std::multimap<unsigned short, VertexBoneAssignment> VertexBoneAssignmentList; 00133 typedef MapIterator<VertexBoneAssignmentList> BoneAssignmentIterator; 00134 00139 BoneAssignmentIterator getBoneAssignmentIterator(void); 00140 00141 protected: 00142 00144 String mMaterialName; 00145 00147 bool mMatInitialised; 00148 00149 00150 VertexBoneAssignmentList mBoneAssignments; 00151 00153 bool mBoneAssignmentsOutOfDate; 00155 void compileBoneAssignments(void); 00156 00157 00158 00159 }; 00160 00161 } // namespace 00162 00163 #endif 00164
Copyright © 2002 by The OGRE Team