D3DXComputeBoundingBox function (D3DX9Mesh.h)

Note

The D3DX utility library is deprecated. We recommend that you use DirectXMath instead.

Computes a coordinate-axis oriented bounding box.

Syntax

HRESULT D3DXComputeBoundingBox(
  _In_  const D3DXVECTOR3 *pFirstPosition,
  _In_        DWORD       NumVertices,
  _In_        DWORD       dwStride,
  _Out_       D3DXVECTOR3 *pMin,
  _Out_       D3DXVECTOR3 *pMax
);

Parameters

pFirstPosition [in]

Type: const D3DXVECTOR3*

Pointer to the first position.

NumVertices [in]

Type: DWORD

Number of vertices.

dwStride [in]

Type: DWORD

Count or number of bytes between vertices.

pMin [out]

Type: D3DXVECTOR3*

Pointer to a D3DXVECTOR3 structure, describing the returned lower-left corner of the bounding box. See Remarks.

pMax [out]

Type: D3DXVECTOR3*

Pointer to a D3DXVECTOR3 structure, describing the returned upper-right corner of the bounding box. See Remarks.

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.

Remarks

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

Mesh Functions