Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OgreSubMesh.h

Go to the documentation of this file.
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 © 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 "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;
00056     public:
00057         SubMesh();
00058         ~SubMesh();
00059 
00060 
00062         bool useSharedVertices;
00063 
00065         RenderOperation::OperationType operationType;
00066 
00074         VertexData *vertexData;
00075 
00077         IndexData *indexData;
00078 
00079         ProgressiveMesh::LODFaceList mLodFaceList;
00080 
00082         Mesh* parent;
00083 
00085         void setMaterialName(const String& matName);
00086         const String& getMaterialName(void) const;
00087 
00090         bool isMatInitialised(void) const;
00091 
00098         void _getRenderOperation(RenderOperation& rend, ushort lodIndex = 0);
00099 
00112         void addBoneAssignment(const VertexBoneAssignment& vertBoneAssign);
00113 
00119         void clearBoneAssignments(void);
00120 
00122         typedef std::multimap<size_t, VertexBoneAssignment> VertexBoneAssignmentList;
00123         typedef MapIterator<VertexBoneAssignmentList> BoneAssignmentIterator;
00124 
00129         BoneAssignmentIterator getBoneAssignmentIterator(void);
00130 
00132         void _compileBoneAssignments(void);
00133     protected:
00134 
00136         String mMaterialName;
00137 
00139         bool mMatInitialised;
00140 
00141        
00142         VertexBoneAssignmentList mBoneAssignments;
00143 
00145         bool mBoneAssignmentsOutOfDate;
00146 
00148         void removeLodLevels(void);
00149 
00150 
00151 
00152     };
00153 
00154 } // namespace
00155 
00156 #endif
00157 

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:48 2004