[][src]Struct mgf::Capsule

pub struct Capsule {
    pub a: Point3<f32>,
    pub d: Vector3<f32>,
    pub r: f32,
}

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.

impl AddAssign<Vector3<f32>> for Capsule[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]

impl Contacts<Moving<Component>> for Capsule[src]

impl Contacts<Moving<Sphere>> for Capsule[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]

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]

impl Serialize for Capsule[src]

impl Shape for Capsule[src]

impl Sub<Vector3<f32>> for Capsule[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Vector3<f32>> for Capsule[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]

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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.