D3DXComputeBoundingSphere
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXComputeBoundingSphere Function


Computes a bounding sphere for the mesh.

Syntax

HRESULT WINAPI D3DXComputeBoundingSphere(      

    const D3DXVECTOR3 *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


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.