BoundingFrustum structure (directxcollision.h)

A bounding frustum object.

Syntax

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;
};

Members

CORNER_COUNT

The number of corners defining the BoundingFrustum.

Origin

The origin of the BoundingFrustum.

Orientation

The orientation of the BoundingFrustum represented as a quaternion.

RightSlope

The slope of the right side of the BoundingFrustum.

LeftSlope

The slope of the left side of the BoundingFrustum.

TopSlope

The slope of the top of the BoundingFrustum.

BottomSlope

The slope of the bottom of the BoundingFrustum.

Near

The distance of the near plane of the BoundingFrustum from its origin.

Far

The distance of the far plane from the origin of the BoundingFrustum.

void BoundingFrustum() noexcept

Creates an instance of BoundingFrustum.

void BoundingFrustum( const BoundingFrustum & unnamedParam1)

Creates an instance of BoundingFrustum.

BoundingFrustum & operator=( const BoundingFrustum & unnamedParam1)

Copies values from another BoundingFrustum.

void BoundingFrustum( BoundingFrustum && unnamedParam1)

Creates an instance of BoundingFrustum.

BoundingFrustum & operator=( BoundingFrustum && unnamedParam1)

Copies values from another BoundingFrustum.

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

Creates an instance of BoundingFrustum.

void BoundingFrustum( CXMMATRIX Projection, bool rhcoords) noexcept

Creates an instance of BoundingFrustum from a left-handed projection matrix.For more info, see BoundingFrustum::CreateFromMatrix.

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

Transforms the BoundingFrustum by the specified transformation matrix.

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

Transforms the BoundingFrustum using the specified scale, rotation and translation vectors.

void GetCorners( XMFLOAT3 *Corners) noexcept

Gets the corners making up the BoundingFrustum.

ContainmentType XM_CALLCONV Contains( FXMVECTOR Point) noexcept

Tests whether the BoundingFrustum contains the specified point.

ContainmentType XM_CALLCONV Contains( FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) noexcept

Tests whether the BoundingFrustum contains the specified triangle.

ContainmentType Contains( const BoundingSphere & sp) noexcept

Tests whether the BoundingFrustum contains the specified BoundingSphere.

ContainmentType Contains( const BoundingBox & box) noexcept

Tests whether the BoundingFrustum contains the specified BoundingBox.

ContainmentType Contains( const BoundingOrientedBox & box) noexcept

Tests whether the BoundingFrustum contains the specified BoundingOrientedBox.

ContainmentType Contains( const BoundingFrustum & fr) noexcept

Tests whether the BoundingFrustum contains the specified BoundingFrustum.

bool Intersects( const BoundingSphere & sh) noexcept

Test the BoundingFrustum for intersection with a BoundingSphere.

bool Intersects( const BoundingBox & box) noexcept

Test the BoundingFrustum for intersection with a BoundingBox.

bool Intersects( const BoundingOrientedBox & box) noexcept

Test the BoundingFrustum for intersection with a BoundingOrientedBox.

bool Intersects( const BoundingFrustum & fr) noexcept

Test the BoundingFrustum for intersection with another BoundingFrustum.

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

Test the BoundingFrustum for intersection with a triangle.

PlaneIntersectionType XM_CALLCONV Intersects( FXMVECTOR Plane) noexcept

Test the BoundingFrustum for intersection with a plane.

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

Test the BoundingFrustum for intersection with a ray.

ContainmentType XM_CALLCONV ContainedBy( FXMVECTOR Plane0, FXMVECTOR Plane1, FXMVECTOR Plane2, GXMVECTOR Plane3, HXMVECTOR Plane4, HXMVECTOR Plane5) noexcept

Tests whether the BoundingFrustum is contained by the specified frustum.

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

Gets the planes making up the BoundingFrustum.

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

Creates a BoundingFrustum from the specified perspective projection matrix.

Remarks

Platform Requirements

Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.

Requirements

Requirement Value
Header directxcollision.h

See also

DirectXMath Library Classes