[][src]Struct directx_math::collision::BoundingBox

#[repr(C)]pub struct BoundingBox {
    pub Center: XMFLOAT3,
    pub Extents: XMFLOAT3,
}

Fields

Center: XMFLOAT3Extents: XMFLOAT3

Implementations

impl BoundingBox[src]

pub const CORNER_COUNT: usize[src]

pub fn GetCorners(&self, Corners: &mut [XMFLOAT3; 8])[src]

pub fn TransformMatrix(&self, Out: &mut Self, M: FXMMATRIX)[src]

Transforms the BoundingBox by the specified transformation matrix..

Parameters

Out The transformed BoundingBox.

M The matrix to transform the BoundingBox by.

Return value

None

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingBox-transform

pub fn TransformDecomposed(
    &self,
    Out: &mut Self,
    Scale: f32,
    Rotation: FXMVECTOR,
    Translation: FXMVECTOR
)
[src]

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

Parameters

Out The transformed BoundingBox.

Scale The value to scale the BoundingBox by.

Rotation The value to rotate the BoundingBox by.

Translation The value to translate the BoundingBox by.

Return value

This method does not return a value.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingBox-transform(BoundingBox__float_fxmvector_fxmvector)

pub fn ContainsPoint(&self, Point: FXMVECTOR) -> ContainmentType[src]

Tests the whether the BoundingBox contains a specified point.

Parameters

Point The point to test against.

Return value

A ContainmentType value indicating whether the point is contained in the BoundingBox.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingBox-contains

pub fn ContainsTriangle(
    &self,
    V0: FXMVECTOR,
    V1: FXMVECTOR,
    V2: FXMVECTOR
) -> ContainmentType
[src]

Test whether the BoundingBox contains a specified triangle.

Parameters

V0 A corner of the triangle.

V1 A corner of the triangle.

V2 A corner of the triangle.

Return value

A ContainmentType value indicating whether the BoundingBox contains the specified triangle.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingBox-contains(fxmvector_fxmvector_fxmvector)

pub fn ContainsSphere(&self, sh: &BoundingSphere) -> ContainmentType[src]

pub fn ContainsBox(&self, box_: &BoundingBox) -> ContainmentType[src]

pub fn ContainsOrientedBox(&self, box_: &BoundingOrientedBox) -> ContainmentType[src]

pub fn ContainsFrustum(&self, fr: &BoundingFrustum) -> ContainmentType[src]

pub fn IntersectsSphere(&self, sh: &BoundingSphere) -> bool[src]

pub fn IntersectsBox(&self, box_: &BoundingBox) -> bool[src]

pub fn IntersectsOrientedBox(&self, box_: &BoundingOrientedBox) -> bool[src]

pub fn IntersectsFrustum(&self, fr: &BoundingFrustum) -> bool[src]

pub fn IntersectsTriangle(
    &self,
    V0: FXMVECTOR,
    V1: FXMVECTOR,
    V2: FXMVECTOR
) -> bool
[src]

Tests the BoundingSphere for intersection with a triangle.

Parameters

V0 A vector describing the triangle.

V1 A vector describing the triangle.

V2 A vector describing the triangle.

Return value

A bool value indicating whether the BoundingBox intersects the triangle.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingBox-intersects(fxmvector_fxmvector_fxmvector)

pub fn IntersectsPlane(&self, Plane: FXMVECTOR) -> PlaneIntersectionType[src]

Tests the BoundingBox for intersection with a Plane.

Parameters

Plane A vector describing the plane coefficients (A, B, C, D) for the plane equation Ax+By+Cz+D=0.

Return value

A PlaneIntersectionType value indicating whether the BoundingSphere intersects the specified plane.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingBox-intersects(fxmvector)

pub fn IntersectsRay(
    &self,
    Origin: FXMVECTOR,
    Direction: FXMVECTOR,
    Dist: &mut f32
) -> bool
[src]

Tests the BoundingBox for intersection with a ray.

Parameters

Origin The origin of the ray.

Direction The direction of the ray.

Dist The length of the ray.

Return value

A bool value indicating whether the BoundingBox intersects the ray.

Remarks

The distance from the Origin to the nearest intersection point is returned in Dist when the method returns true. Otherwise, Dist is set to 0.0.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingBox-intersects(fxmvector_fxmvector_float_)

pub fn ContainedBy(
    &self,
    Plane0: FXMVECTOR,
    Plane1: FXMVECTOR,
    Plane2: GXMVECTOR,
    Plane3: HXMVECTOR,
    Plane4: HXMVECTOR,
    Plane5: HXMVECTOR
) -> ContainmentType
[src]

pub fn CreateMerged(Out: &mut Self, b1: &Self, b2: &Self)[src]

Creates a BoundingBox that contains the two specified BoundingBox objects.

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingBox-createmerged

pub fn CreateFromSphere(Out: &mut Self, sh: &BoundingSphere)[src]

Creates a BoundingBox large enough to contain the a specified BoundingSphere.

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-boundingbox-createfromsphere

pub fn CreateFromPoints<'a>(
    Out: &mut Self,
    pPoints: impl Iterator<Item = &'a XMFLOAT3>
)
[src]

Trait Implementations

impl Clone for BoundingBox[src]

impl Copy for BoundingBox[src]

impl Debug for BoundingBox[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.