Estrutura BoundingSphere (directxcollision.h)

Um objeto de esfera delimitadora.

Sintaxe

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

Membros

Center

O centro do BoundingSphere.

Radius

O raio do BoundingSphere.

void BoundingSphere() noexcept

Cria uma instância da classe BoundingSphere .

void BoundingSphere( const BoundingSphere & unnamedParam1)

Cria uma instância da classe BoundingSphere.

BoundingSphere & operator=( const BoundingSphere & unnamedParam1)

Inicializa o BoundingSphere com valores de um BoundingSphere especificado.

void BoundingSphere( BoundingSphere && unnamedParam1)

BoundingSphere & operator=( BoundingSphere && unnamedParam1)

Inicializa o BoundingSphere com valores de um BoundingSphere especificado.

void BoundingSphere( const XMFLOAT3 & center, float radius) noexcept

Cria uma instância da classe BoundingSphere.

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

Transforma o BoundingSphere.

Void XM_CALLCONV Transform( BoundingSphere & Out, float Scale, FXMVECTOR Rotation, FXMVECTOR Translation) noexcept

Transforma o BoundingSphere usando os vetores de escala, rotação e tradução especificados.

ContainmentType XM_CALLCONV Contains( FXMVECTOR Point) noexcept

Testa se o BoundingSphere contém um ponto especificado.

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

Testa se o BoundingSphere contém um triângulo especificado.

ContainmentType Contains( const BoundingSphere & sh) noexcept

Testa se o BoundingSphere contém um BoundingSphere especificado.

ContainmentType Contains( const BoundingBox & box) noexcept

Testa se o BoundingSphere contém um BoundingBox especificado.

ContainmentType Contains( const BoundingOrientedBox & box) noexcept

Testa se o BoundingSphere contém o BoundingOrientedBox especificado.

ContainmentType Contains( const BoundingFrustum & fr) noexcept

Testa se o BoundingSphere contém o BoundingFrustum especificado.

bool Intersects( const BoundingSphere & sh) noexcept

Testa o BoundingSphere para interseção com um BoundingSphere.

bool Intersects( const BoundingBox & box) noexcept

Testa o BoundingSphere para interseção com um BoundingBox.

bool Intersects( const BoundingOrientedBox & box) noexcept

Teste o BoundingSphere para interseção com boundingOrientedBox.

bool Intersects( const BoundingFrustum & fr) noexcept

Teste o BoundingSphere para interseção com um BoundingFrustum.

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

Testa o BoundingSphere para interseção com um triângulo.

PlaneIntersectionType XM_CALLCONV Intersects( FXMVECTOR Plane) noexcept

Testa o BoundingSphere para interseção com um Plano.

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

Testa o BoundingSphere para interseção com um raio.

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

Testa se o BoundingSphere está contido pelo frusto especificado.

void CreateMerged( BoundingSphere & Out, const BoundingSphere & S1, const BoundingSphere & S2) noexcept

Cria um BoundingSphere que contém os dois objetos BoundingSphere especificados.

void CreateFromBoundingBox( BoundingSphere & Out, const BoundingBox & box) noexcept

Cria um BoundingSphere que contém o BoundingBox especificado.

void CreateFromBoundingBox( BoundingSphere & Out, const BoundingOrientedBox & box) noexcept

Cria um BoundingSphere que contém o BoundingBox especificado.

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

Cria um novo BoundingSphere de uma lista de pontos.

void CreateFromFrustum( BoundingSphere & Out, const BoundingFrustum & fr) noexcept

Comentários

Requisitos de plataforma

Microsoft Visual Studio 2010 ou Microsoft Visual Studio 2012 com o SDK do Windows para Windows 8. Com suporte para aplicativos da área de trabalho Win32, aplicativos da Windows Store e aplicativos Windows Phone 8.

Requisitos

   
Cabeçalho directxcollision.h

Confira também

Classes da biblioteca DirectXMath