goat3d

view src/mesh.h @ 27:4deb0b12fe14

wtf... corrupted heap?
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 29 Sep 2013 08:20:19 +0300
parents f1b4c27382ce
children a5c5cec3cb88
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 bool load(const char *fname);
36 bool save(const char *fname) const;
38 void set_material(Material *mat);
39 Material *get_material();
40 const Material *get_material() const;
41 };
43 #endif // MESH_H_