MobileRT
1.0
A multi platform C++ CPU progressive Ray Tracer.
|
#include <Naive.hpp>
Public Member Functions | |
Naive ()=default | |
Naive (::std::vector< T > &&primitives) | |
Naive (const Naive &naive)=delete | |
Naive (Naive &&naive) noexcept=default | |
~Naive () | |
Naive & | operator= (const Naive &naive)=delete |
Naive & | operator= (Naive &&naive) noexcept=default |
Intersection | trace (Intersection intersection) |
Intersection | shadowTrace (Intersection intersection) |
const ::std::vector< T > & | getPrimitives () const |
Private Member Functions | |
Intersection | intersect (Intersection intersection) |
Private Attributes | |
::std::vector< T > | primitives_ {} |
A class which represents the Naive acceleration structure.
This is basically a structure where all the primitives are just stored in a vector without any specific order. So, there is no acceleration structure and the intersection method must try to intersect the ray with all the primitives in the vector.
T | The type of the primitives. |
|
explicitdefault |
|
explicit |
The constructor.
T | The type of the primitives. |
primitives | The primitives. |
|
delete |
|
defaultnoexcept |
MobileRT::Naive< T >::~Naive | ( | ) |
The destructor.
T | The type of the primitives. |
const ::std::vector< T > & MobileRT::Naive< T >::getPrimitives | ( | ) | const |
Gets the primitives.
T | The type of the primitives. |
|
private |
Helper method which calculates the intersection point from the origin of the ray.
This method supports two modes:
T | The type of the primitives. |
intersection | The previous intersection point of the ray (used to update its data in case it is found a nearest intersection point. |
|
delete |
|
defaultnoexcept |
Intersection MobileRT::Naive< T >::shadowTrace | ( | Intersection | intersection | ) |
This method casts a ray into the geometry and calculates a random intersection point. The intersection point itself is not important, the important is to determine if the ray intersects some primitive in the scene or not.
T | The type of the primitives. |
intersection | The current intersection of the ray with previous primitives. |
Intersection MobileRT::Naive< T >::trace | ( | Intersection | intersection | ) |
This method casts a ray into the geometry and calculates the nearest intersection point from the origin of the ray.
T | The type of the primitives. |
intersection | The current intersection of the ray with previous primitives. |
|
private |