Last Updated September 30, 2008
Overview of Collision Detection
Vector3[] points=new Vector3[2];
points[0] = new Vector3(1, 2, 3);
points[1] = new Vector3(2, 1, 3);
BoundingSphere bs1,bs2;
bs1=BoundingSphere.CreateFromPoints(points);
bs2 = new BoundingSphere(new Vector3(0, 0, 0), 5);
if (bs1.Intersects(bs2) == true)
{
//
}
BoundingBox bb= new BoundingBox(new Vector3(0, 0, 0), new Vector3(3, 4, 5));
if (bb.Contains(bs1) == ContainmentType.Contains)
{
//
}
Ray r = new Ray(new Vector3(3, 2, 5), new Vector3(1, 2, 3));
if (r.Intersects(bb) < 10)
{
//
}
BoundingFrustrum
Plane
Model
© Ken Power 2010