rayzor

view src/object.h @ 13:964f8ea5f095

missed quite a lot of things in my last commit apparently
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 12 Apr 2014 23:37:55 +0300
parents d94a69933a71
children a9a948809c6f
line source
1 #ifndef OBJECT_H_
2 #define OBJECT_H_
4 #include "vmath.h"
5 #include "snode.h"
7 class Object : public SceneNode {
8 protected:
9 void pre_draw() const;
10 void post_draw() const;
12 public:
13 Object();
14 virtual ~Object();
15 };
17 class Sphere : public Object {
18 public:
19 Sphere();
20 ~Sphere();
22 void draw() const;
24 bool intersect(const Ray &ray, float *dist = 0) const;
25 };
27 class Box : public Object {
28 public:
29 Box();
30 ~Box();
32 void draw() const;
34 bool intersect(const Ray &ray, float *dist = 0) const;
35 };
37 #endif // OBJECT_H_