---
UID: NF:directxcollision.BoundingSphere.CreateFromBoundingBox(BoundingSphere &,const BoundingOrientedBox &)
title: BoundingSphere::CreateFromBoundingBox(BoundingSphere &,const BoundingOrientedBox &)
description: Creates a BoundingSphere containing the specified BoundingBox.
old-location: dxmath\boundingsphere_createfromboundingbox.htm
tech.root: dxmath
ms.assetid: M:Microsoft.directx_sdk.directxcollision.BoundingSphere.CreateFromBoundingBox(BoundingSphere@,BoundingBox)
ms.date: 12/05/2018
ms.keywords: BoundingSphere interface [DirectX Math Support APIs],CreateFromBoundingBox method, BoundingSphere.CreateFromBoundingBox, BoundingSphere.CreateFromBoundingBox(BoundingSphere &,const BoundingOrientedBox &), BoundingSphere::CreateFromBoundingBox, BoundingSphere::CreateFromBoundingBox(BoundingSphere &,const BoundingOrientedBox &), CreateFromBoundingBox, CreateFromBoundingBox method [DirectX Math Support APIs], CreateFromBoundingBox method [DirectX Math Support APIs],BoundingSphere interface, Use DirectX..BoundingSphere.CreateFromBoundingBox, Use DirectX::::BoundingSphere::CreateFromBoundingBox, dxmath.boundingsphere_createfromboundingbox
f1_keywords:
- directxcollision/BoundingSphere.CreateFromBoundingBox
dev_langs:
- c++
req.header: directxcollision.h
req.include-header: 
req.target-type: Windows
req.target-min-winverclnt: 
req.target-min-winversvr: 
req.kmdf-ver: 
req.umdf-ver: 
req.ddi-compliance: 
req.unicode-ansi: 
req.idl: 
req.max-support: 
req.namespace: Use DirectX.
req.assembly: 
req.type-library: 
req.lib: 
req.dll: 
req.irql: 
topic_type:
- APIRef
- kbSyntax
api_type:
- COM
api_location:
- DirectXCollision.h
api_name:
- BoundingSphere.CreateFromBoundingBox
targetos: Windows
req.typenames: 
req.redist: 
ms.custom: 19H1
---

# BoundingSphere::CreateFromBoundingBox(BoundingSphere &,const BoundingOrientedBox &)


## -description


Creates a BoundingSphere containing the specified BoundingBox.


## -parameters




### -param Out [out, ref]

The new BoundingSphere.


### -param box [in, ref]

The BoundingBox the new BoundingSphere should contain.


## -returns



This method does not return a value.




## -remarks



<h3><a id="Platform_Requirements"></a><a id="platform_requirements"></a><a id="PLATFORM_REQUIREMENTS"></a>Platform Requirements</h3>
Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.




## -see-also




[BoundingSphere](/windows/win32/api/directxcollision/ns-directxcollision-boundingsphere)



<a href="https://msdn.microsoft.com/28E771F0-B18F-459D-99C5-ABC43869A15A">Methods</a>



<b>Reference</b>
 

 

