| 543 | } |
| 544 | |
| 545 | bool 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 | |
| 565 | bool PhysicalZone::testBox( const Box3F &box ) const |
| 566 | { |
nothing calls this directly
no test coverage detected