Struct collide_sphere::Sphere [−][src]
pub struct Sphere<V: VectorSpace> { pub pos: V, pub rad: V::Scalar, }
Expand description
The sphere collider.
Fields
pos: V
The position of the sphere collider.
rad: V::Scalar
The radius of the sphere collider.
Implementations
impl<V: InnerSpace> Sphere<V>
[src]
impl<V: InnerSpace> Sphere<V>
[src]Trait Implementations
impl<V: InnerSpace> Collider<Sphere<V>> for Sphere<V>
[src]
impl<V: InnerSpace> Collider<Sphere<V>> for Sphere<V>
[src]type Vector = V
type Vector = V
The vector type of this collider.
fn check_collision(&self, other: &Self) -> bool
[src]
fn check_collision(&self, other: &Self) -> bool
[src]Checks the collision between two colliders. Defaults to a check of the return value of collision info. Read more
fn collision_info(&self, other: &Self) -> Option<CollisionInfo<Self::Vector>>
[src]
fn collision_info(&self, other: &Self) -> Option<CollisionInfo<Self::Vector>>
[src]If both colliders collide, returns some collision info, else returns none.
impl<V: Copy + VectorSpace> Copy for Sphere<V> where
V::Scalar: Copy,
[src]
V::Scalar: Copy,
Auto Trait Implementations
impl<V> RefUnwindSafe for Sphere<V> where
V: RefUnwindSafe,
<V as VectorSpace>::Scalar: RefUnwindSafe,
V: RefUnwindSafe,
<V as VectorSpace>::Scalar: RefUnwindSafe,
impl<V> Send for Sphere<V> where
V: Send,
<V as VectorSpace>::Scalar: Send,
V: Send,
<V as VectorSpace>::Scalar: Send,
impl<V> Sync for Sphere<V> where
V: Sync,
<V as VectorSpace>::Scalar: Sync,
V: Sync,
<V as VectorSpace>::Scalar: Sync,
impl<V> Unpin for Sphere<V> where
V: Unpin,
<V as VectorSpace>::Scalar: Unpin,
V: Unpin,
<V as VectorSpace>::Scalar: Unpin,
impl<V> UnwindSafe for Sphere<V> where
V: UnwindSafe,
<V as VectorSpace>::Scalar: UnwindSafe,
V: UnwindSafe,
<V as VectorSpace>::Scalar: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more