MobileRT  1.0
A multi platform C++ CPU progressive Ray Tracer.
MobileRT::Intersection Class Referencefinal

#include <Intersection.hpp>

Collaboration diagram for MobileRT::Intersection:
Collaboration graph

Public Member Functions

 Intersection ()=delete
 
 Intersection (Ray &&ray, float dist=RayLengthMax)
 
 Intersection (Ray &&ray, const ::glm::vec3 &intPoint, float dist, const ::glm::vec3 &normal, const void *primitive, ::std::int32_t materialIndex, const ::glm::vec2 &texCoords=::glm::vec2 {-1})
 
 Intersection (const Intersection &intersection)=default
 
 Intersection (Intersection &&intersection) noexcept=default
 
 ~Intersection ()=default
 
Intersectionoperator= (const Intersection &intersection)=delete
 
Intersectionoperator= (Intersection &&intersection) noexcept=default
 

Public Attributes

::glm::vec3 point_ {0.0F, 0.0F, 0.0F}
 
::glm::vec3 normal_ {0.0F, 1.0F, 0.0F}
 
Materialmaterial_ {nullptr}
 
float length_ {RayLengthMax}
 
const void * primitive_ {nullptr}
 
::std::int32_t materialIndex_ {-1}
 
::glm::vec2 texCoords_ {-1.0F, -1.0F}
 
Ray ray_ {::glm::vec3 {}, ::glm::vec3 {}, 0, false}
 

Private Member Functions

void checkArguments () const
 

Detailed Description

A class which represents an intersection of a ray with a primitive.

Constructor & Destructor Documentation

◆ Intersection() [1/5]

MobileRT::Intersection::Intersection ( )
explicitdelete

◆ Intersection() [2/5]

MobileRT::Intersection::Intersection ( Ray &&  ray,
float  dist = RayLengthMax 
)
explicit

◆ Intersection() [3/5]

MobileRT::Intersection::Intersection ( Ray &&  ray,
const ::glm::vec3 &  intPoint,
float  dist,
const ::glm::vec3 &  normal,
const void *  primitive,
::std::int32_t  materialIndex,
const ::glm::vec2 &  texCoords = ::glm::vec2 {-1} 
)
explicit

◆ Intersection() [4/5]

MobileRT::Intersection::Intersection ( const Intersection intersection)
default

◆ Intersection() [5/5]

MobileRT::Intersection::Intersection ( Intersection &&  intersection)
defaultnoexcept

◆ ~Intersection()

MobileRT::Intersection::~Intersection ( )
default

Member Function Documentation

◆ checkArguments()

void Intersection::checkArguments ( ) const
private

Helper method which checks for invalid fields.

Here is the call graph for this function:

◆ operator=() [1/2]

Intersection& MobileRT::Intersection::operator= ( const Intersection intersection)
delete

◆ operator=() [2/2]

Intersection& MobileRT::Intersection::operator= ( Intersection &&  intersection)
defaultnoexcept

Member Data Documentation

◆ length_

float MobileRT::Intersection::length_ {RayLengthMax}

◆ material_

Material* MobileRT::Intersection::material_ {nullptr}

◆ materialIndex_

::std::int32_t MobileRT::Intersection::materialIndex_ {-1}

◆ normal_

::glm::vec3 MobileRT::Intersection::normal_ {0.0F, 1.0F, 0.0F}

◆ point_

::glm::vec3 MobileRT::Intersection::point_ {0.0F, 0.0F, 0.0F}

◆ primitive_

const void* MobileRT::Intersection::primitive_ {nullptr}

◆ ray_

Ray MobileRT::Intersection::ray_ {::glm::vec3 {}, ::glm::vec3 {}, 0, false}

The casted ray into the scene.

◆ texCoords_

::glm::vec2 MobileRT::Intersection::texCoords_ {-1.0F, -1.0F}

The documentation for this class was generated from the following files: