BoundingOrientedBox 结构 (directxcollision.h)
一个面向的边界框对象。
语法
struct BoundingOrientedBox {
size_t CORNER_COUNT;
XMFLOAT3 Center;
XMFLOAT3 Extents;
XMFLOAT4 Orientation;
void BoundingOrientedBox() noexcept;
void BoundingOrientedBox(
const BoundingOrientedBox & unnamedParam1
);
BoundingOrientedBox & operator=(
const BoundingOrientedBox & unnamedParam1
);
void BoundingOrientedBox(
BoundingOrientedBox && unnamedParam1
);
BoundingOrientedBox & operator=(
BoundingOrientedBox && unnamedParam1
);
void BoundingOrientedBox(
const XMFLOAT3 & center,
const XMFLOAT3 & extents,
const XMFLOAT4 & orientation
) noexcept;
void XM_CALLCONV Transform(
BoundingOrientedBox & Out,
FXMMATRIX M
) noexcept;
void XM_CALLCONV Transform(
BoundingOrientedBox & Out,
float Scale,
FXMVECTOR Rotation,
FXMVECTOR Translation
) noexcept;
void GetCorners(
XMFLOAT3 *Corners
) 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 CreateFromBoundingBox(
BoundingOrientedBox & Out,
const BoundingBox & box
) noexcept;
void CreateFromPoints(
BoundingOrientedBox & Out,
size_t Count,
const XMFLOAT3 *pPoints,
size_t Stride
) noexcept;
};
成员
CORNER_COUNT
定义 BoundingOrientedBox 的点数。
Center
BoundingOrientedBox 的中心。
Extents
BoundingOrientedBox 的范围。
Orientation
表示为四元数的 BoundingOrientedBox 的方向。
void BoundingOrientedBox () noexcept
创建 BoundingOrientedBox 的实例。
void BoundingOrientedBox ( const BoundingOrientedBox & unnamedParam1)
创建 BoundingOrientedBox 的实例。
BoundingOrientedBox & operator= ( const BoundingOrientedBox & unnamedParam1)
从另一个 BoundingOrientedBox 复制值。
void BoundingOrientedBox ( BoundingOrientedBox && unnamedParam1)
创建 BoundingOrientedBox 的实例。
BoundingOrientedBox & operator= ( BoundingOrientedBox && unnamedParam1)
从另一个 BoundingOrientedBox 复制值。
创建 BoundingOrientedBox 的实例。
void XM_CALLCONV 转换 ( BoundingOrientedBox & Out, FXMMATRIX M) noexcept
转换 BoundingOrientedBox。
void GetCorners ( XMFLOAT3 *Corners) noexcept
检索 BoundingOrientedBox 的角。
ContainmentType XM_CALLCONV 包含 ( FXMVECTOR 点) noexcept
测试 BoundingOrientedBox 是否包含指定的点。
ContainmentType XM_CALLCONV 包含 ( FXMVECTOR V0、FXMVECTOR V1、FXMVECTOR V2) noexcept
测试 BoundingOrientedBox 是否包含三角形。
ContainmentType 包含 ( const BoundingSphere & sh) noexcept
测试 BoundingOrientedBox 是否包含 BoundingSphere。
ContainmentType 包含 ( const BoundingBox & 框) noexcept
测试 BoundingOrientedBox 是否包含 BoundingBox。
ContainmentType 包含 ( const BoundingOrientedBox & 框) noexcept
测试 BoundingOrientedBox 是否包含 BoundingOrientedBox。
ContainmentType 包含 ( const BoundingFrustum & fr) noexcept
测试 BoundingOrientedBox 是否包含 BoundingFrustum。
bool Intersects ( const BoundingSphere & sh) noexcept
测试 BoundingOrientedBox 与 BoundingSphere 的交集。
bool Intersects ( const BoundingBox & box) noexcept
测试 BoundingOrientedBox 与 BoundingBox 的交集。
bool Intersects ( const BoundingOrientedBox & box) noexcept
测试 BoundingOrientedBox 与 BoundingOrientedBox 的交集。
bool Intersects ( const BoundingFrustum & fr) noexcept
测试 BoundingOrientedBox 与 BoundingFrustum 的交集。
bool XM_CALLCONV Intersects ( FXMVECTOR V0、FXMVECTOR V1、FXMVECTOR V2) noexcept
测试 BoundingOrientedBox 与三角形的交集。
PlaneIntersectionType XM_CALLCONV Intersects ( FXMVECTOR Plane) noexcept
测试 BoundingOrientedBox 与平面的交集。
bool XM_CALLCONV Intersects ( FXMVECTOR Origin、 FXMVECTOR Direction、 float & Dist) noexcept
测试 BoundingOrientedBox 与光线的交集。
测试 BoundingOrientedBox 是否包含在视锥中。
void CreateFromBoundingBox ( BoundingOrientedBox & Out, const BoundingBox & box) noexcept
从 BoundingBox 创建 BoundingOrientedBox。
从点集合创建 BoundingOrientedBox 。
注解
平台要求
Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 与 Windows SDK for Windows 8。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。要求
标头 | directxcollision.h |