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

Method testObject

Engine/source/T3D/physicalZone.cpp:545–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543}
544
545bool PhysicalZone::testObject(SceneObject* enter)
546{
547 // TODO: This doesn't look like it's testing against the polyhedron at
548 // all. And whats the point of building a convex if no collision methods
549 // are implemented?
550
551 if (mPolyhedron.mPointList.size() == 0)
552 return false;
553
554 mClippedList.clear();
555
556 SphereF sphere;
557 sphere.center = (mWorldBox.minExtents + mWorldBox.maxExtents) * 0.5;
558 VectorF bv = mWorldBox.maxExtents - sphere.center;
559 sphere.radius = bv.len();
560
561 enter->buildPolyList(PLC_Collision, &mClippedList, mWorldBox, sphere);
562 return mClippedList.isEmpty() == false;
563}
564
565bool PhysicalZone::testBox( const Box3F &box ) const
566{

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.45
clearMethod · 0.45
lenMethod · 0.45
buildPolyListMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected