rayzor

view src/object.h @ 22:5380ff64e83f

minor changes from dos, and line endings cleanup
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 02 May 2014 14:32:58 +0300
parents a9a948809c6f
children
line source
1 #ifndef OBJECT_H_
2 #define OBJECT_H_
4 #include "vmath.h"
5 #include "snode.h"
6 #include "material.h"
8 class Object : public SceneNode {
9 public:
10 Material mtl;
12 Object();
13 virtual ~Object();
15 virtual Vector3 hit_normal(const RayHit &hit) const;
16 };
18 class Sphere : public Object {
19 public:
20 Sphere();
21 ~Sphere();
23 void draw(bool emph = false) const;
25 bool intersect(const Ray &ray, RayHit *hit = 0) const;
26 Vector3 hit_normal(const RayHit &hit) const;
27 };
29 class Box : public Object {
30 public:
31 Box();
32 ~Box();
34 void draw(bool emph = false) const;
36 bool intersect(const Ray &ray, RayHit *hit = 0) const;
37 Vector3 hit_normal(const RayHit &hit) const;
38 };
40 #endif // OBJECT_H_