[−][src]Struct mgf::Capsule
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: f32
Radius of the sphere.
Methods
impl Capsule
[src]
pub fn new(segment: Segment, radius: f32) -> Self
[src]
Create a new capsule from a segment and a radius.
Trait Implementations
impl Add<Vector3<f32>> for Capsule
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, v: Vector3<f32>) -> Capsule
[src]
impl AddAssign<Vector3<f32>> for Capsule
[src]
fn add_assign(&mut self, v: Vector3<f32>)
[src]
impl BoundedBy<AABB> for Capsule
[src]
impl BoundedBy<Sphere> for Capsule
[src]
impl Clone for Capsule
[src]
impl Contacts<Moving<Capsule>> for Capsule
[src]
fn contacts<F: FnMut(Contact)>(
&self,
capsule: &Moving<Capsule>,
callback: F
) -> bool
[src]
&self,
capsule: &Moving<Capsule>,
callback: F
) -> bool
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
impl Contacts<Moving<Component>> for Capsule
[src]
fn contacts<F: FnMut(Contact)>(
&self,
rhs: &Moving<Component>,
callback: F
) -> bool
[src]
&self,
rhs: &Moving<Component>,
callback: F
) -> bool
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
impl Contacts<Moving<Sphere>> for Capsule
[src]
fn contacts<F: FnMut(Contact)>(
&self,
sphere: &Moving<Sphere>,
callback: F
) -> bool
[src]
&self,
sphere: &Moving<Sphere>,
callback: F
) -> bool
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
impl Convex<Point3<f32>> for Capsule
[src]
impl Copy for Capsule
[src]
impl Debug for Capsule
[src]
impl<'de> Deserialize<'de> for Capsule
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<Capsule> for Component
[src]
impl From<Capsule> for Segment
[src]
impl From<Moving<Sphere>> for Capsule
[src]
impl Inertia for Capsule
[src]
impl<P: Particle> Intersects<Capsule> for P
[src]
fn intersection(&self, cap: &Capsule) -> Option<Intersection>
[src]
impl Serialize for Capsule
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Shape for Capsule
[src]
fn center(&self) -> Point3<f32>
[src]
fn closest_point(&self, to: Point3<f32>) -> Point3<f32>
[src]
fn set_pos(&mut self, p: Point3<f32>)
[src]
impl Sub<Vector3<f32>> for Capsule
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, v: Vector3<f32>) -> Capsule
[src]
impl SubAssign<Vector3<f32>> for Capsule
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
impl Volumetric for Capsule
[src]
Auto Trait Implementations
impl RefUnwindSafe for Capsule
impl Send for Capsule
impl Sync for Capsule
impl Unpin for Capsule
impl UnwindSafe for Capsule
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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>,