adjusted BVH improved 2D/3D BVH new bounding volumes new test cases renamed some test-cases for grouping reasons made GPC header-only using slight adjustments
25 lines
370 B
C++
25 lines
370 B
C++
#ifdef WITH_TESTS
|
|
|
|
#include "../Tests.h"
|
|
#include "../../geo/Point3.h"
|
|
|
|
TEST(Geo_Point3, math) {
|
|
|
|
Point3 p1(1,2,3);
|
|
p1 += Point3(2,3,4);
|
|
ASSERT_EQ(p1, Point3(3,5,7));
|
|
|
|
Point3 p2 = Point3(-2,-1,-4) + p1;
|
|
ASSERT_EQ(p2, Point3(1, 4, 3));
|
|
|
|
p2 -= Point3(1, 2, 3);
|
|
ASSERT_EQ(p2, Point3(0,2,0));
|
|
|
|
Point3 p3 = Point3(1,2,3)*2;
|
|
ASSERT_EQ(p3, Point3(2,4,6));
|
|
|
|
|
|
}
|
|
|
|
#endif
|