MobileRT  1.0
A multi platform C++ CPU progressive Ray Tracer.
MobileRT Namespace Reference

Namespaces

 std
 

Classes

class  AABB
 
class  BVH
 
class  Camera
 
class  CameraLoader
 
struct  Config
 
struct  ErrorType
 
class  Intersection
 
class  Light
 
class  Material
 
class  Naive
 
class  ObjectLoader
 
class  Plane
 
class  Ray
 
class  RegularGrid
 
class  Renderer
 
class  Sampler
 
class  Scene
 
class  Shader
 
class  Sphere
 
class  Texture
 
class  Triangle
 

Functions

AABB surroundingBox (const AABB &box1, const AABB &box2)
 
::std::ostream & operator<< (::std::ostream &os, const Triangle &triangle)
 
static ::std::array< ErrorType, 55 > getErrorType ()
 
ErrorType getErrorCode ()
 
::std::int32_t roundDownToMultipleOf (const ::std::int32_t value, const ::std::int32_t multiple)
 
float haltonSequence (::std::uint32_t index, const ::std::uint32_t base)
 
::std::int32_t incrementalAvg (const ::glm::vec3 &sample, const ::std::int32_t avg, const ::std::int32_t numSample)
 
::glm::vec2 toVec2 (const char *const values)
 
::glm::vec3 toVec3 (const char *const values)
 
::glm::vec3 toVec3 (const float *const values)
 
bool equal (const float a, const float b)
 
bool equal (const ::glm::vec3 &vec1, const ::glm::vec3 &vec2)
 
bool isValid (const float value)
 
::glm::vec2 normalize (const ::glm::vec2 &textureCoordinates)
 
::glm::vec3 normalize (const ::glm::vec3 &color)
 
float fresnel (const ::glm::vec3 &I, const ::glm::vec3 &N, const float ior)
 
void checkSystemError (const char *const message)
 
void printFreeMemory ()
 
template<typename T , ::std::size_t S>
void fillArrayWithHaltonSeq (::std::array< T, S > *values)
 
template<typename T , ::std::size_t S>
void fillArrayWithMersenneTwister (::std::array< T, S > *values)
 
template<typename T , ::std::size_t S>
void fillArrayWithPCG (::std::array< T, S > *values)
 
inline ::std::string getFileName (const char *filepath)
 
template<::std::int32_t S, typename T >
inline ::std::array< T, S > toArray (const char *values)
 
template<::std::int32_t S, typename T >
bool isValid (const ::glm::vec< S, T > &value)
 
template<::std::int32_t S, typename T >
bool hasPositiveValue (const ::glm::vec< S, T > &value)
 
template<::std::int32_t S, typename T >
void addToStringStream (::std::ostringstream *oss, const ::glm::vec< S, T > &parameter)
 
template<typename Type >
void addToStringStream (::std::ostringstream *oss, const Type &parameter)
 
template<typename First , typename... Args>
void addToStringStream (::std::ostringstream *oss, const First &parameter, Args &&... args)
 
template<typename... Args>
::std::string convertToString (Args &&... args)
 

Variables

const float Epsilon {1.0e-06F}
 
const float EpsilonLarge {1.0e-05F}
 
const float RayLengthMax {1.0e+30F}
 
const ::std::int32_t RayDepthMin {1}
 
const ::std::int32_t RayDepthMax {6}
 
const ::std::int32_t NumberOfTiles {256}
 
const ::std::int32_t NumberOfAxes {3}
 
constexpr ::std::int32_t StackSize {512}
 
const ::std::uint32_t ArrayMask {0xFFFFF}
 
constexpr ::std::uint32_t ArraySize {ArrayMask + 1}
 

Function Documentation

◆ addToStringStream() [1/3]

template<::std::int32_t S, typename T >
void MobileRT::addToStringStream ( ::std::ostringstream *  oss,
const ::glm::vec< S, T > &  parameter 
)

Helper method which adds a parameter into the ostringstream.

Template Parameters
SThe size of the vec.
TThe type of the vec.
Parameters
ossThe ostringstream to add the parameters.
parameterThe parameter to add in the ostringstream.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addToStringStream() [2/3]

template<typename Type >
void MobileRT::addToStringStream ( ::std::ostringstream *  oss,
const Type &  parameter 
)

Helper method which adds a parameter into the ostringstream.

Template Parameters
TypeThe type of the argument.
Parameters
ossThe ostringstream to add the parameters.
parameterThe parameter to add in the ostringstream.

◆ addToStringStream() [3/3]

template<typename First , typename... Args>
void MobileRT::addToStringStream ( ::std::ostringstream *  oss,
const First &  parameter,
Args &&...  args 
)

Helper method which add a parameter into the ostringstream.

Template Parameters
FirstThe type of the first argument.
ArgsThe type of the rest of the arguments.
Parameters
ossThe ostringstream to add the parameters.
parameterThe first parameter of the list to add.
argsThe rest of the arguments.
Here is the call graph for this function:

◆ checkSystemError()

void MobileRT::checkSystemError ( const char *const  message)

Checks if there is an error in the system by checking the errno, which is a preprocessor macro used for error indication.

Parameters
messageThe message to be logged in the std::runtime_error that might be thrown.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convertToString()

template<typename... Args>
::std::string MobileRT::convertToString ( Args &&...  args)

Helper method which converts all the parameters to a single string.

Template Parameters
ArgsThe type of the arguments.
Parameters
argsThe arguments to convert to string.
Returns
A string containing all the parameters.
Here is the call graph for this function:

◆ equal() [1/2]

bool MobileRT::equal ( const float  a,
const float  b 
)

Determines whether two floating point values are equal.
This method assumes two floats are equal if the difference between them is less than Epsilon.

Parameters
aA floating point value.
bA floating point value.
Returns
Whether the two values are equal or not.
Here is the caller graph for this function:

◆ equal() [2/2]

bool MobileRT::equal ( const ::glm::vec3 &  vec1,
const ::glm::vec3 &  vec2 
)

Determines whether two ::glm::vec3 are equal.
This method assumes two ::glm::vec3 are equal if the difference between them is less than Epsilon.

Parameters
vec1A vec3 floating point values.
vec2A vec3 floating point values.
Returns
Whether the two vec3 are equal or not.
Here is the call graph for this function:

◆ fillArrayWithHaltonSeq()

template<typename T , ::std::size_t S>
void MobileRT::fillArrayWithHaltonSeq ( ::std::array< T, S > *const  values)

A helper method which prepares an array with random numbers generated.
This method uses the Halton sequence to fill the array and then shuffles the sequence.

Template Parameters
TThe type of the elements in the array.
SThe size of the array.
Parameters
valuesThe pointer to an array where the random numbers should be put.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillArrayWithMersenneTwister()

template<typename T , ::std::size_t S>
void MobileRT::fillArrayWithMersenneTwister ( ::std::array< T, S > *const  values)

A helper method which prepares an array with random numbers generated.
This m