tavli
diff src/object.h @ 6:a0d30f6f20d4
- texture coordinate generation in class Mesh
- wood texture
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 26 Jun 2015 04:22:06 +0300 |
parents | b41ceead1708 |
children | a8e26f163f99 |
line diff
1.1 --- a/src/object.h Thu Jun 25 20:43:34 2015 +0300 1.2 +++ b/src/object.h Fri Jun 26 04:22:06 2015 +0300 1.3 @@ -3,20 +3,34 @@ 1.4 1.5 #include "mesh.h" 1.6 #include "geom.h" 1.7 +#include "vmath/vmath.h" 1.8 + 1.9 +struct Material { 1.10 + Vector3 diffuse; 1.11 + Vector3 specular; 1.12 + float shininess; 1.13 + float alpha; 1.14 +}; 1.15 1.16 class Object { 1.17 private: 1.18 Mesh *mesh; 1.19 Matrix4x4 matrix; 1.20 unsigned int tex; 1.21 + Matrix4x4 tex_matrix; 1.22 1.23 public: 1.24 + Material mtl; 1.25 + 1.26 Object(); 1.27 ~Object(); 1.28 1.29 Matrix4x4 &xform(); 1.30 const Matrix4x4 &xform() const; 1.31 1.32 + Matrix4x4 &tex_xform(); 1.33 + const Matrix4x4 &tex_xform() const; 1.34 + 1.35 void set_mesh(Mesh *m); 1.36 Mesh *get_mesh() const; 1.37