65c39e1710847c678ce324e46ae20ac09a32f2a9
[laserbrain_demo] / src / object.h
1 #ifndef OBJECT_H_
2 #define OBJECT_H_
3
4 #include <string>
5 #include <gmath/gmath.h>
6 #include "geom.h"
7 #include "material.h"
8
9 class Object;
10 class SceneNode;
11
12 enum ObjType { OBJ_NULL, OBJ_MESH };
13
14 class Object {
15 private:
16         std::string name;
17
18 public:
19         Material mtl;
20         //GeomObject *bvol;
21         SceneNode *node;
22
23         Object();
24         virtual ~Object() = default;
25
26         virtual ObjType get_type() const;
27
28         virtual void set_name(const char *name);
29         virtual const char *get_name() const;
30
31         virtual bool intersect(const Ray &ray, HitPoint *hit = 0) const;
32
33         virtual void update(float dt = 0.0f);
34         virtual void draw() const;
35
36         virtual const AABox &get_aabox() const;
37 };
38
39 #endif  // OBJECT_H_