[][src]Struct ncollide_geometry::shape::Capsule

pub struct Capsule<N> { /* fields omitted */ }

SupportMap description of a capsule shape with its principal axis aligned with the y axis.

Methods

impl<N: Real> Capsule<N>[src]

pub fn new(half_height: N, radius: N) -> Capsule<N>[src]

Creates a new capsule.

Arguments:

  • half_height - the half length of the capsule along the y axis.
  • radius - radius of the rounded part of the capsule.

pub fn half_height(&self) -> N[src]

The capsule half length along the y axis.

pub fn radius(&self) -> N[src]

The radius of the capsule's rounded part.

Trait Implementations

impl<P: Point, M: Isometry<P>> SupportMap<P, M> for Capsule<P::Real>[src]

fn support_area_toward(
    &self,
    transform: &M,
    dir: &Unit<P::Vector>,
    _angle: P::Real,
    out: &mut Vec<P>
)
[src]

impl<P: Point, M: Isometry<P>> HasBoundingVolume<M, AABB<P>> for Capsule<P::Real>[src]

impl<P: Point, M: Isometry<P>> HasBoundingVolume<M, BoundingSphere<P>> for Capsule<P::Real>[src]

impl<P, M> RayCast<P, M> for Capsule<P::Real> where
    P: Point,
    M: Isometry<P>, 
[src]

fn toi_with_ray(&self, m: &M, ray: &Ray<P>, solid: bool) -> Option<P::Real>[src]

Computes the time of impact between this transform shape and a ray.

fn toi_and_normal_and_uv_with_ray(
    &self,
    m: &M,
    ray: &Ray<P>,
    solid: bool
) -> Option<RayIntersection<P::Vector>>
[src]

Computes time of impact, normal, and texture coordinates (uv) between this transformed shape and a ray. Read more

fn intersects_ray(&self, m: &M, ray: &Ray<P>) -> bool[src]

Tests whether a ray intersects this transformed shape.

impl<P: Point, M: Isometry<P>> PointQuery<P, M> for Capsule<P::Real>[src]

fn distance_to_point(&self, m: &M, pt: &P, solid: bool) -> P::Real[src]

Computes the minimal distance between a point and self transformed by m.

fn contains_point(&self, m: &M, pt: &P) -> bool[src]

Tests if the given point is inside of self transformed by m.

impl<N: PartialEq> PartialEq<Capsule<N>> for Capsule<N>[src]

impl<N: Clone> Clone for Capsule<N>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: Debug> Debug for Capsule<N>[src]

Auto Trait Implementations

impl<N> Send for Capsule<N> where
    N: Send

impl<N> Sync for Capsule<N> where
    N: Sync

Blanket Implementations

impl<T, U> Into 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> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self