projects
/
hair
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added license
[hair]
/
src
/
mesh.h
diff --git
a/src/mesh.h
b/src/mesh.h
index
7ca25c2
..
08d01d7
100644
(file)
--- a/
src/mesh.h
+++ b/
src/mesh.h
@@
-10,8
+10,9
@@
enum {
MESH_VERTEX = 1,
MESH_NORMAL = 2,
enum {
MESH_VERTEX = 1,
MESH_NORMAL = 2,
- MESH_COLOR = 4,
- MESH_INDEX = 8
+ MESH_TEXCOORDS = 4,
+ MESH_COLOR = 8,
+ MESH_INDEX = 16
};
struct Aabb {
};
struct Aabb {
@@
-19,10
+20,20
@@
struct Aabb {
Vec3 v1;
};
Vec3 v1;
};
+struct Material {
+ Vec3 diffuse;
+ Vec3 specular;
+ float shininess;
+
+ unsigned int tex;
+ bool tex_opaque;
+};
+
class Mesh {
private:
unsigned int vbo_vertices;
unsigned int vbo_normals;
class Mesh {
private:
unsigned int vbo_vertices;
unsigned int vbo_normals;
+ unsigned int vbo_texcoords;
unsigned int vbo_colors;
unsigned int ibo;
unsigned int vbo_colors;
unsigned int ibo;
@@
-34,10
+45,12
@@
public:
~Mesh();
Aabb bbox;
~Mesh();
Aabb bbox;
+ Material mtl;
std::string name;
std::vector<uint16_t> indices;
std::vector<Vec3> vertices;
std::string name;
std::vector<uint16_t> indices;
std::vector<Vec3> vertices;
+ std::vector<Vec2> texcoords;
std::vector<Vec3> normals;
std::vector<Vec3> colors;
std::vector<Vec3> normals;
std::vector<Vec3> colors;