Struct directx_math::collision::BoundingFrustum[][src]

#[repr(C)]
pub struct BoundingFrustum { pub Origin: XMFLOAT3, pub Orientation: XMFLOAT4, pub RightSlope: f32, pub LeftSlope: f32, pub TopSlope: f32, pub BottomSlope: f32, pub Near: f32, pub Far: f32, }

Fields

Origin: XMFLOAT3Orientation: XMFLOAT4RightSlope: f32LeftSlope: f32TopSlope: f32BottomSlope: f32Near: f32Far: f32

Implementations

impl BoundingFrustum[src]

pub const CORNER_COUNT: usize[src]

The number of corners defining the BoundingFrustum.

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

Transforms the BoundingFrustum by the specified transformation matrix.

Parameters

Out The transformed BoundingFrustum.

M The transformation matrix.

Note The transformation matrix cannot contain a scale transform.

Return value

This method does not return a value.

Reference

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

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

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

Parameters

Out The transformed BoundingFrustum.

Scale The value to scale the BoundingFrustum by.

Rotation The value to rotate the BoundingFrustum by.

Translation The value to translate the BoundingFrustum by.

Return value

This method does not return a value.

Reference

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

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

Tests whether the BoundingFrustum contains the specified point.

Parameters

Point The point to test against.

Return value

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

Reference

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

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

Tests whether the BoundingFrustum contains the 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 triangle is contained in the BoundingFrustum.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingFrustum-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 BoundingFrustum 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 boolean value indicating whether the BoundingFrustum intersects the triangle.

Reference

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

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

Tests the BoundingFrustum 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-BoundingFrustum-intersects(fxmvector)

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

Tests the BoundingFrustum for intersection with a ray.

Parameters

rayOrigin The origin of the ray.

Direction The direction of the ray.

Dist The length of the ray.

Return value

A boolean value indicating whether the BoundingFrustum 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-BoundingFrustum-intersects(fxmvector_fxmvector_float_)

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

Tests whether the BoundingFrustum is contained by the specified frustum.

Parameters

Plane0 A plane describing the frustum.

Plane1 A plane describing the frustum.

Plane2 A plane describing the frustum.

Plane3 A plane describing the frustum.

Plane4 A plane describing the frustum.

Plane5 A plane describing the frustum.

Return value

A ContainmentType value indicating whether the frustum contains the BoundingFrustum.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-BoundingFrustum-containedby

pub fn CreateFromMatrix(Out: &mut Self, Projection: FXMMATRIX, rhcoords: bool)[src]

Creates a BoundingFrustum from the specified projection matrix.

Parameters

Out The new BoundingFrustum.

Projection The projection matrix to create the BoundingFrustum from.

rhcoords A value of false indicates that Projection is in a left-handeded coordinate system.

Return value

This method does not return a value.

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-boundingfrustum-createfrommatrix

pub fn GetPlanes(
    &self,
    NearPlane: Option<&mut XMVECTOR>,
    FarPlane: Option<&mut XMVECTOR>,
    RightPlane: Option<&mut XMVECTOR>,
    LeftPlane: Option<&mut XMVECTOR>,
    TopPlane: Option<&mut XMVECTOR>,
    BottomPlane: Option<&mut XMVECTOR>
)
[src]

Gets the planes making up the BoundingFrustum.

Parameters

NearPlane A vector that will hold the near plane.

FarPlane A vector that will hold the far plane.

RightPlane A vector that will hold the right plane.

LeftPlane A vector that will hold the left plane.

TopPlane A vector that will hold the top plane.

BottomPlane A vector that will hold the bottom plane.

Return value

None

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-boundingfrustum-getplanes

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

Gets the corners making up the BoundingFrustum.

 Near    Far
0----1  4----5
|    |  |    |
|    |  |    |
3----2  7----6

Returns

[
   LeftTopNear, RightTopNear, RightBottomNear, LeftBottomNear,
   LeftTopFar,  RightTopFar,  RightBottomFar,  LeftBottomFar
]

https://docs.microsoft.com/en-us/windows/win32/api/directxcollision/nf-directxcollision-boundingfrustum-getcorners

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, 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.