?/TD>
Microsoft DirectX 9.0

D3DXComputeBoundingSphere Function


Computes a bounding sphere for the mesh.

Syntax

HRESULT D3DXComputeBoundingSphere(      

    LPD3DXVECTOR3 pFirstPosition,     DWORD NumVertices,     DWORD dwStride,     D3DXVECTOR3 *pCenter,     FLOAT *pRadius );

Parameters

pFirstPosition
[in] Pointer to first position.
NumVertices
[in] Number of vertices.
dwStride
[in] Number of bytes between position vectors. Use D3DXGetFVFVertexSize to get the stride for a flexible vertex format (FVF).
pCenter
[out] D3DXVECTOR3 structure, defining the coordinate center of the returned bounding sphere.
pRadius
[out] Radius of the returned bounding sphere.

Return Value

If the function succeeds, the return value is D3D_OK.

If the function fails, the return value can be

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.


Function Information

Headerd3dx9mesh.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98


© 2002 Microsoft Corporation. All rights reserved.