goat3d

view src/mesh.h @ 58:d317eb4f83da

- made everything compile properly on windows again - removed libanim/libvmath, we'll use them as external dependencies - added new maxgoat_stub 3dsmax plugin project. Gets loaded as a max plugin and loads the actual maxgoat (and later maxgoat_anim) exporters on demand, to allow reloading the actual exporters without having to restart 3dsmax (which takes AGES).
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Mar 2014 03:19:55 +0200
parents a5c5cec3cb88
children dad392c710df
line source
1 #ifndef MESH_H_
2 #define MESH_H_
4 #include <vector>
5 #include "object.h"
6 #include "material.h"
8 namespace g3dimpl {
10 class Node;
12 struct Face {
13 int v[3];
14 };
16 struct Int4 {
17 int x, y, z, w;
19 Int4();
20 Int4(int x, int y, int z, int w);
21 };
23 class Mesh : public Object {
24 public:
25 Material *material;
27 std::vector<Vector3> vertices;
28 std::vector<Vector3> normals;
29 std::vector<Vector3> tangents;
30 std::vector<Vector2> texcoords;
31 std::vector<Vector4> skin_weights;
32 std::vector<Int4> skin_matrices;
33 std::vector<Vector4> colors;
34 std::vector<Face> faces;
36 std::vector<Node*> bones;
38 Mesh();
40 bool load(const char *fname);
41 bool save(const char *fname) const;
43 void set_material(Material *mat);
44 Material *get_material();
45 const Material *get_material() const;
46 };
48 } // namespace g3dimpl
50 #endif // MESH_H_