goat3d

view src/mesh.h @ 41:da3f335e0069

revamped the visual studio project files
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 01 Dec 2013 01:31:53 +0200
parents b35427826b60
children 498ca7ac7047
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;
17 Int4();
18 Int4(int x, int y, int z, int w);
19 };
21 class Mesh : public Object {
22 public:
23 Material *material;
25 std::vector<Vector3> vertices;
26 std::vector<Vector3> normals;
27 std::vector<Vector3> tangents;
28 std::vector<Vector2> texcoords;
29 std::vector<Vector4> skin_weights;
30 std::vector<Int4> skin_matrices;
31 std::vector<Vector4> colors;
32 std::vector<Face> faces;
34 std::vector<Node*> bones;
36 Mesh();
38 bool load(const char *fname);
39 bool save(const char *fname) const;
41 void set_material(Material *mat);
42 Material *get_material();
43 const Material *get_material() const;
44 };
46 #endif // MESH_H_