OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
meshdata.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program 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  This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef MESH_DATA_H
19 #define MESH_DATA_H
20 
21 #include "index.h"
22 #include "vertexgroup.h"
23 
24 namespace Engine
25 {
26 
27  using GroupIdList = std::list<int>;
28 
32 class MeshData
33 {
34 
35  public:
36 
37  MeshData();
38  ~MeshData(){}
39 
62  GroupIdList getGroupIdList(void) const;
63 
69  VertexGroups getVertexGroups(void) const;
70 
76  Vector3fv getVertices(void) const;
77 
83  Vector3fv getNormals(void) const;
84 
90  Vector2fv getTexcoord(void) const;
91 
97  Vector3fv getIndexVertex(void) const;
98 
104  Vector3fv getIndexTexCoords(void) const;
105 
106 
112  Vector3fv getIndexNormals(void) const;
113 
120  Vector3fv getOriginalVertices(void) const;
121 
128  Vector3fv getOriginalNormals(void) const;
129 
136  Vector2fv getOriginalTexCoords(void) const;
137 
143  Vector3fv getOriginalIndex(void) const;
144 
150  Vector3fv GenerateTriangleNormals( Vector3fv vertices ) const;
151 
158  float * convert2fv(Vector2fv data) const;
159 
166  float * convert3fv(Vector3fv data) const;
167 
174  float * convert4fv(Vector4fv data) const;
175 
182  unsigned short * convert3fus( Vector3fv data ) const;
183 
190  unsigned int * convert3fui( Vector3fv data ) const;
191 
192  public:
193 
194  Vector3fv mVertices;
195  Vector3fv mNormals;
196  Vector2fv mTexcoord;
198  Vector3fv mIndices;
199  Vector3fv mIndicesNormals;
200  Vector3fv mIndicesTexcoord;
202  VertexGroups mGroups;
203  GroupIdList mGroupIdList;
204 
205 };
206 
207 }
208 
209 #endif // VERTEXLOADER_H
float * convert3fv(Vector3fv data) const
convert3fv
Definition: MeshData.cpp:191
Vector3fv getOriginalVertices(void) const
getOriginalVertices
Definition: MeshData.cpp:95
Vector2fv getTexcoord(void) const
getTexcoord
Definition: MeshData.cpp:44
Vector3fv mVertices
Definition: meshdata.h:194
Vector3fv getIndexNormals(void) const
getIndexNormals
Definition: MeshData.cpp:59
Vector3fv getVertices(void) const
getVertices
Definition: MeshData.cpp:34
Vector3fv getIndexTexCoords(void) const
getIndexTexCoords
Definition: MeshData.cpp:54
VertexGroups getVertexGroups(void) const
getVertexGroups
Definition: MeshData.cpp:29
Vector3fv mIndices
Definition: meshdata.h:198
The MeshData - abstract class.
Definition: meshdata.h:32
Definition: element.h:23
Vector3fv GenerateTriangleNormals(Vector3fv vertices) const
getOriginalIndex
Definition: MeshData.cpp:64
unsigned int * convert3fui(Vector3fv data) const
convert3fui
Definition: MeshData.cpp:247
Vector3fv mIndicesNormals
Definition: meshdata.h:199
GroupIdList getGroupIdList(void) const
MeshData::getGroupIdList.
Definition: MeshData.cpp:24
Vector3fv getOriginalIndex(void) const
getOriginalIndex
Definition: MeshData.cpp:113
Vector3fv getOriginalNormals(void) const
getOriginalNormals
Definition: MeshData.cpp:137
Vector3fv getNormals(void) const
getNormals
Definition: MeshData.cpp:39
float * convert2fv(Vector2fv data) const
convert2fv
Definition: MeshData.cpp:175
float * convert4fv(Vector4fv data) const
convert4fv
Definition: MeshData.cpp:209
Vector3fv mIndicesTexcoord
Definition: meshdata.h:200
unsigned short * convert3fus(Vector3fv data) const
convert3fus
Definition: MeshData.cpp:229
Vector2fv mTexcoord
Definition: meshdata.h:196
Vector2fv getOriginalTexCoords(void) const
getOriginalTexCoords
Definition: MeshData.cpp:156
Vector3fv mNormals
Definition: meshdata.h:195
Vector3fv getIndexVertex(void) const
getIndexVertex
Definition: MeshData.cpp:49
VertexGroups mGroups
Definition: meshdata.h:202