boundingSphere 结构 (directxcollision.h)
边界球体对象。
语法
struct BoundingSphere {
XMFLOAT3 Center;
float Radius;
void BoundingSphere() noexcept;
void BoundingSphere(
const BoundingSphere & unnamedParam1
);
BoundingSphere & operator=(
const BoundingSphere & unnamedParam1
);
void BoundingSphere(
BoundingSphere && unnamedParam1
);
BoundingSphere & operator=(
BoundingSphere && unnamedParam1
);
void BoundingSphere(
const XMFLOAT3 & center,
float radius
) noexcept;
void XM_CALLCONV Transform(
BoundingSphere & Out,
FXMMATRIX M
) noexcept;
void XM_CALLCONV Transform(
BoundingSphere & Out,
float Scale,
FXMVECTOR Rotation,
FXMVECTOR Translation
) noexcept;
ContainmentType XM_CALLCONV Contains(
FXMVECTOR Point
) noexcept;
ContainmentType XM_CALLCONV Contains(
FXMVECTOR V0,
FXMVECTOR V1,
FXMVECTOR V2
) noexcept;
ContainmentType Contains(
const BoundingSphere & sh
) noexcept;
ContainmentType Contains(
const BoundingBox & box
) noexcept;
ContainmentType Contains(
const BoundingOrientedBox & box
) noexcept;
ContainmentType Contains(
const BoundingFrustum & fr
) noexcept;
bool Intersects(
const BoundingSphere & sh
) noexcept;
bool Intersects(
const BoundingBox & box
) noexcept;
bool Intersects(
const BoundingOrientedBox & box
) noexcept;
bool Intersects(
const BoundingFrustum & fr
) noexcept;
bool XM_CALLCONV Intersects(
FXMVECTOR V0,
FXMVECTOR V1,
FXMVECTOR V2
) noexcept;
PlaneIntersectionType XM_CALLCONV Intersects(
FXMVECTOR Plane
) noexcept;
bool XM_CALLCONV Intersects(
FXMVECTOR Origin,
FXMVECTOR Direction,
float & Dist
) noexcept;
ContainmentType XM_CALLCONV ContainedBy(
FXMVECTOR Plane0,
FXMVECTOR Plane1,
FXMVECTOR Plane2,
GXMVECTOR Plane3,
HXMVECTOR Plane4,
HXMVECTOR Plane5
) noexcept;
void CreateMerged(
BoundingSphere & Out,
const BoundingSphere & S1,
const BoundingSphere & S2
) noexcept;
void CreateFromBoundingBox(
BoundingSphere & Out,
const BoundingBox & box
) noexcept;
void CreateFromBoundingBox(
BoundingSphere & Out,
const BoundingOrientedBox & box
) noexcept;
void CreateFromPoints(
BoundingSphere & Out,
size_t Count,
const XMFLOAT3 *pPoints,
size_t Stride
) noexcept;
void CreateFromFrustum(
BoundingSphere & Out,
const BoundingFrustum & fr
) noexcept;
};
成员
Center
BoundingSphere 的中心。
Radius
BoundingSphere 的半径。
void BoundingSphere () noexcept
创建 BoundingSphere 类的实例。
void BoundingSphere ( const BoundingSphere & unnamedParam1)
创建 BoundingSphere 类的实例。
BoundingSphere & operator= ( const BoundingSphere & unnamedParam1)
使用指定 BoundingSphere 中的值初始化 BoundingSphere。
void BoundingSphere( BoundingSphere && unnamedParam1)
BoundingSphere & operator= ( BoundingSphere && unnamedParam1)
使用指定 BoundingSphere 中的值初始化 BoundingSphere。
void BoundingSphere ( const XMFLOAT3 & center,float radius) noexcept
创建 BoundingSphere 类的实例。
void XM_CALLCONV Transform ( BoundingSphere & Out, FXMMATRIX M) noexcept
转换 BoundingSphere。
void XM_CALLCONV 转换 ( BoundingSphere & Out、float Scale、FXMVECTOR 旋转、FXMVECTOR 转换) noexcept
使用指定的缩放、旋转和平移向量转换 BoundingSphere。
ContainmentType XM_CALLCONV 包含 ( FXMVECTOR 点) noexcept
测试 BoundingSphere 是否包含指定的点。
ContainmentType XM_CALLCONV 包含 ( FXMVECTOR V0、FXMVECTOR V1、FXMVECTOR V2) noexcept
测试 BoundingSphere 是否包含指定的三角形。
ContainmentType Contains ( const BoundingSphere & sh) noexcept
测试 BoundingSphere 是否包含指定的 BoundingSphere。
ContainmentType 包含 ( const BoundingBox & 框) noexcept
测试 BoundingSphere 是否包含指定的 BoundingBox。
ContainmentType 包含 ( const BoundingOrientedBox & 框) noexcept
测试 BoundingSphere 是否包含指定的 BoundingOrientedBox。
ContainmentType Contains ( const BoundingFrustum & fr) noexcept
测试 BoundingSphere 是否包含指定的 BoundingFrustum。
bool Intersects ( const BoundingSphere & sh) noexcept
测试 BoundingSphere 与 BoundingSphere 的交集。
bool Intersects ( const BoundingBox & box) noexcept
测试 BoundingSphere 与 BoundingBox 的交集。
bool Intersects ( const BoundingOrientedBox & box) noexcept
测试 BoundingSphere 与 BoundingOrientedBox 的交集。
bool Intersects ( const BoundingFrustum & fr) noexcept
测试 BoundingSphere 中与 BoundingFrustum 的交集。
bool XM_CALLCONV intersects ( FXMVECTOR V0、FXMVECTOR V1、FXMVECTOR V2) noexcept
测试 BoundingSphere 中与三角形的交集。
PlaneIntersectionType XM_CALLCONV intersects ( FXMVECTOR Plane) noexcept
测试 BoundingSphere 与平面的交集。
bool XM_CALLCONV intersects ( FXMVECTOR Origin, FXMVECTOR Direction, float & Dist) noexcept
测试 BoundingSphere 中与光线的交集。
测试 BoundingSphere 是否包含在指定的视锥中。
创建包含两个指定 BoundingSphere 对象的 BoundingSphere。
void CreateFromBoundingBox ( BoundingSphere & Out, const BoundingBox & box) noexcept
创建包含指定 BoundingBox 的 BoundingSphere。
void CreateFromBoundingBox ( BoundingSphere & Out, const BoundingOrientedBox & box) noexcept
创建包含指定 BoundingBox 的 BoundingSphere。
从点列表创建新的 BoundingSphere。
void CreateFromFrustum( BoundingSphere & Out, const BoundingFrustum & fr) noexcept
注解
平台要求
Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 以及 Windows SDK for Windows 8。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。要求
标头 | directxcollision.h |