BoundingBox.Contains

BoundingBox.Contains method

Check if the point p is inside the bounding box

public bool Contains(Vector3 p)
ParameterTypeDescription
pVector3The point to test

Return Value

True if the point is inside the bounding box

Examples

The following code shows how to check if a point is inside the bounding box.

var boundingBox = new BoundingBox(0, 0, 0, 10, 10, 10);
var pt = new Vector3(4, 4, 4);
Console.WriteLine("Bounding box overlaps = " + boundingBox.Contains(pt));

See Also