D3DXComputeBoundingSphere function (D3DX10math.h)
Note
The D3DX10 utility library is deprecated. We recommend that you use DirectXMath instead.
Computes a bounding sphere for the mesh.
Syntax
HRESULT D3DXComputeBoundingSphere(
_In_ const D3DXVECTOR3 *pFirstPosition,
_In_ DWORD NumVertices,
_In_ DWORD dwStride,
_In_ D3DXVECTOR3 *pCenter,
_In_ FLOAT *pRadius
);
Parameters
-
pFirstPosition [in]
-
Type: const D3DXVECTOR3*
Pointer to first position.
-
NumVertices [in]
-
Type: DWORD
Number of vertices.
-
dwStride [in]
-
Type: DWORD
Number of bytes between position vectors.
-
pCenter [in]
-
Type: D3DXVECTOR3*
D3DXVECTOR3 structure, defining the coordinate center of the returned bounding sphere.
-
pRadius [in]
-
Type: FLOAT*
Radius of the returned bounding sphere.
Return value
Type: HRESULT
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also