Phongo Clap RT  1.0
Simple Raytracing Renderer
Ray.h
Go to the documentation of this file.
1 #ifndef _RAY_H_
2 #define _RAY_H_
3 
7 
8 #include <ngl/Vec3.h>
9 //----------------------------------------------------------------------------------------------------------------------
14 //----------------------------------------------------------------------------------------------------------------------
15 namespace geo
16 {
17 class Ray
18 {
19 public:
20  //--------------------------------------------------------------------------------------------------------------------
24  //--------------------------------------------------------------------------------------------------------------------
25  Ray(ngl::Vec3 _origin, ngl::Vec3 _direction);
26  //--------------------------------------------------------------------------------------------------------------------
32  //--------------------------------------------------------------------------------------------------------------------
33  Ray(ngl::Vec3 _A, ngl::Vec3 _B, bool _p);
34  //--------------------------------------------------------------------------------------------------------------------
36  //--------------------------------------------------------------------------------------------------------------------
37  ~Ray();
38 
39  // setters
40  //--------------------------------------------------------------------------------------------------------------------
43  //--------------------------------------------------------------------------------------------------------------------
44  void setOrigin(ngl::Vec3 _origin);
45  //--------------------------------------------------------------------------------------------------------------------
48  //--------------------------------------------------------------------------------------------------------------------
49  void setDirection(ngl::Vec3 _direction);
50 
51  // getters
52  //--------------------------------------------------------------------------------------------------------------------
55  //--------------------------------------------------------------------------------------------------------------------
56  ngl::Vec3 getOrigin();
57  //--------------------------------------------------------------------------------------------------------------------
60  //--------------------------------------------------------------------------------------------------------------------
61  ngl::Vec3 getDirection();
62 
63 private:
64  //--------------------------------------------------------------------------------------------------------------------
66  //--------------------------------------------------------------------------------------------------------------------
67  ngl::Vec3 m_origin;
68  //--------------------------------------------------------------------------------------------------------------------
70  //--------------------------------------------------------------------------------------------------------------------
71  ngl::Vec3 m_direction;
72 };
73 }
74 
75 #endif // Ray.h
void setDirection(ngl::Vec3 _direction)
Setter method for the direction.
Definition: Ray.cpp:32
ngl::Vec3 getOrigin()
Getter method for the origin.
Definition: Ray.cpp:39
ngl::Vec3 m_origin
Ray's origin class member.
Definition: Ray.h:67
Definition: Ray.h:17
~Ray()
Simple destructor. Frees memory.
Definition: Ray.cpp:28
void setOrigin(ngl::Vec3 _origin)
Setter method for the origin.
Definition: Ray.cpp:30
ngl::Vec3 m_direction
Ray's direction class member.
Definition: Ray.h:71
Ray(ngl::Vec3 _origin, ngl::Vec3 _direction)
First ray ctor, this takes an origin and a direction and passes them directly to the class members...
Definition: Ray.cpp:9
Definition: Plane.cpp:9
ngl::Vec3 getDirection()
Getter method for the direction.
Definition: Ray.cpp:44