Thea
|
A description of the intersection point of a ray with an object. More...
#include <RayIntersectableN.hpp>
Public Types | |
typedef Vector< N, T > | VectorT |
N-dimensional vector. More... | |
Public Member Functions | |
VectorT const & | getNormal () const |
Get the normal at the intersection point. More... | |
T | getTime () const |
Get the intersection time. More... | |
bool | hasNormal () const |
Check if the normal at the intersection point is known. More... | |
bool | isValid () const |
Check if the intersection is valid. More... | |
RayIntersectionN (T time_=-1, VectorT const *normal_=nullptr) | |
Constructor. More... | |
void | setNormal (VectorT const &normal_) |
Set the normal at the intersection point. More... | |
void | setTime (T time_) |
Set the intersection time. More... | |
A description of the intersection point of a ray with an object.
Specifies the hit time and the normal at the intersection point.
Definition at line 28 of file RayIntersectableN.hpp.
N-dimensional vector.
Definition at line 31 of file RayIntersectableN.hpp.
RayIntersectionN | ( | T | time_ = -1 , |
VectorT const * | normal_ = nullptr |
||
) |
Constructor.
Definition at line 40 of file RayIntersectableN.hpp.
VectorT const& getNormal | ( | ) | const |
Get the normal at the intersection point.
The return value is undefined if hasNormal() returns false.
Definition at line 57 of file RayIntersectableN.hpp.
T getTime | ( | ) | const |
Get the intersection time.
Definition at line 48 of file RayIntersectableN.hpp.
bool hasNormal | ( | ) | const |
Check if the normal at the intersection point is known.
Definition at line 54 of file RayIntersectableN.hpp.
bool isValid | ( | ) | const |
Check if the intersection is valid.
Definition at line 45 of file RayIntersectableN.hpp.
void setNormal | ( | VectorT const & | normal_ | ) |
Set the normal at the intersection point.
hasNormal() will subsequently return true.
Definition at line 60 of file RayIntersectableN.hpp.
void setTime | ( | T | time_ | ) |
Set the intersection time.
Definition at line 51 of file RayIntersectableN.hpp.