Struttura BoundingBox (directxcollision.h)

Oggetto allineato all'asse di delimitazione.

Sintassi

struct BoundingBox {
  size_t                            CORNER_COUNT;
  XMFLOAT3                          Center;
  XMFLOAT3                          Extents;
  void                              BoundingBox() noexcept;
  void                              BoundingBox(
    const BoundingBox & unnamedParam1
  );
  BoundingBox &                     operator=(
    const BoundingBox & unnamedParam1
  );
  void                              BoundingBox(
    BoundingBox && unnamedParam1
  );
  BoundingBox &                     operator=(
    BoundingBox && unnamedParam1
  );
  void                              BoundingBox(
    const XMFLOAT3 & center,
    const XMFLOAT3 & extents
  ) noexcept;
  void XM_CALLCONV                  Transform(
    BoundingBox & Out,
    FXMMATRIX     M
  ) noexcept;
  void XM_CALLCONV                  Transform(
    BoundingBox & 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                              CreateMerged(
    BoundingBox &       Out,
    const BoundingBox & b1,
    const BoundingBox & b2
  ) noexcept;
  void                              CreateFromSphere(
    BoundingBox &          Out,
    const BoundingSphere & sh
  ) noexcept;
  void XM_CALLCONV                  CreateFromPoints(
    BoundingBox & Out,
    FXMVECTOR     pt1,
    FXMVECTOR     pt2
  ) noexcept;
  void                              CreateFromPoints(
    BoundingBox &  Out,
    size_t         Count,
    const XMFLOAT3 *pPoints,
    size_t         Stride
  ) noexcept;
};

Members

CORNER_COUNT

Numero di punti che definiscono BoundingBox.

Center

Centro di BoundingBox.

Extents

Extent di BoundingBox.

void BoundingBox() noexcept

Crea un'istanza della classe BoundingBox.

void BoundingBox( const BoundingBox & unnamedParam1)

Crea un'istanza della classe BoundingBox.

BoundingBox & operator=( const BoundingBox & unnamedParam1)

Copia i valori da un altro boundingBox.

void BoundingBox( BoundingBox && unnamedParam1)

Crea un'istanza della classe BoundingBox.

BoundingBox & operator=( BoundingBox && unnamedParam1)

void BoundingBox( const XMFLOAT3 & center, const XMFLOAT3 & extents) noexcept

Crea un'istanza della classe BoundingBox.

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

Trasforma boundingBox.

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

Trasforma boundingBox.

void GetCorners( XMFLOAT3 *Corners) noexcept

Recupera gli angoli di BoundingBox.

ContainmentType XM_CALLCONV Contains( FXMVECTOR Point) noexcept

Verifica se BoundingBox contiene un punto specificato.

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

Verificare se BoundingBox contiene un triangolo specificato.

ContainmentType Contains( const BoundingSphere & sh) noexcept

Verifica se BoundingBox contiene un boundingSphere specificato.

ContainmentType Contains( const BoundingBox & box) noexcept

Verifica se BoundingBox contiene un altro boundingBox.

ContainmentType Contains( const BoundingOrientedBox & box) noexcept

Verifica se BoundingBox contiene l'oggetto BoundingOrientedBox specificato.

ContainmentType Contains( const BoundingFrustum & fr) noexcept

Verifica se BoundingBox contiene l'oggetto BoundingFrustum specificato.

bool Intersects( const BoundingSphere & sh) noexcept

Testa boundingBox per verificare l'intersezione con un boundingSphere.

bool Intersects( const BoundingBox & box) noexcept

Verifica l'intersezione di BoundingBox con un altro BoundingBox.

bool Intersects( const BoundingOrientedBox & box) noexcept

Testare boundingBox per l'intersezione con un boundingOrientedBox.

bool Intersects( const BoundingFrustum & fr) noexcept

Testare boundingBox per l'intersezione con un boundingFrustum.

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

Testare BoundingBox per l'intersezione con un triangolo.

PlaneIntersectionType XM_CALLCONV Intersects( FXMVECTOR Plane) noexcept

Testare boundingBox per l'intersezione con un piano.

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

Testare boundingBox per l'intersezione con un raggio.

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

Verifica se BoundingBox è contenuto nel frustum specificato.

void CreateMerged( BoundingBox & Out, const BoundingBox & b1, const BoundingBox & b2) noexcept

Crea un boundingBox sufficientemente grande da contenere due istanze BoundBox specificate.

void CreateFromSphere( BoundingBox & Out, const BoundingSphere & sh) noexcept

Crea un boundingBox sufficientemente grande da contenere l'oggetto BoundingSphere specificato.

void XM_CALLCONV CreateFromPoints( BoundingBox & Out, FXMVECTOR pt1, FXMVECTOR pt2) noexcept

Crea un boundingBox da due punti.

void CreateFromPoints( BoundingBox & Out, size_t Count, const XMFLOAT3 *pPoints, size_t Stride) noexcept

Crea un boundingBox da un elenco di punti.

Commenti

Requisiti della piattaforma

Microsoft Visual Studio 2010 o Microsoft Visual Studio 2012 con Windows SDK per Windows 8. Supportato per le app desktop Win32, le app di Windows Store e Windows Phone 8 app.

Usare DirectX.

Requisiti

   
Intestazione directxcollision.h

Vedi anche

Classi della libreria DirectXMath