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 Transform ( BoundingOrientedBox & Out, FXMMATRIX M) noexcept
轉換 BoundingOrientedBox。
void GetCorners ( XMFLOAT3 *Corners) noexcept
擷取 BoundingOrientedBox 的角落。
ContainmentType XM_CALLCONV Contains ( FXMVECTOR Point) noexcept
測試 BoundingOrientedBox 是否包含指定的點。
ContainmentType XM_CALLCONV 包含 ( FXMVECTOR V0、FXMVECTOR V1、FXMVECTOR V2) noexcept
測試 BoundingOrientedBox 是否包含三角形。
ContainmentType contains ( const BoundingSphere & sh) noexcept
測試 BoundingOrientedBox 是否包含 BoundingSphere。
ContainmentType contains ( const BoundingBox & box) noexcept
測試 BoundingOrientedBox 是否包含 BoundingBox。
ContainmentType Contains ( const BoundingOrientedBox & box) noexcept
測試 BoundingOrientedBox 是否包含 BoundingOrientedBox。
ContainmentType Contains ( 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 是否由 frustum 所包含。
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 |