Geometry.BoxBoundProbe Method |
Language: |
Determines whether a ray intersects the volume of a bounding box.
Visual Basic Public Shared Function BoxBoundProbe( _
ByVal min As Vector3, _
ByVal max As Vector3, _
ByVal rayPosition As Vector3, _
ByVal rayDirection As Vector3 _
) As BooleanC# public static bool BoxBoundProbe(
Vector3 min,
Vector3 max,
Vector3 rayPosition,
Vector3 rayDirection
);C++ public:
static bool BoxBoundProbe(
Vector3 min,
Vector3 max,
Vector3 rayPosition,
Vector3 rayDirection
);JScript public static function BoxBoundProbe(
min : Vector3,
max : Vector3,
rayPosition : Vector3,
rayDirection : Vector3
) : boolean;
min Microsoft.DirectX.Vector3
A Vector3 structure that describes the lower-left corner of the bounding box. See Remarks.max Microsoft.DirectX.Vector3
A Vector3 structure that describes the upper-right corner of the bounding box. See Remarks.rayPosition Microsoft.DirectX.Vector3
A Vector3 structure that specifies the origin coordinate of the ray.rayDirection Microsoft.DirectX.Vector3
A Vector3 structure that specifies the direction of the ray. This vector should not be (0,0,0), but does not need to be normalized.
System.Boolean
Value that is true if the ray intersects the volume of the bounding box, or false if it does not.
The Geometry.BoxBoundProbe method determines whether the ray intersects the volume of the bounding box, not just the surface of the box.
The values passed to Geometry.BoxBoundProbe are xmin, xmax, ymin, ymax, zmin, and zmax. Thus, the following defines the corners of the bounding box.
xmax, ymax, zmax xmax, ymax, zmin xmax, ymin, zmax xmax, ymin, zmin xmin, ymax, zmax xmin, ymax, zmin xmin, ymin, zmax xmin, ymin, zminThe depth of the bounding box is zmax - zmin in the z direction; ymax - ymin in the y direction, and xmax - xmin in the x direction. For example, with the following minimum and maximum vectors, min (-1, -1, -1) and max (1, 1, 1), the bounding box is defined as follows.
1, 1, 1 1, 1, -1 1, -1, 1 1, -1, -1 -1, 1, 1 -1, 1, -1 -1, -1, 1 -1, -1, -1
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center