Condividi tramite


Struttura BoundingSphere (directxcollision.h)

Oggetto sfera di delimitazione.

Sintassi

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

Members

Center

Centro di BoundingSphere.

Radius

Raggio di BoundingSphere.

void BoundingSphere() noexcept

Crea un'istanza della classe BoundingSphere .

void BoundingSphere( const BoundingSphere & unnamedParam1)

Crea un'istanza della classe BoundingSphere.

BoundingSphere & operator=( const BoundingSphere & unnamedParam1)

Inizializza BoundingSphere con i valori di un oggetto BoundingSphere specificato.

void BoundingSphere( BoundingSphere && unnamedParam1)

BoundingSphere & operator=( BoundingSphere && unnamedParam1)

Inizializza BoundingSphere con i valori di un oggetto BoundingSphere specificato.

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

Crea un'istanza della classe BoundingSphere.

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

Trasforma boundingSphere.

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

Trasforma boundingSphere usando la scala, la rotazione e i vettori di traslazione specificati.

ContainmentType XM_CALLCONV Contains( FXMVECTOR Point) noexcept

Verifica se BoundingSphere contiene un punto specificato.

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

Verifica se BoundingSphere contiene un triangolo specificato.

ContainmentType Contains( const BoundingSphere & sh) noexcept

Verifica se BoundingSphere contiene un boundingSphere specificato.

ContainmentType Contains( const BoundingBox & box) noexcept

Verifica se BoundingSphere contiene un boundingBox specificato.

ContainmentType Contains( const BoundingOrientedBox & box) noexcept

Verifica se BoundingSphere contiene l'oggetto BoundingOrientedBox specificato.

ContainmentType Contains( const BoundingFrustum & fr) noexcept

Verifica se BoundingSphere contiene l'oggetto BoundingFrustum specificato.

bool Intersects( const BoundingSphere & sh) noexcept

Testa boundingSphere per l'intersezione con un boundingSphere.

bool Intersects( const BoundingBox & box) noexcept

Testa boundingSphere per verificare l'intersezione con un boundingBox.

bool Intersects( const BoundingOrientedBox & box) noexcept

Testare boundingSphere per l'intersezione con un boundingOrientedBox.

bool Intersects( const BoundingFrustum & fr) noexcept

Testare boundingSphere per l'intersezione con un boundingFrustum.

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

Verifica l'intersezione di BoundingSphere con un triangolo.

PlaneIntersectionType XM_CALLCONV Intersects( FXMVECTOR Plane) noexcept

Verifica l'intersezione di BoundingSphere con un piano.

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

Verifica l'intersezione di BoundingSphere con un raggio.

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

Verifica se BoundingSphere è contenuto nel frustum specificato.

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

Crea un boundingSphere contenente i due oggetti BoundingSphere specificati.

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

Crea un boundingSphere contenente il boundingBox specificato.

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

Crea un boundingSphere contenente il boundingBox specificato.

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

Crea un nuovo boundingSphere da un elenco di punti.

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

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.

Requisiti

   
Intestazione directxcollision.h

Vedi anche

Classi della libreria DirectXMath