Struct ncollide_geometry::shape::Capsule
[−]
[src]
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]
fn new(half_height: N, radius: N) -> Capsule<N>
Creates a new capsule.
Arguments:
half_height
- the half length of the capsule along they
axis.radius
- radius of the rounded part of the capsule.
fn half_height(&self) -> N
The capsule half length along the y
axis.
fn radius(&self) -> N
The radius of the capsule's rounded part.
Trait Implementations
impl<N: PartialEq> PartialEq for Capsule<N>
[src]
fn eq(&self, __arg_0: &Capsule<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Capsule<N>) -> bool
This method tests for !=
.
impl<N: Debug> Debug for Capsule<N>
[src]
impl<N: Clone> Clone for Capsule<N>
[src]
fn clone(&self) -> Capsule<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<N: Encodable> Encodable for Capsule<N>
[src]
fn encode<__SN: Encoder>(&self, __arg_0: &mut __SN) -> Result<(), __SN::Error>
Serialize a value using an Encoder
.
impl<N: Decodable> Decodable for Capsule<N>
[src]
fn decode<__DN: Decoder>(__arg_0: &mut __DN) -> Result<Capsule<N>, __DN::Error>
Deserialize a value using a Decoder
.
impl<P: Point, M: Isometry<P>> SupportMap<P, M> for Capsule<P::Real>
[src]
fn support_point(&self, m: &M, dir: &P::Vector) -> P
Evaluates the support function of the object. A support function is a function associating a vector to the shape point which maximizes their dot product. This does not include the margin
of the object. Margins are shape-dependent. Use support_point
to sample the complete shape. Read more
impl<P: Point, M: Isometry<P>> HasBoundingVolume<M, AABB<P>> for Capsule<P::Real>
[src]
fn bounding_volume(&self, m: &M) -> AABB<P>
The bounding volume of self
transformed by m
.
impl<P: Point, M: Isometry<P>> HasBoundingVolume<M, BoundingSphere<P>> for Capsule<P::Real>
[src]
fn bounding_volume(&self, m: &M) -> BoundingSphere<P>
The bounding volume of self
transformed by m
.
impl<P, M> RayCast<P, M> for Capsule<P::Real> where
P: Point,
M: Isometry<P>,
[src]
P: Point,
M: Isometry<P>,
fn toi_and_normal_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
Computes the time of impact, and normal between this transformed shape and a ray.
fn toi_with_ray(&self, m: &M, ray: &Ray<P>, solid: bool) -> Option<P::Real>
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>>
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
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
Tests whether a ray intersects this transformed shape.
impl<P: Point, M: Isometry<P>> PointQuery<P, M> for Capsule<P::Real>
[src]
fn project_point(&self, m: &M, point: &P, solid: bool) -> PointProjection<P>
Projects a point on self
transformed by m
.
fn distance_to_point(&self, m: &M, pt: &P, solid: bool) -> P::Real
Computes the minimal distance between a point and self
transformed by m
.
fn contains_point(&self, m: &M, pt: &P) -> bool
Tests if the given point is inside of self
transformed by m
.