D3DXFrameCalculateBoundingSphere function

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

Syntax

HRESULT D3DXFrameCalculateBoundingSphere(
  _In_  const D3DXFRAME     *pFrameRoot,
  _Out_       LPD3DXVECTOR3 pObjectCenter,
  _Out_       FLOAT         *pObjectRadius
);

Parameters

pFrameRoot [in]

Type: const D3DXFRAME*

Pointer to the root node.

pObjectCenter [out]

Type: LPD3DXVECTOR3

Returns the center of the bounding sphere.

pObjectRadius [out]

Type: FLOAT*

Returns the radius of the 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 values: D3DERR_INVALIDCALL, E_OUTOFMEMORY.

Requirements

Requirement Value
Header
D3dx9anim.h
Library
D3dx9.lib

See also

Animation Functions