rayzor
annotate 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 |
rev | line source |
---|---|
nuclear@1 | 1 #ifndef OBJECT_H_ |
nuclear@1 | 2 #define OBJECT_H_ |
nuclear@1 | 3 |
nuclear@12 | 4 #include "vmath.h" |
nuclear@13 | 5 #include "snode.h" |
nuclear@17 | 6 #include "material.h" |
nuclear@12 | 7 |
nuclear@12 | 8 class Object : public SceneNode { |
nuclear@1 | 9 public: |
nuclear@17 | 10 Material mtl; |
nuclear@17 | 11 |
nuclear@1 | 12 Object(); |
nuclear@1 | 13 virtual ~Object(); |
nuclear@17 | 14 |
nuclear@17 | 15 virtual Vector3 hit_normal(const RayHit &hit) const; |
nuclear@1 | 16 }; |
nuclear@1 | 17 |
nuclear@6 | 18 class Sphere : public Object { |
nuclear@1 | 19 public: |
nuclear@1 | 20 Sphere(); |
nuclear@1 | 21 ~Sphere(); |
nuclear@1 | 22 |
nuclear@14 | 23 void draw(bool emph = false) const; |
nuclear@12 | 24 |
nuclear@17 | 25 bool intersect(const Ray &ray, RayHit *hit = 0) const; |
nuclear@17 | 26 Vector3 hit_normal(const RayHit &hit) const; |
nuclear@12 | 27 }; |
nuclear@12 | 28 |
nuclear@12 | 29 class Box : public Object { |
nuclear@12 | 30 public: |
nuclear@12 | 31 Box(); |
nuclear@12 | 32 ~Box(); |
nuclear@12 | 33 |
nuclear@14 | 34 void draw(bool emph = false) const; |
nuclear@12 | 35 |
nuclear@17 | 36 bool intersect(const Ray &ray, RayHit *hit = 0) const; |
nuclear@17 | 37 Vector3 hit_normal(const RayHit &hit) const; |
nuclear@1 | 38 }; |
nuclear@1 | 39 |
nuclear@1 | 40 #endif // OBJECT_H_ |