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

Function SetUp

Engine/source/math/test/mPolyhedronTest.cpp:32–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 Vector<PlaneF> planes;
31
32 virtual void SetUp()
33 {
34 // Build planes for a unit cube centered at the origin.
35 // Note that the normals must be facing inwards.
36 planes.push_back(PlaneF(Point3F(-0.5f, 0.f, 0.f ), Point3F( 1.f, 0.f, 0.f)));
37 planes.push_back(PlaneF(Point3F( 0.5f, 0.f, 0.f ), Point3F(-1.f, 0.f, 0.f)));
38 planes.push_back(PlaneF(Point3F( 0.f, -0.5f, 0.f ), Point3F( 0.f, 1.f, 0.f)));
39 planes.push_back(PlaneF(Point3F( 0.f, 0.5f, 0.f ), Point3F( 0.f, -1.f, 0.f)));
40 planes.push_back(PlaneF(Point3F( 0.f, 0.f, -0.5f), Point3F( 0.f, 0.f, 1.f)));
41 planes.push_back(PlaneF(Point3F( 0.f, 0.f, 0.5f), Point3F( 0.f, 0.f, -1.f)));
42 }
43};
44
45TEST_FIX(Polyhedron, BuildFromPlanes)

Callers

nothing calls this directly

Calls 3

PlaneFClass · 0.50
Point3FClass · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected