goat3d

view src/mesh.h @ 17:1d85d7dd0038

goatprim done
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 27 Sep 2013 02:29:52 +0300
parents cd71f0b92f44
children b35427826b60
line source
1 #ifndef MESH_H_
2 #define MESH_H_
4 #include <vector>
5 #include "object.h"
6 #include "material.h"
8 class Node;
10 struct Face {
11 int v[3];
12 };
14 struct Int4 {
15 int x, y, z, w;
16 };
18 class Mesh : public Object {
19 public:
20 Material *material;
22 std::vector<Vector3> vertices;
23 std::vector<Vector3> normals;
24 std::vector<Vector3> tangents;
25 std::vector<Vector2> texcoords;
26 std::vector<Vector4> skin_weights;
27 std::vector<Int4> skin_matrices;
28 std::vector<Vector4> colors;
29 std::vector<Face> faces;
31 std::vector<Node*> bones;
33 Mesh();
35 void set_material(Material *mat);
36 Material *get_material();
37 const Material *get_material() const;
38 };
40 #endif // MESH_H_