Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Graphics
Direct3D 9
Reference
D3DX Reference
Functions
Mesh Functions
 D3DXComputeBoundingSphere

  Switch on low bandwidth view
D3DXComputeBoundingSphere
Bb172736.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb172736.XDK_CHM_BANNER_right(en-us,VS.85).jpg

D3DXComputeBoundingSphere

Computes a bounding sphere for the mesh.

HRESULT 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 ID3DXBaseMesh::GetNumBytesPerVertex, D3DXGetFVFVertexSize, or D3DXGetDeclVertexSize to get the vertex stride.
pCenter
[out] D3DXVECTOR3 structure, defining the coordinate center of the returned bounding sphere.
pRadius
[out] Radius of the returned bounding sphere.

Return Values

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

Header: Declared in D3DX9Mesh.h.

Library: Use D3dx9.lib.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker