Spinning Topp Logo BlackTopp Studios
inc
meshinfo.h
1 // © Copyright 2010 - 2015 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 _graphicsmeshinfo_h
41 #define _graphicsmeshinfo_h
42 
43 #include "vector2.h"
44 #include "vector3.h"
45 #include "colourvalue.h"
46 
47 namespace Mezzanine
48 {
49  namespace Graphics
50  {
51  /// @brief Convenience type for a container of Vector3s.
52  typedef std::vector<Vector3> Vector3Vec;
53  /// @brief Convenience type for a container of Vector2s.
54  typedef std::vector<Vector2> Vector2Vec;
55  /// @brief Convenience type for a container of Integers.
56  typedef std::vector<Integer> IntVec;
57 
58  ///////////////////////////////////////////////////////////////////////////////
59  /// @brief A convenience class for the storage of Vertex data in a Mesh/SubMesh.
60  /// @details
61  ///////////////////////////////////////
63  {
64  /// @brief The number of Vertices in the Mesh/SubMesh.
66  /// @brief The number of Indexes in the Mesh/SubMesh.
68 
69  /// @brief A container storing the position of each vertex.
70  Vector3Vec Positions;
71  /// @brief A container storing the texture coordinates of each vertex.
72  Vector2Vec UVs;
73  /// @brief A container storing the normal of each vertex.
74  Vector3Vec Normals;
75  /// @brief A container storing the tangent of each vertex.
76  Vector3Vec Tangents;
77 
78  /// @brief A container of Indexes used to assemble the Vertices for rendering.
79  IntVec Indices;
80 
81  /// @brief No init constructor.
83  VertexCount(0),
84  IndexCount(0)
85  { }
86  /// @brief Class destructor.
88  { }
89  };//VertexInfo
90 
91  ///////////////////////////////////////////////////////////////////////////////
92  /// @brief A convenience class for the storage of rendering data in a Mesh/SubMesh.
93  /// @details
94  /// @todo This is fairly simple struct that doesn't encompass all of the data a Vertex can have, just what they commonly have.
95  /// As such, this should be extended to better account for the various vertex formats.
96  ///////////////////////////////////////
98  {
99  /// @brief Used Internally. Describes how the Vertex data should be treated when rendering.
101 
102  /// @brief The name of the material used to render the Mesh/SubMesh.
104  /// @brief The resource group in which the named Material can be found.
106 
107  /// @brief A collection of containers storing the various properties of a Vertex.
109 
110  /// @brief No init constructor.
112  OperationType(0)
113  { }
114  /// @brief Class destructor.
116  { }
117  };//MeshInfo
118  }//Graphics
119 }//Mezzanine
120 
121 #endif
VertexInfo Vertices
A collection of containers storing the various properties of a Vertex.
Definition: meshinfo.h:108
VertexInfo()
No init constructor.
Definition: meshinfo.h:82
A convenience class for the storage of Vertex data in a Mesh/SubMesh.
Definition: meshinfo.h:62
IntVec Indices
A container of Indexes used to assemble the Vertices for rendering.
Definition: meshinfo.h:79
String MaterialName
The name of the material used to render the Mesh/SubMesh.
Definition: meshinfo.h:103
String MaterialGroup
The resource group in which the named Material can be found.
Definition: meshinfo.h:105
~VertexInfo()
Class destructor.
Definition: meshinfo.h:87
~MeshInfo()
Class destructor.
Definition: meshinfo.h:115
MeshInfo()
No init constructor.
Definition: meshinfo.h:111
Vector3Vec Tangents
A container storing the tangent of each vertex.
Definition: meshinfo.h:76
Whole VertexCount
The number of Vertices in the Mesh/SubMesh.
Definition: meshinfo.h:65
std::vector< Vector2 > Vector2Vec
Convenience type for a container of Vector2s.
Definition: meshinfo.h:54
Vector2Vec UVs
A container storing the texture coordinates of each vertex.
Definition: meshinfo.h:72
A convenience class for the storage of rendering data in a Mesh/SubMesh.
Definition: meshinfo.h:97
Vector3Vec Normals
A container storing the normal of each vertex.
Definition: meshinfo.h:74
std::vector< Integer > IntVec
Convenience type for a container of Integers.
Definition: meshinfo.h:56
#define MEZZ_LIB
Some platforms require special decorations to denote what is exported/imported in a share library...
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
Whole IndexCount
The number of Indexes in the Mesh/SubMesh.
Definition: meshinfo.h:67
std::vector< Vector3 > Vector3Vec
Convenience type for a container of Vector3s.
Definition: meshinfo.h:52
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Definition: datatypes.h:151
Whole OperationType
Used Internally. Describes how the Vertex data should be treated when rendering.
Definition: meshinfo.h:100
Vector3Vec Positions
A container storing the position of each vertex.
Definition: meshinfo.h:70
std::string String
A datatype used to a series of characters.
Definition: datatypes.h:159