MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mesh.h
1 // © Copyright 2010 - 2014 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 #ifndef _graphicsmesh_h
41 #define _graphicsmesh_h
42 
43 #include "datatypes.h"
44 
45 namespace Ogre
46 {
47  class Mesh;
48  class MeshPtr;
49 }//Ogre
50 
51 namespace Mezzanine
52 {
53  namespace Graphics
54  {
55  class SubMesh;
56  class Skeleton;
57  class InternalMeshData;
58  ///////////////////////////////////////////////////////////////////////////////
59  /// @brief This class is used to check and modify the properties of a graphics mesh.
60  /// @details
61  ///////////////////////////////////////
62  class MEZZ_LIB Mesh
63  {
64  public:
65  typedef std::vector<SubMesh*> SubMeshContainer;
66  typedef SubMeshContainer::iterator SubMeshIterator;
67  typedef SubMeshContainer::const_iterator ConstSubMeshIterator;
68  protected:
69  InternalMeshData* IMD;
70  Skeleton* MeshSkel;
71  SubMeshContainer SubMeshes;
72  public:
73  /*/// @brief Class Constructor.
74  Mesh();//*/
75  /// @internal
76  /// @brief Internal Constructor.
77  /// @param InternalMesh The internal mesh this mesh class is based on.
78  Mesh(Ogre::MeshPtr InternalMesh);
79  /// @brief Class Destructor.
80  ~Mesh();
81 
82  ///////////////////////////////////////////////////////////////////////////////
83  // Submesh Methods
84 
85 
86 
87  ///////////////////////////////////////////////////////////////////////////////
88  // Skeleton Methods
89 
90 
91 
92  ///////////////////////////////////////////////////////////////////////////////
93  // Asset Methods
94 
95  /// @brief Gets the Name of this mesh.
96  /// @note If this mesh originated from a file, usually the name of the mesh will be the file name.
97  /// @return Returns a const string reference containing the name of this mesh.
98  ConstString& GetName() const;
99  /// @brief Gets the resource group this mesh belongs to.
100  /// @return Returns a const string reference containing the group this mesh belongs to.
101  ConstString& GetGroup() const;
102 
103  ///////////////////////////////////////////////////////////////////////////////
104  // Internal Methods
105 
106  /// @internal
107  /// @brief Gets the internal Mesh pointer.
108  /// @return Returns a shared pointer pointing to the internal Mesh.
109  Ogre::MeshPtr _GetInternalMesh() const;
110  };//Mesh
111  }//Graphics
112 }//Mezzanine
113 
114 #endif