Exemplo n.º 1
0
void RigidBody::GetCollidingBodies(ea::vector<RigidBody*>& result) const
{
    if (physicsWorld_)
        physicsWorld_->GetCollidingBodies(result, this);
    else
        result.clear();
}
Exemplo n.º 2
0
void PhysicsWorld2D::Raycast(ea::vector<PhysicsRaycastResult2D>& results, const Vector2& startPoint, const Vector2& endPoint,
    unsigned collisionMask)
{
    results.clear();

    RayCastCallback callback(results, startPoint, collisionMask);
    world_->RayCast(&callback, ToB2Vec2(startPoint), ToB2Vec2(endPoint));
}