MobileRT  1.0
A multi platform C++ CPU progressive Ray Tracer.
TestPlane.cpp File Reference
#include "MobileRT/Shapes/Plane.hpp"
#include <gtest/gtest.h>
Include dependency graph for TestPlane.cpp:

Classes

class  TestPlane
 

Namespaces

 anonymous_namespace{TestPlane.cpp}
 

Functions

 TEST_F (TestPlane, TestInvalidConstructor)
 
 TEST_F (TestPlane, TestInvalidConstructor2)
 
 TEST_F (TestPlane, TestInvalidConstructor3)
 
 TEST_F (TestPlane, TestConstructor)
 
 TEST_F (TestPlane, TestCopyConstructor)
 
 TEST_F (TestPlane, TestMoveConstructor)
 
 TEST_F (TestPlane, IntersectBoxOutsideX)
 
 TEST_F (TestPlane, IntersectBoxInsideX)
 
 TEST_F (TestPlane, IntersectBoxOutsideY)
 
 TEST_F (TestPlane, IntersectBoxInsideY)
 
 TEST_F (TestPlane, IntersectBoxOutsideZ)
 
 TEST_F (TestPlane, IntersectBoxInsideZ)
 
 TEST_F (TestPlane, IntersectBoxInsideZ2)
 
 TEST_F (TestPlane, DistancePoint)
 
 TEST_F (TestPlane, IntersectBoxBorderX)
 
 TEST_F (TestPlane, IntersectBoxBorderY)
 
 TEST_F (TestPlane, IntersectBoxBorderZ)
 
 TEST_F (TestPlane, Box)
 
 TEST_F (TestPlane, IntersectionRayOutsideX)
 
 TEST_F (TestPlane, IntersectionRayInsideX)
 

Variables

const AABB anonymous_namespace{TestPlane.cpp}::box {::glm::vec3 {0, 0, -1.5F}, ::glm::vec3 {0, 1, 2.5F}}
 

Function Documentation

◆ TEST_F() [1/20]

TEST_F ( TestPlane  ,
TestInvalidConstructor   
)

Tests the Plane constructor with invalid parameters. In this case the normal has length of 0 and should be 1.

◆ TEST_F() [2/20]

TEST_F ( TestPlane  ,
TestInvalidConstructor2   
)

Tests the Plane constructor with invalid parameters. In this case the normal have an infinite value but should have a length of 1.

◆ TEST_F() [3/20]

TEST_F ( TestPlane  ,
TestInvalidConstructor3   
)

Tests the Plane constructor with invalid parameters. In this case the normal have a NaN value but should have a length of 1.

◆ TEST_F() [4/20]

TEST_F ( TestPlane  ,
TestConstructor   
)

Tests the Plane constructor.

Here is the call graph for this function:

◆ TEST_F() [5/20]

TEST_F ( TestPlane  ,
TestCopyConstructor   
)

Tests the Plane copy constructor.

Here is the call graph for this function:

◆ TEST_F() [6/20]

TEST_F ( TestPlane  ,
TestMoveConstructor   
)

Tests the Plane move constructor.

Here is the call graph for this function:

◆ TEST_F() [7/20]

TEST_F ( TestPlane  ,
IntersectBoxOutsideX   
)

Tests intersecting an AABB with a plane. The AABB in this case should not intersect the plane.

◆ TEST_F() [8/20]

TEST_F ( TestPlane  ,
IntersectBoxInsideX   
)

Tests intersecting an AABB with a plane. The AABB in this case should intersect the plane.

◆ TEST_F() [9/20]

TEST_F ( TestPlane  ,
IntersectBoxOutsideY   
)

Tests intersecting an AABB with a plane. The AABB in this case should not intersect the plane.

◆ TEST_F() [10/20]

TEST_F ( TestPlane  ,
IntersectBoxInsideY   
)

Tests intersecting an AABB with a plane. The AABB in this case should intersect the plane.

◆ TEST_F() [11/20]

TEST_F ( TestPlane  ,
IntersectBoxOutsideZ   
)

Tests intersecting an AABB with a plane. The AABB in this case should not intersect the plane.

◆ TEST_F() [12/20]

TEST_F ( TestPlane  ,
IntersectBoxInsideZ   
)

Tests intersecting an AABB with a plane. The AABB in this case should intersect the plane.

◆ TEST_F() [13/20]

TEST_F ( TestPlane  ,
IntersectBoxInsideZ2   
)

Tests intersecting an AABB with a plane. The AABB in this case should intersect the plane.

◆ TEST_F() [14/20]

TEST_F ( TestPlane  ,
DistancePoint   
)

Tests the calculation of the distance between a point and the plane.

◆ TEST_F() [15/20]

TEST_F ( TestPlane  ,
IntersectBoxBorderX   
)

Tests intersect an AABB with a plane. In this case it should intersect because of the border in axis X of the AABB.

◆ TEST_F() [16/20]

TEST_F ( TestPlane  ,
IntersectBoxBorderY   
)

Tests intersect an AABB with a plane. In this case it should intersect because of the border in axis Y of the AABB.

◆ TEST_F() [17/20]

TEST_F ( TestPlane  ,
IntersectBoxBorderZ   
)

Tests intersect an AABB with a plane. In this case it should intersect because of the border in axis Z of the AABB.

◆ TEST_F() [18/20]

TEST_F ( TestPlane  ,
Box   
)

Tests the calculation of an AABB around a plane. To get the AABB of a plane, it must calculate first the right vector and then multiply it by 100.

◆ TEST_F() [19/20]

TEST_F ( TestPlane  ,
IntersectionRayOutsideX   
)

Tests the intersection of a Ray with a Plane. The intersection shouldn't happen since the Ray started in the axis X with value 0 and the direction is positive of that axis, but the plane is placed in the other side.

◆ TEST_F() [20/20]

TEST_F ( TestPlane  ,
IntersectionRayInsideX   
)

Tests the intersection of a Ray with a Plane. The intersection should happen since the Ray started in the axis X with value 0 and the direction is negative of that axis.