[−][src]Struct directx_math::collision::BoundingSphere
A bounding sphere object.
Fields
Center: XMFLOAT3
Radius: f32
Implementations
impl BoundingSphere
[src]
pub fn TransformMatrix(&self, Out: &mut Self, M: FXMMATRIX)
[src]
Transforms the BoundingSphere by the specified transformation matrix.
Parameters
Out
The transformed BoundingSphere.
M
The matrix to transform the BoundingSphere by.
Return value
None
Reference
pub fn TransformDecomposed(
&self,
Out: &mut Self,
Scale: f32,
Rotation: FXMVECTOR,
Translation: FXMVECTOR
)
[src]
&self,
Out: &mut Self,
Scale: f32,
Rotation: FXMVECTOR,
Translation: FXMVECTOR
)
Transforms the BoundingSphere using the specified scale
, rotation
and translation
vectors.
Parameters
Out
The transformed BoundingSphere.
Scale
The value to scale the BoundingSphere by.
Rotation
The value to rotate the BoundingSphere by.
Translation
The value to translate the BoundingSphere by.
Return value
This method does not return a value.
Reference
pub fn ContainsPoint(&self, Point: FXMVECTOR) -> ContainmentType
[src]
Tests whether the BoundingSphere contains a specified point.
Parameters
Point
The point to test against.
Return value
A ContainmentType value indicating whether the BoundingSphere contains the specified point.
Reference
pub fn ContainsTriangle(
&self,
V0: FXMVECTOR,
V1: FXMVECTOR,
V2: FXMVECTOR
) -> ContainmentType
[src]
&self,
V0: FXMVECTOR,
V1: FXMVECTOR,
V2: FXMVECTOR
) -> ContainmentType
Tests whether the BoundingSphere 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 BoundingSphere contains the specified triangle.
Reference
pub fn ContainsSphere(&self, sh: &BoundingSphere) -> ContainmentType
[src]
Tests whether the BoundingSphere contains a specified BoundingSphere.
Parameters
sh
The BoundingSphere to test against.
Return value
A ContainmentType value indicating whether the BoundingSphere contains the specified BoundingSphere.
Reference
pub fn ContainsBox(&self, box_: &BoundingBox) -> ContainmentType
[src]
Tests whether the BoundingSphere contains a specified BoundingBox.
Parameters
box
The BoundingBox to test against.
Return value
A ContainmentType value indicating whether the BoundingSphere contains the specified BoundingBox.
Reference
pub fn ContainsOrientedBox(&self, box_: &BoundingOrientedBox) -> ContainmentType
[src]
Tests whether the BoundingSphere contains the specified BoundingOrientedBox.
Parameters
box
The BoundingOrientedBox to test against.
Return value
A ContainmentType value indicating whether the BoundingOrientedBox is contained in the BoundingSphere.
Reference
pub fn ContainsFrustum(&self, fr: &BoundingFrustum) -> ContainmentType
[src]
Tests whether the BoundingSphere contains the specified BoundingFrustum.
Parameters
fr
The BoundingFrustum to test against.
Return value
A ContainmentType value indicating whether the BoundingFrustum is contained in the BoundingSphere.
Reference
pub fn IntersectsSphere(&self, sh: &BoundingSphere) -> bool
[src]
Tests the BoundingSphere for intersection with a BoundingSphere.
Parameters
sh
The BoundingSphere to test against.
Return value
A bool value indicating whether the BoundingSphere intersects the specified BoundingSphere.
Reference
pub fn IntersectsBox(&self, box_: &BoundingBox) -> bool
[src]
Tests the BoundingSphere for intersection with a BoundingBox.
pub fn IntersectsOrientedBox(&self, box_: &BoundingOrientedBox) -> bool
[src]
Test the BoundingSphere for intersection with a BoundingOrientedBox.
pub fn IntersectsFrustum(&self, fr: &BoundingFrustum) -> bool
[src]
Test the BoundingSphere for intersection with a BoundingFrustum.
pub fn IntersectsTriangle(
&self,
V0: FXMVECTOR,
V1: FXMVECTOR,
V2: FXMVECTOR
) -> bool
[src]
&self,
V0: FXMVECTOR,
V1: FXMVECTOR,
V2: FXMVECTOR
) -> bool
Tests the BoundingSphere for intersection with a triangle.
pub fn IntersectsPlane(&self, Plane: FXMVECTOR) -> PlaneIntersectionType
[src]
Tests the BoundingSphere 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
pub fn IntersectsRay(
&self,
Origin: FXMVECTOR,
Direction: FXMVECTOR,
Dist: &mut f32
) -> bool
[src]
&self,
Origin: FXMVECTOR,
Direction: FXMVECTOR,
Dist: &mut f32
) -> bool
Tests the BoundingSphere 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 BoundingSphere contains the specified 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
pub fn ContainedBy(
&self,
Plane0: FXMVECTOR,
Plane1: FXMVECTOR,
Plane2: GXMVECTOR,
Plane3: HXMVECTOR,
Plane4: HXMVECTOR,
Plane5: HXMVECTOR
) -> ContainmentType
[src]
&self,
Plane0: FXMVECTOR,
Plane1: FXMVECTOR,
Plane2: GXMVECTOR,
Plane3: HXMVECTOR,
Plane4: HXMVECTOR,
Plane5: HXMVECTOR
) -> ContainmentType
Tests whether the BoundingSphere is contained by the specified frustum.
pub fn CreateMerged(Out: &mut Self, S1: &Self, S2: &Self)
[src]
Creates a BoundingSphere that contains the two specified BoundingSphere objects.
pub fn CreateFromBoundingBox(Out: &mut Self, box_: &BoundingBox)
[src]
Creates a BoundingSphere containing the specified BoundingBox.
pub fn CreateFromBoundingOrientedBox(Out: &mut Self, box_: &BoundingOrientedBox)
[src]
Creates a BoundingSphere containing the specified BoundingOrientedBox.
pub fn CreateFromPoints<'a>(
Out: &mut Self,
pPoints: impl Iterator<Item = &'a XMFLOAT3> + Clone
)
[src]
Out: &mut Self,
pPoints: impl Iterator<Item = &'a XMFLOAT3> + Clone
)
Creates a new BoundingSphere from a list of points.
pub fn CreateFromFrustum(Out: &mut Self, fr: &BoundingFrustum)
[src]
Creates a BoundingSphere containing the specified BoundingFrustum.
Trait Implementations
impl Clone for BoundingSphere
[src]
fn clone(&self) -> BoundingSphere
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for BoundingSphere
[src]
impl Debug for BoundingSphere
[src]
Auto Trait Implementations
impl RefUnwindSafe for BoundingSphere
impl Send for BoundingSphere
impl Sync for BoundingSphere
impl Unpin for BoundingSphere
impl UnwindSafe for BoundingSphere
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,