MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / TEST

Function TEST

Engine/source/math/test/mBoxTest.cpp:27–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "math/mBox.h"
26
27TEST(Box3F, GetOverlap)
28{
29 Box3F b1(Point3F(-1, -1, -1), Point3F(1, 1, 1));
30 EXPECT_EQ(b1.getOverlap(b1), b1)
31 << "A box's overlap with itself should be itself.";
32
33 Box3F b2(Point3F(0, 0, 0), Point3F(1, 1, 1));
34 EXPECT_EQ(b1.getOverlap(b2), b2)
35 << "Box's overlap should be the intersection of two boxes.";
36
37 Box3F b3(Point3F(10, 10, 10), Point3F(11, 11, 11));
38 EXPECT_TRUE(b1.getOverlap(b3).isEmpty())
39 << "Overlap of boxes that do not overlap should be empty.";
40}
41
42#endif

Callers

nothing calls this directly

Calls 3

getOverlapMethod · 0.80
Point3FClass · 0.50
isEmptyMethod · 0.45

Tested by

no test coverage detected