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 & 運算符= ( BoundingSphere && unnamedParam1)
使用來自指定 BoundingSphere 的值,初始化 BoundingSphere。
void BoundingSphere ( const XMFLOAT3 & center, float radius) noexcept
建立 BoundingSphere 類別的實例。
void XM_CALLCONV Transform ( BoundingSphere & Out, FXMMATRIX M) noexcept
轉換 BoundingSphere。
使用指定的刻度、旋轉和轉譯向量轉換 BoundingSphere。
ContainmentType XM_CALLCONV contains ( FXMVECTOR Point) 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 包含 ( 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 平面) noexcept
測試 BoundingSphere 以與平面交集。
bool XM_CALLCONV Intersects ( FXMVECTOR Origin, FXMVECTOR Direction, float & Dist) noexcept
測試 BoundingSphere 以與光線交集。
測試 BoundingSphere 是否由指定的 frustum 所包含。
建立 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 |