boundingFrustum 結構 (directxcollision.h)

周框 frustum 物件。

語法

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 Projection, bool rhcoords) noexcept

從左側投影矩陣建立 BoundingFrustum 的實例。如需詳細資訊,請參閱 BoundingFrustum::CreateFromMatrix

void XM_CALLCONV Transform ( BoundingFrustum & Out, FXMMATRIX M) noexcept

依指定的轉換矩陣轉換 BoundingFrustum

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

使用指定的尺規、旋轉和轉譯向量來轉換 BoundingFrustum

void GetCorners ( XMFLOAT3 *Corners) noexcept

取得組成 BoundingFrustum 的邊角。

ContainmentType XM_CALLCONV Contains ( FXMVECTOR Point) noexcept

測試 BoundingFrustum 是否包含指定的點。

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

測試 BoundingFrustum 是否包含指定的三角形。

ContainmentType Contains ( const BoundingSphere & sp) noexcept

測試 BoundingFrustum 是否包含指定的 BoundingSphere

ContainmentType contains ( const BoundingBox & box) noexcept

測試 BoundingFrustum 是否包含指定的 BoundingBox

ContainmentType Contains ( const BoundingOrientedBox & box) noexcept

測試 BoundingFrustum 是否包含指定的 BoundingOrientedBox

ContainmentType Contains ( const BoundingFrustum & fr) noexcept

測試 BoundingFrustum 是否包含指定的 BoundingFrustum

bool Intersects ( const BoundingSphere & sh) noexcept

測試 BoundingFrustum 以與 BoundingSphere 交集。

bool Intersects ( const BoundingBox & box) noexcept

測試 BoundingFrustum 以與 BoundingBox 交集。

bool Intersects ( const BoundingOrientedBox & box) noexcept

測試 BoundingFrustum 以與 BoundingOrientedBox 交集。

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 是否由指定的 frustum 所包含。

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 連結庫類別