Physics3DObject Physics3DContactTest::get_hit_object(int index) const { if (!impl->contacts.empty()) return Physics3DObject(impl->contacts[index]->shared_from_this()); else return Physics3DObject(); }
Physics3DObject Physics3DSweepTest::get_hit_object(int index) const { if (!impl->hits.empty()) return Physics3DObject(impl->hits[index].hit_collision_object->shared_from_this()); else return Physics3DObject(); }