Share via


Geometry.BoxBoundProbe Method

Determines whether a ray intersects the volume of a bounding box.

Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)

Syntax

'Declaration
Public Shared Function BoxBoundProbe ( _
    min As Vector3, _
    max As Vector3, _
    rayPosition As Vector3, _
    rayDirection As Vector3 _
) As Boolean
'Usage
Dim min As Vector3
Dim max As Vector3
Dim rayPosition As Vector3
Dim rayDirection As Vector3
Dim returnValue As Boolean

returnValue = Geometry.BoxBoundProbe(min, max, rayPosition, rayDirection)
public static bool BoxBoundProbe (
    Vector3 min,
    Vector3 max,
    Vector3 rayPosition,
    Vector3 rayDirection
)
public:
static bool BoxBoundProbe (
    Vector3 min, 
    Vector3 max, 
    Vector3 rayPosition, 
    Vector3 rayDirection
)
public static boolean BoxBoundProbe (
    Vector3 min, 
    Vector3 max, 
    Vector3 rayPosition, 
    Vector3 rayDirection
)
public static function BoxBoundProbe (
    min : Vector3, 
    max : Vector3, 
    rayPosition : Vector3, 
    rayDirection : Vector3
) : boolean

Parameters

  • min
    A Vector3 structure that describes the lower-left corner of the bounding box.
  • max
    A Vector3 structure that describes the upper-right corner of the bounding box.
  • rayPosition
    A Vector3 structure that specifies the origin coordinate of the ray.
  • rayDirection
    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.

Return Value

true if the ray intersects the volume of the bounding box; otherwise, false.

Remarks

The BoxBoundProbe method determines whether the ray intersects the volume of the bounding box, not just the surface of the box.

The values passed to 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, zmin

The 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

.NET Framework Security

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Platforms

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

Geometry Class
Geometry Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace