Structure BoundingSphere (directxcollision.h)

Objet de sphère englobante.

Syntaxe

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

Membres

Center

Centre de l’élément BoundingSphere.

Radius

Rayon de l’objet BoundingSphere.

void BoundingSphere() noexcept

Crée un instance de la classe BoundingSphere.

void BoundingSphere( const BoundingSphere & unnamedParam1)

Crée un instance de la classe BoundingSphere.

BoundingSphere & operator=( const BoundingSphere & unnamedParam1)

Initialise boundingSphere avec les valeurs d’un BoundingSphere spécifié.

void BoundingSphere( BoundingSphere && unnamedParam1)

BoundingSphere & operator=( BoundingSphere && unnamedParam1)

Initialise boundingSphere avec les valeurs d’un BoundingSphere spécifié.

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

Crée un instance de la classe BoundingSphere.

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

Transforme l’objet BoundingSphere.

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

Transforme l’objet BoundingSphere à l’aide des vecteurs d’échelle, de rotation et de traduction spécifiés.

ContainmentType XM_CALLCONV Contains( FXMVECTOR Point) noexcept

Teste si boundingSphere contient un point spécifié.

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

Teste si l’objet BoundingSphere contient un triangle spécifié.

ContainmentType Contains( const BoundingSphere & sh) noexcept

Teste si l’objet BoundingSphere contient un boundingSphere spécifié.

ContainmentType Contains( const BoundingBox & box) noexcept

Teste si l’objet BoundingSphere contient un BoundingBox spécifié.

ContainmentType Contains( const BoundingOrientedBox & box) noexcept

Teste si boundingSphere contient l’objet BoundingOrientedBox spécifié.

ContainmentType Contains( const BoundingFrustum & fr) noexcept

Teste si boundingSphere contient le BoundingFrustum spécifié.

bool Intersects( const BoundingSphere & sh) noexcept

Teste BoundingSphere pour l’intersection avec un BoundingSphere.

bool Intersects( const BoundingBox & box) noexcept

Teste BoundingSphere pour l’intersection avec un BoundingBox.

bool Intersects( const BoundingOrientedBox & box) noexcept

Testez BoundingSphere pour l’intersection avec boundingOrientedBox.

bool Intersects( const BoundingFrustum & fr) noexcept

Testez BoundingSphere pour l’intersection avec un Objet BoundingFrustum.

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

Teste boundingSphere pour l’intersection avec un triangle.

PlaneIntersectionType XM_CALLCONV Intersects( FXMVECTOR Plane) noexcept

Teste BoundingSphere pour l’intersection avec un plan.

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

Teste BoundingSphere pour l’intersection avec un rayon.

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

Teste si l’objet BoundingSphere est contenu par le frustum spécifié.

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

Crée un Objet BoundingSphere qui contient les deux objets BoundingSphere spécifiés.

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

Crée un BoundingSphere contenant l’objet BoundingBox spécifié.

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

Crée un BoundingSphere contenant l’objet BoundingBox spécifié.

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

Crée un boundingSphere à partir d’une liste de points.

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

Remarques

Configuration requise pour la plateforme

Microsoft Visual Studio 2010 ou Microsoft Visual Studio 2012 avec le SDK Windows pour Windows 8. Pris en charge pour les applications de bureau Win32, les applications du Windows Store et les applications Windows Phone 8.

Configuration requise

   
En-tête directxcollision.h

Voir aussi

Classes de bibliothèque DirectXMath