D3DXFRAMECalculateBoundingSphere

Computes the bounding sphere of all the meshes in the frame hierarchy.

HRESULT D3DXFRAMECalculateBoundingSphere(
  CONST D3DXFRAME * pFrameRoot,
  LPD3DXVECTOR3 pObjectCenter,
  FLOAT * pObjectRadius
);

Parameters

pFrameRoot
[in] Pointer to the root node.
pObjectCenter
[out] Returns the center of the bounding sphere.
pObjectRadius
[out] Returns the radius of the 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 values: D3DERR_INVALIDCALL, E_OUTOFMEMORY.

Requirements

Header: Declared in D3dx9anim.h.