| 670 | //-------------------------------------------------------------------------- |
| 671 | |
| 672 | bool Trigger::testObject(GameBase* enter) |
| 673 | { |
| 674 | if (mTriggerPolyhedron.mPointList.size() == 0) |
| 675 | return false; |
| 676 | |
| 677 | if (!(enter->getTypeMask() & mTrippedBy)) |
| 678 | return false; //not the right type of object |
| 679 | |
| 680 | mClippedList.clear(); |
| 681 | |
| 682 | SphereF sphere; |
| 683 | sphere.center = (mWorldBox.minExtents + mWorldBox.maxExtents) * 0.5; |
| 684 | VectorF bv = mWorldBox.maxExtents - sphere.center; |
| 685 | sphere.radius = bv.len(); |
| 686 | |
| 687 | enter->buildPolyList(PLC_Collision, &mClippedList, mWorldBox, sphere); |
| 688 | return mClippedList.isEmpty() == false; |
| 689 | } |
| 690 | |
| 691 | bool Trigger::testTrippable() |
| 692 | { |
nothing calls this directly
no test coverage detected