MobileRT
1.0
A multi platform C++ CPU progressive Ray Tracer.
|
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 > ¶meter) |
template<typename Type > | |
void | addToStringStream (::std::ostringstream *oss, const Type ¶meter) |
template<typename First , typename... Args> | |
void | addToStringStream (::std::ostringstream *oss, const First ¶meter, 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} |
void MobileRT::addToStringStream | ( | ::std::ostringstream * | oss, |
const ::glm::vec< S, T > & | parameter | ||
) |
Helper method which adds a parameter into the ostringstream.
S | The size of the vec. |
T | The type of the vec. |
oss | The ostringstream to add the parameters. |
parameter | The parameter to add in the ostringstream. |
void MobileRT::addToStringStream | ( | ::std::ostringstream * | oss, |
const Type & | parameter | ||
) |
Helper method which adds a parameter into the ostringstream.
Type | The type of the argument. |
oss | The ostringstream to add the parameters. |
parameter | The parameter to add in the ostringstream. |
void MobileRT::addToStringStream | ( | ::std::ostringstream * | oss, |
const First & | parameter, | ||
Args &&... | args | ||
) |
Helper method which add a parameter into the ostringstream.
First | The type of the first argument. |
Args | The type of the rest of the arguments. |
oss | The ostringstream to add the parameters. |
parameter | The first parameter of the list to add. |
args | The rest of the arguments. |
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.
message | The message to be logged in the std::runtime_error that might be thrown. |
::std::string MobileRT::convertToString | ( | Args &&... | args | ) |
Helper method which converts all the parameters to a single string.
Args | The type of the arguments. |
args | The arguments to convert to string. |
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.
a | A floating point value. |
b | A floating point value. |
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.
vec1 | A vec3 floating point values. |
vec2 | A vec3 floating point values. |
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.
T | The type of the elements in the array. |
S | The size of the array. |
values | The pointer to an array where the random numbers should be put. |
void MobileRT::fillArrayWithMersenneTwister | ( | ::std::array< T, S > *const | values | ) |
A helper method which prepares an array with random numbers generated.
This m