Microsoft DirectX 8.1 (Visual Basic)

D3DX8.SphereBoundProbe

Determines if a ray intersects the volume of a sphere's bounding box.

object.SphereBoundProbe( _ 
    Center As D3DVECTOR, _ 
    Radius As Single, _ 
    RayPosition As D3DVECTOR, _ 
    Raydirection As D3DVECTOR) As Boolean

Parts

object
Object expression that resolves to a D3DX8 object.
Center
D3DVECTOR type, specifying the center coordinate of the sphere.
Radius
Radius of the sphere.
RayPosition
D3DVECTOR type, specifying the origin coordinate of the ray.
Raydirection
D3DVECTOR type, specifying the direction of the ray.

Return Values

Returns 1 if the ray intersects the volume of the sphere's bounding box. Otherwise, returns 0.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DXERR_INVALIDMESH.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

D3DXSphereBoundProbe determines if the ray intersects the volume of the sphere's bounding box, not just the surface of the sphere.