goat3d

view src/mesh.h @ 14:188c697b3b49

- added a document describing the goat3d file format chunk hierarchy - started an alternative XML-based file format - added the openctm library
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 26 Sep 2013 04:47:05 +0300
parents e46529a5d057
children f1b4c27382ce
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<Vector3> texcoords;
26 std::vector<Vector4> skin_weights;
27 std::vector<Int4> skin_matrices;
28 std::vector<Vector4> colors;
29 std::vector<Node*> bones;
30 std::vector<Face> faces;
32 Mesh();
33 virtual ~Mesh();
35 virtual void set_material(Material *mat);
36 virtual Material *get_material();
37 virtual const Material *get_material() const;
38 };
40 #endif // MESH_H_