00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OGRE 00004 (Object-oriented Graphics Rendering Engine) 00005 For the latest info, see http://www.ogre3d.org/ 00006 00007 Copyright (c) 2000-2005 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 "OgreVertexIndexData.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 MeshSerializerImpl; 00055 friend class MeshSerializerImpl_v1_2; 00056 friend class MeshSerializerImpl_v1_1; 00057 public: 00058 SubMesh(); 00059 ~SubMesh(); 00060 00061 00063 bool useSharedVertices; 00064 00066 RenderOperation::OperationType operationType; 00067 00075 VertexData *vertexData; 00076 00078 IndexData *indexData; 00079 00080 ProgressiveMesh::LODFaceList mLodFaceList; 00081 00083 Mesh* parent; 00084 00086 void setMaterialName(const String& matName); 00087 const String& getMaterialName(void) const; 00088 00091 bool isMatInitialised(void) const; 00092 00099 void _getRenderOperation(RenderOperation& rend, ushort lodIndex = 0); 00100 00113 void addBoneAssignment(const VertexBoneAssignment& vertBoneAssign); 00114 00120 void clearBoneAssignments(void); 00121 00123 typedef std::multimap<size_t, VertexBoneAssignment> VertexBoneAssignmentList; 00124 typedef MapIterator<VertexBoneAssignmentList> BoneAssignmentIterator; 00125 00130 BoneAssignmentIterator getBoneAssignmentIterator(void); 00131 00133 void _compileBoneAssignments(void); 00134 protected: 00135 00137 String mMaterialName; 00138 00140 bool mMatInitialised; 00141 00142 00143 VertexBoneAssignmentList mBoneAssignments; 00144 00146 bool mBoneAssignmentsOutOfDate; 00147 00149 void removeLodLevels(void); 00150 00151 00152 00153 }; 00154 00155 } // namespace 00156 00157 #endif 00158
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 12:59:53 2006