#include <Ray.h>
|
| 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. More...
|
|
| Ray (ngl::Vec3 _A, ngl::Vec3 _B, bool _p) |
| Second ray ctor, this takes two points and creates the direction from them and takes the first as origin. More...
|
|
| ~Ray () |
| Simple destructor. Frees memory. More...
|
|
void | setOrigin (ngl::Vec3 _origin) |
| Setter method for the origin. More...
|
|
void | setDirection (ngl::Vec3 _direction) |
| Setter method for the direction. More...
|
|
ngl::Vec3 | getOrigin () |
| Getter method for the origin. More...
|
|
ngl::Vec3 | getDirection () |
| Getter method for the direction. More...
|
|
Definition at line 17 of file Ray.h.
Ray::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.
- Parameters
-
[in] | _origin | Starting point of the ray |
[in] | _direction | Vector in which the points lay on the line. |
Definition at line 9 of file Ray.cpp.
References m_direction, and m_origin.
14 if (_direction.length() > 1.1 || _direction.length() < 0.9) {_direction.normalize();}
ngl::Vec3 m_origin
Ray's origin class member.
ngl::Vec3 m_direction
Ray's direction class member.
Ray::Ray |
( |
ngl::Vec3 |
_A, |
|
|
ngl::Vec3 |
_B, |
|
|
bool |
_p |
|
) |
| |
Second ray ctor, this takes two points and creates the direction from them and takes the first as origin.
- Parameters
-
[in] | _A | Starting point of the ray |
[in] | _B | Another point which will be used to construct a vector which will act as direction for the ray. |
[in] | _p | This parameter discrimines between the previous ctor because they both accept two vectors as inputs and this cannot be overloaded. |
Definition at line 18 of file Ray.cpp.
References m_direction, and m_origin.
22 ngl::Vec3 direction = _B - _A;
23 direction.normalize();
ngl::Vec3 m_origin
Ray's origin class member.
ngl::Vec3 m_direction
Ray's direction class member.
Simple destructor. Frees memory.
Definition at line 28 of file Ray.cpp.
ngl::Vec3 Ray::getDirection |
( |
| ) |
|
Getter method for the direction.
- Returns
- The direction of the ray.
Definition at line 44 of file Ray.cpp.
References m_direction.
ngl::Vec3 m_direction
Ray's direction class member.
ngl::Vec3 Ray::getOrigin |
( |
| ) |
|
Getter method for the origin.
- Returns
- The origin of the ray.
Definition at line 39 of file Ray.cpp.
References m_origin.
ngl::Vec3 m_origin
Ray's origin class member.
void Ray::setDirection |
( |
ngl::Vec3 |
_direction | ) |
|
Setter method for the direction.
- Parameters
-
[in] | _direction | Sets the direction class member. |
Definition at line 32 of file Ray.cpp.
References m_direction.
35 if (_direction.length() > 1.1 || _direction.length() < 0.9) {_direction.normalize();}
ngl::Vec3 m_direction
Ray's direction class member.
void Ray::setOrigin |
( |
ngl::Vec3 |
_origin | ) |
|
Setter method for the origin.
- Parameters
-
[in] | _origin | Sets the origin class member. |
Definition at line 30 of file Ray.cpp.
References m_origin.
ngl::Vec3 m_origin
Ray's origin class member.
ngl::Vec3 geo::Ray::m_direction |
|
private |
Ray's direction class member.
Definition at line 71 of file Ray.h.
ngl::Vec3 geo::Ray::m_origin |
|
private |
Ray's origin class member.
Definition at line 67 of file Ray.h.
The documentation for this class was generated from the following files: