pub struct Capsule {
pub a: Point3<f32>,
pub d: Vector3<f32>,
pub r: f32,
}Expand description
A sphere swept along a line.
Capsules are described as all of the spheres that have a center point along their line segment.
A capsule can be constructed from a Moving<Sphere>
Fields§
§a: Point3<f32>The starting point of the segment sweeping the sphere
d: Vector3<f32>When added to a produces the end point of the segment.
r: f32Radius of the sphere.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Capsule
impl<'de> Deserialize<'de> for Capsule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Shape for Capsule
impl Shape for Capsule
Source§impl Volumetric for Capsule
impl Volumetric for Capsule
impl Copy for Capsule
Auto Trait Implementations§
impl Freeze for Capsule
impl RefUnwindSafe for Capsule
impl Send for Capsule
impl Sync for Capsule
impl Unpin for Capsule
impl UnwindSafe for Capsule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> Intersects<Capsule> for Pwhere
P: Particle,
impl<P> Intersects<Capsule> for Pwhere
P: Particle,
Source§fn intersection(&self, cap: &Capsule) -> Option<Intersection>
fn intersection(&self, cap: &Capsule) -> Option<Intersection>
Returns an Intersection if one exists.
Source§impl<Recv, Arg> LocalContacts<Moving<Arg>> for Recv
impl<Recv, Arg> LocalContacts<Moving<Arg>> for Recv
Source§fn local_contacts<F>(&self, rhs: &Moving<Arg>, callback: F) -> boolwhere
F: FnMut(LocalContact),
fn local_contacts<F>(&self, rhs: &Moving<Arg>, callback: F) -> boolwhere
F: FnMut(LocalContact),
Calls the closure for each contact found. Returns true if any contact was
found.
Source§fn last_local_contact(&self, rhs: &RHS) -> Option<LocalContact>
fn last_local_contact(&self, rhs: &RHS) -> Option<LocalContact>
Returns the last contact found, if one exists.