erebus

view liberebus/src/object.h @ 3:a932848de652

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 28 Apr 2014 15:44:59 +0300
parents 474a0244f57d
children 93894c232d65
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 const 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_