Ray Tracer Common Project
Image rendering program based on the ray tracing technique.
geometry.hpp
1 
15 #pragma once
16 
17 #include <vector>
18 #include "scene/entity.hpp"
19 
20 namespace rt{
21 
22 class element;
23 class vector;
24 class euclidian;
25 class hit;
26 
39 class Geometry : public Entity{
40 public:
46  Geometry(Entity *parent = 0);
47 
54  Geometry(const vector & pos, Entity *parent = 0);
55 
64  Geometry(double x, double y, double z, Entity *parent = 0);
65 
69  virtual ~Geometry() = 0;
70 
75  virtual vector uv(const element &) const = 0;
76 
82  virtual std::vector<rt::hit> hits(const euclidian & e) const = 0;
83 };
84 
85 }
Basic space entity.
Definition: entity.hpp:50
Geometry(Entity *parent=0)
Main constructor.
Definition: geometry.cpp:5
Definition: bitmap.cpp:4
virtual vector uv(const element &) const =0
UV-map a surface element on a texture.
virtual ~Geometry()=0
Destructor.
Definition: geometry.cpp:17
3D vector
Definition: vector.hpp:28
Geometric entity.
Definition: geometry.hpp:39
Geometric surface element unit.
Definition: element.hpp:43
Localised vector class.
Definition: euclidian.hpp:27
virtual std::vector< rt::hit > hits(const euclidian &e) const =0
Compute hits between a Geometry and an euclidian.
Entity * parent() const
The parent entity.
Definition: entity.cpp:101