|
MobileRT
1.0
A multi platform C++ CPU progressive Ray Tracer.
|
#include <Ray.hpp>

Public Member Functions | |
| Ray ()=delete | |
| Ray (const ::glm::vec3 &dir, const ::glm::vec3 &origin, ::std::int32_t depth, bool shadowTrace, const void *primitive=nullptr) | |
| Ray (const Ray &ray)=default | |
| Ray (Ray &&ray) noexcept=default | |
| ~Ray ()=default | |
| Ray & | operator= (const Ray &ray)=delete |
| Ray & | operator= (Ray &&ray) noexcept |
Static Public Member Functions | |
| ::std::uint64_t | getNumberOfCastedRays () noexcept |
| static void | resetIdGenerator () noexcept |
Public Attributes | |
| ::glm::vec3 | origin_ {0} |
| ::glm::vec3 | direction_ {0} |
| ::std::int32_t | depth_ {-1} |
| ::std::uint64_t | id_ {0L} |
| const void * | primitive_ {nullptr} |
| bool | shadowTrace_ {false} |
Private Member Functions | |
| void | checkArguments () const |
A class which represents a ray casted into the scene.
A ray consists of an origin and a direction of a vector.
|
explicitdelete |
|
explicit |
|
default |
|
defaultnoexcept |
|
default |
|
private |
Helper method which checks for invalid fields.

|
staticnoexcept |
Helper method that gets the number of casted rays in the scene.

|
staticnoexcept |
| ::std::int32_t MobileRT::Ray::depth_ {-1} |
The number of bounces of the ray.
| ::glm::vec3 MobileRT::Ray::direction_ {0} |
The direction of the ray.
| ::std::uint64_t MobileRT::Ray::id_ {0L} |
The identifier of the ray.
| ::glm::vec3 MobileRT::Ray::origin_ {0} |
The origin of the ray.
| const void* MobileRT::Ray::primitive_ {nullptr} |
The pointer to the primitive from where the ray was casted from. This is useful to avoid a plane casting a ray that intersects itself.
| bool MobileRT::Ray::shadowTrace_ {false} |
Whether it shouldn't find the nearest intersection point.