Пример #1
0
    public override CollisionInfo CollisionTests(CollisionHull3D other)
    {
        switch (other.hullType)
        {
        case CollisionHull3D.PhysDetect.Circle:
            return(CollisionHull3D.CircleOBB(other as CircleCollision3D, this));

        case CollisionHull3D.PhysDetect.AABB:
            return(CollisionHull3D.AABBOBB(other as AxisAllignedBoundingBoxCollision3D, this));

        case CollisionHull3D.PhysDetect.OBB:
            return(CollisionHull3D.OBBOBB(this, other as ObjectBoundingBoxCollision3D));

        default:
            break;
        }

        return(null);
    }