tavli

view src/object.h @ 4:b41ceead1708

procedural playing field texture mask
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 25 Jun 2015 05:58:35 +0300
parents 94aff2ff1934
children a0d30f6f20d4
line source
1 #ifndef OBJECT_H_
2 #define OBJECT_H_
4 #include "mesh.h"
5 #include "geom.h"
7 class Object {
8 private:
9 Mesh *mesh;
10 Matrix4x4 matrix;
11 unsigned int tex;
13 public:
14 Object();
15 ~Object();
17 Matrix4x4 &xform();
18 const Matrix4x4 &xform() const;
20 void set_mesh(Mesh *m);
21 Mesh *get_mesh() const;
23 void set_texture(unsigned int tex);
25 void draw() const;
27 bool intersect(const Ray &ray, HitPoint *hit) const;
28 };
30 #endif // OBJECT_H_