OgreSubMesh.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __SubMesh_H_
29 #define __SubMesh_H_
30 
31 #include "OgrePrerequisites.h"
32 
33 #include "OgreVertexIndexData.h"
34 #include "OgreMaterial.h"
35 #include "OgreRenderOperation.h"
37 #include "OgreAnimationTrack.h"
39 #include "OgreHeaderPrefix.h"
40 
41 namespace Ogre {
42 
63  {
64  friend class Mesh;
65  friend class MeshSerializerImpl;
68  public:
69  SubMesh();
70  ~SubMesh();
71 
72 
75 
78 
87 
90 
112 
115 
136 
139 
141  void setMaterialName(const String& matName, const String& groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME );
142  const String& getMaterialName(void) const;
143 
146  bool isMatInitialised(void) const;
147 
154  void _getRenderOperation(RenderOperation& rend, ushort lodIndex = 0);
155 
168  void addBoneAssignment(const VertexBoneAssignment& vertBoneAssign);
169 
175  void clearBoneAssignments(void);
176 
180 
185  BoneAssignmentIterator getBoneAssignmentIterator(void);
186 
189  const VertexBoneAssignmentList& getBoneAssignments() { return mBoneAssignments; }
190 
191 
193  void _compileBoneAssignments(void);
194 
199  AliasTextureIterator getAliasTextureIterator(void) const;
210  void addTextureAlias(const String& aliasName, const String& textureName);
216  void removeTextureAlias(const String& aliasName);
219  void removeAllTextureAliases(void);
222  bool hasTextureAliases(void) const { return !mTextureAliases.empty(); }
225  size_t getTextureAliasCount(void) const { return mTextureAliases.size(); }
226 
237  bool updateMaterialUsingTextureAliases(void);
238 
241  VertexAnimationType getVertexAnimationType(void) const;
242 
244  bool getVertexAnimationIncludesNormals() const { return mVertexAnimationIncludesNormals; }
245 
246 
251  void generateExtremes(size_t count);
252 
255  bool isBuildEdgesEnabled(void) const { return mBuildEdgesEnabled; }
256  void setBuildEdgesEnabled(bool b);
264  SubMesh * clone(const String& newName, Mesh *parentMesh = 0);
265 
266  protected:
267 
270 
273 
276 
278 
281 
284 
287 
290 
292  void removeLodLevels(void);
293 
294 
295  };
299 } // namespace
300 
301 #include "OgreHeaderSuffix.h"
302 
303 #endif
304 
305 

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Oct 23 2013 06:57:25