[][src]Struct ico_math::physics::Sphere

#[repr(C)]
pub struct Sphere {
    pub data: Vector4,
}

Fields

data: Vector4

Methods

impl Sphere[src]

pub fn new<T: Into<FloatVector>>(center: Vector3, radius: T) -> Sphere[src]

pub fn center(self) -> Vector3[src]

pub fn radius(self) -> FloatVector[src]

pub fn test_point(self, point: Vector3) -> bool[src]

Is the point inside or on the sphere.

pub fn test_line(self, line: Line) -> bool[src]

Does the line intersect or touch the sphere.

pub fn test_ray(self, ray: Ray) -> bool[src]

Does the ray intersect or touch the sphere.

pub fn test_segment(self, segment: Segment) -> bool[src]

Does the segment intersect or touch the sphere.

pub fn test_plane(self, plane: Plane) -> bool[src]

Is the sphere intersecting or touching the plane.

pub fn test_inside_plane(self, plane: Plane) -> bool[src]

Is the sphere fully behind the plane.

pub fn test_halfspace_plane(self, plane: Plane) -> bool[src]

Is the sphere intersecting or behind the plane.

pub fn test_sphere(self, other: Sphere) -> bool[src]

Are the two spheres touching or intersecting.

pub fn contains_segment(self, segment: Segment) -> bool[src]

pub fn contains_bounds(self, bounds: AABB) -> bool[src]

pub fn contains_sphere(self, inner: Sphere) -> bool[src]

Trait Implementations

impl Clone for Sphere[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Copy for Sphere[src]

impl Debug for Sphere[src]

Auto Trait Implementations

impl Unpin for Sphere

impl Sync for Sphere

impl Send for Sphere

impl UnwindSafe for Sphere

impl RefUnwindSafe for Sphere

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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