erebus
view liberebus/src/object.h @ 12:ea4bcf186d66
whatever
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 24 May 2014 21:52:19 +0300 |
parents | a932848de652 |
children | e9da2916bc79 |
line source
1 #ifndef OBJECT_H_
2 #define OBJECT_H_
4 #include <string>
5 #include "vmath/ray.h"
7 class Object;
9 struct RayHit {
10 float dist;
11 Ray world_ray, local_ray;
13 const Object *obj, *subobj;
14 };
16 enum class ObjType { null, geom, camera };
18 class Object {
19 private:
20 std::string name;
22 public:
23 Object();
24 virtual ~Object() = default;
26 virtual ObjType get_type() const;
28 virtual void set_name(const char *name);
29 virtual const char *get_name() const;
31 virtual bool intersect(const Ray &ray, RayHit *hit = 0) const;
32 };
34 #endif // OBJECT_H_