BoundingFrustum 结构 (directxcollision.h)

边界视锥对象。

语法

struct BoundingFrustum {
  size_t                            CORNER_COUNT;
  XMFLOAT3                          Origin;
  XMFLOAT4                          Orientation;
  float                             RightSlope;
  float                             LeftSlope;
  float                             TopSlope;
  float                             BottomSlope;
  float                             Near;
  float                             Far;
  void                              BoundingFrustum() noexcept;
  void                              BoundingFrustum(
    const BoundingFrustum & unnamedParam1
  );
  BoundingFrustum &                 operator=(
    const BoundingFrustum & unnamedParam1
  );
  void                              BoundingFrustum(
    BoundingFrustum && unnamedParam1
  );
  BoundingFrustum &                 operator=(
    BoundingFrustum && unnamedParam1
  );
  void                              BoundingFrustum(
    const XMFLOAT3 & origin,
    const XMFLOAT4 & orientation,
    float            rightSlope,
    float            leftSlope,
    float            topSlope,
    float            bottomSlope,
    float            nearPlane,
    float            farPlane
  ) noexcept;
  void                              BoundingFrustum(
    CXMMATRIX Projection,
    bool      rhcoords
  ) noexcept;
  void XM_CALLCONV                  Transform(
    BoundingFrustum & Out,
    FXMMATRIX         M
  ) noexcept;
  void XM_CALLCONV                  Transform(
    BoundingFrustum & 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 & sp
  ) 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 rayOrigin,
    FXMVECTOR Direction,
    float &   Dist
  ) noexcept;
  ContainmentType XM_CALLCONV       ContainedBy(
    FXMVECTOR Plane0,
    FXMVECTOR Plane1,
    FXMVECTOR Plane2,
    GXMVECTOR Plane3,
    HXMVECTOR Plane4,
    HXMVECTOR Plane5
  ) noexcept;
  void                              GetPlanes(
    XMVECTOR *NearPlane,
    XMVECTOR *FarPlane,
    XMVECTOR *RightPlane,
    XMVECTOR *LeftPlane,
    XMVECTOR *TopPlane,
    XMVECTOR *BottomPlane
  ) noexcept;
  void XM_CALLCONV                  CreateFromMatrix(
    BoundingFrustum & Out,
    FXMMATRIX         Projection,
    bool              rhcoords
  ) noexcept;
};

成员

CORNER_COUNT

定义 BoundingFrustum 的角数。

Origin

BoundingFrustum 的原点。

Orientation

表示为四元数的 BoundingFrustum 的方向。

RightSlope

BoundingFrustum 右侧的斜率。

LeftSlope

BoundingFrustum 左侧的斜率。

TopSlope

BoundingFrustum 顶部的斜率。

BottomSlope

BoundingFrustum 底部的斜率。

Near

BoundingFrustum 的近平面与其原点的距离。

Far

远平面与 BoundingFrustum 原点的距离。

void BoundingFrustum () noexcept

创建 BoundingFrustum 的实例。

void BoundingFrustum ( const BoundingFrustum & unnamedParam1)

创建 BoundingFrustum 的实例。

BoundingFrustum & operator= ( const BoundingFrustum & unnamedParam1)

从另一个 BoundingFrustum 复制值。

void BoundingFrustum ( BoundingFrustum && unnamedParam1)

创建 BoundingFrustum 的实例。

BoundingFrustum & operator= ( BoundingFrustum && unnamedParam1)

从另一个 BoundingFrustum 复制值。

void BoundingFrustum ( const XMFLOAT3 & origin, const XMFLOAT4 & orientation, float rightSlope, float leftSlope, float topSlope, float bottomSlope, float nearPlane, float farPlane) noexcept

创建 BoundingFrustum 的实例。

void BoundingFrustum ( CXMMATRIX 投影, bool rhcoords) noexcept

从左侧投影矩阵创建 BoundingFrustum 的实例。有关详细信息,请参阅 BoundingFrustum::CreateFromMatrix

void XM_CALLCONV 转换 ( BoundingFrustum & Out, FXMMATRIX M) noexcept

通过指定的转换矩阵转换 BoundingFrustum

void XM_CALLCONV 转换 ( BoundingFrustum & Out, float Scale, FXMVECTOR Rotation, FXMVECTOR Translation) noexcept

使用指定的刻度、旋转和平移向量转换 BoundingFrustum

void GetCorners ( XMFLOAT3 *Corners) noexcept

获取组成 BoundingFrustum 的角。

ContainmentType XM_CALLCONV 包含 ( FXMVECTOR 点) noexcept

测试 BoundingFrustum 是否包含指定的点。

ContainmentType XM_CALLCONV 包含 ( FXMVECTOR V0、FXMVECTOR V1、FXMVECTOR V2) noexcept

测试 BoundingFrustum 是否包含指定的三角形。

ContainmentType 包含 ( const BoundingSphere & sp) noexcept

测试 BoundingFrustum 是否包含指定的 BoundingSphere

ContainmentType 包含 ( const BoundingBox & 框) noexcept

测试 BoundingFrustum 是否包含指定的 BoundingBox

ContainmentType 包含 ( const BoundingOrientedBox & 框) noexcept

测试 BoundingFrustum 是否包含指定的 BoundingOrientedBox

ContainmentType 包含 ( const BoundingFrustum & fr) noexcept

测试 BoundingFrustum 是否包含指定的 BoundingFrustum

bool Intersects ( const BoundingSphere & sh) noexcept

测试 BoundingFrustumBoundingSphere 的交集。

bool Intersects ( const BoundingBox & box) noexcept

测试 BoundingFrustumBoundingBox 的交集。

bool Intersects ( const BoundingOrientedBox & box) noexcept

测试 BoundingFrustumBoundingOrientedBox 的交集。

bool Intersects ( const BoundingFrustum & fr) noexcept

测试 BoundingFrustum 与另一个 BoundingFrustum 的交集。

bool XM_CALLCONV Intersects ( FXMVECTOR V0、FXMVECTOR V1、FXMVECTOR V2) noexcept

测试 BoundingFrustum 与三角形的交集。

PlaneIntersectionType XM_CALLCONV Intersects ( FXMVECTOR Plane) noexcept

测试 BoundingFrustum 与平面的交集。

bool XM_CALLCONV Intersects ( FXMVECTOR rayOrigin、 FXMVECTOR Direction、 float & Dist) noexcept

测试 BoundingFrustum 与光线的交集。

ContainmentType XM_CALLCONV ContainBy ( FXMVECTOR Plane0、FXMVECTOR Plane1、FXMVECTOR Plane2、GXMVECTOR Plane3、HXMVECTOR Plane4、HXMVECTOR Plane5) noexcept

测试 BoundingFrustum 是否包含在指定的视锥中。

void GetPlanes ( XMVECTOR *NearPlane, XMVECTOR *FarPlane, XMVECTOR *RightPlane, XMVECTOR *LeftPlane, XMVECTOR *TopPlane, XMVECTOR *BottomPlane) noexcept

获取组成 BoundingFrustum 的平面。

void XM_CALLCONV CreateFromMatrix ( BoundingFrustum & Out, FXMMATRIX Projection, bool rhcoords) noexcept

从指定的透视投影矩阵创建 BoundingFrustum

注解

平台要求

Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 与 Windows SDK for Windows 8。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。

要求

   
标头 directxcollision.h

另请参阅

DirectXMath 库类