rayzor

view src/object.h @ 12:d94a69933a71

lots of stuff, can't remember
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 12 Apr 2014 23:28:24 +0300
parents a68dbf80d547
children 964f8ea5f095
line source
1 #ifndef OBJECT_H_
2 #define OBJECT_H_
4 #include "vmath.h"
5 #include "xfnode.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_