MobileRT
1.0
A multi platform C++ CPU progressive Ray Tracer.
|
#include "MobileRT/Intersection.hpp"
#include "MobileRT/Ray.hpp"
#include "MobileRT/Shapes/Triangle.hpp"
#include "MobileRT/Utils/Utils.hpp"
#include <gtest/gtest.h>
Classes | |
class | TestTriangle |
Namespaces | |
anonymous_namespace{TestTriangle.cpp} | |
Functions | |
void | assertBoxIntersectsTriangle (const ::glm::vec3 &min, const ::glm::vec3 &max, const Triangle &triangle) |
void | assertRayTriangle (const ::glm::vec3 &orig, const ::glm::vec3 &dir, const Triangle &triangle, const bool expectedInt, const void *const primitive=nullptr) |
TEST_F (TestTriangle, TestInvalidConstructor) | |
TEST_F (TestTriangle, TestInvalidConstructor2) | |
TEST_F (TestTriangle, TestConstructor) | |
TEST_F (TestTriangle, ConstructorVALUES) | |
TEST_F (TestTriangle, AABB) | |
TEST_F (TestTriangle, intersectBoxInside01) | |
TEST_F (TestTriangle, intersectBoxInside02) | |
TEST_F (TestTriangle, intersectBoxInside03) | |
TEST_F (TestTriangle, intersectBoxInside04) | |
TEST_F (TestTriangle, intersectBoxInside05) | |
TEST_F (TestTriangle, intersectBoxInside06) | |
TEST_F (TestTriangle, intersectBoxInside07) | |
TEST_F (TestTriangle, intersectBoxInside08) | |
TEST_F (TestTriangle, intersectBoxInside09) | |
TEST_F (TestTriangle, intersectBoxInside10) | |
TEST_F (TestTriangle, ConstructorCOPY) | |
TEST_F (TestTriangle, OperatorLESS) | |
TEST_F (TestTriangle, OperatorMORE) | |
TEST_F (TestTriangle, intersectRayInside01) | |
TEST_F (TestTriangle, intersectRayInside02) | |
TEST_F (TestTriangle, intersectRayInside03) | |
TEST_F (TestTriangle, intersectRayOutside01) | |
TEST_F (TestTriangle, intersectRayOutside02) | |
TEST_F (TestTriangle, intersectRayOutside03) | |
TEST_F (TestTriangle, intersectRayOutside04) | |
TEST_F (TestTriangle, intersectRayOutside05) | |
TEST_F (TestTriangle, intersectRayOutside06) | |
TEST_F (TestTriangle, intersectRayFromPrimitive) | |
Variables | |
const Triangle | anonymous_namespace{TestTriangle.cpp}::triangle2 |
const Triangle | anonymous_namespace{TestTriangle.cpp}::triangle3 |
|
inline |
Helper method that checks if an AABB intersects a Triangle.
min | The minimum point of the AABB. |
max | The maximum point of the AABB. |
triangle | The triangle to check the intersection. |
|
inline |
Helper method that checks if a Ray intersects a Triangle.
orig | The origin of the ray. |
dir | The direction of the ray. |
triangle | The triangle to check the intersection. |
expectedInt | Whether its expected to intersect or not. |
primitive | The primitive where the ray was casted from (default is null). |
TEST_F | ( | TestTriangle | , |
TestInvalidConstructor | |||
) |
Tests the Triangle constructor with invalid parameters.
TEST_F | ( | TestTriangle | , |
TestInvalidConstructor2 | |||
) |
Tests the Triangle constructor with invalid parameters.
TEST_F | ( | TestTriangle | , |
TestConstructor | |||
) |
Tests the Triangle constructor.
TEST_F | ( | TestTriangle | , |
ConstructorVALUES | |||
) |
Tests the Triangle constructor.
TEST_F | ( | TestTriangle | , |
AABB | |||
) |
Tests the calculation of an AABB of a triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside01 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside02 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside03 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside04 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside05 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside06 | |||
) |
TEST_F | ( | TestTriangle | , |
intersectBoxInside07 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside08 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside09 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectBoxInside10 | |||
) |
Tests intersecting an AABB with a Triangle.
TEST_F | ( | TestTriangle | , |
ConstructorCOPY | |||
) |
Tests the copy constructor of a ::glm::vector.
TEST_F | ( | TestTriangle | , |
OperatorLESS | |||
TestTriangle | , | ||
intersectRayOutside06 | |||
) |
Tests the intersection of a Ray with a Triangle.
TEST_F | ( | TestTriangle | , |
intersectRayFromPrimitive | |||
) |
Tests intersecting a Ray with a Triangle and that Ray has the origin from the same Triangle, so it shouldn't intersect.