Struct collide_capsule::Capsule [−][src]
pub struct Capsule<V: VectorSpace> { pub start: V, pub end: V, pub rad: V::Scalar, }
Expand description
The capsule collider defined as a convex hull around two spheres having the same radius.
Fields
start: VThe position of one sphere.
end: VThe position of the other sphere.
rad: V::ScalarThe radius of the spheres.
Implementations
impl<V: InnerSpace> Capsule<V>[src]
impl<V: InnerSpace> Capsule<V>[src]Trait Implementations
impl<V: InnerSpace> Collider<Capsule<V>> for Capsule<V>[src]
impl<V: InnerSpace> Collider<Capsule<V>> for Capsule<V>[src]type Vector = V
type Vector = VThe vector type of this collider.
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.
fn check_collision(&self, other: &Other) -> bool[src]
fn check_collision(&self, other: &Other) -> bool[src]Checks the collision between two colliders. Defaults to a check of the return value of collision info. Read more
impl<V: Copy + VectorSpace> Copy for Capsule<V> where
V::Scalar: Copy, [src]
V::Scalar: Copy,
Auto Trait Implementations
impl<V> RefUnwindSafe for Capsule<V> where
V: RefUnwindSafe,
<V as VectorSpace>::Scalar: RefUnwindSafe,
V: RefUnwindSafe,
<V as VectorSpace>::Scalar: RefUnwindSafe,
impl<V> Send for Capsule<V> where
V: Send,
<V as VectorSpace>::Scalar: Send,
V: Send,
<V as VectorSpace>::Scalar: Send,
impl<V> Sync for Capsule<V> where
V: Sync,
<V as VectorSpace>::Scalar: Sync,
V: Sync,
<V as VectorSpace>::Scalar: Sync,
impl<V> Unpin for Capsule<V> where
V: Unpin,
<V as VectorSpace>::Scalar: Unpin,
V: Unpin,
<V as VectorSpace>::Scalar: Unpin,
impl<V> UnwindSafe for Capsule<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 = TThe 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