Struct mgf::Capsule
[−]
[src]
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.
Trait Implementations
impl BoundedBy<AABB> for Capsule
[src]
impl BoundedBy<Sphere> for Capsule
[src]
impl From<Capsule> for Component
[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
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
Returns the last contact found, if one exists.
impl<P: Particle> Intersects<Capsule> for P
[src]
fn intersection(&self, cap: &Capsule) -> Option<Intersection>
[src]
Returns an Intersection if one exists.
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
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
Returns the last contact found, if one exists.
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
Calls the closure for each contact found. Returns true if any contact was found. Read more
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
Returns the last contact found, if one exists.
impl Copy for Capsule
[src]
impl Clone for Capsule
[src]
fn clone(&self) -> Capsule
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Capsule
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl From<Capsule> for Segment
[src]
impl From<Moving<Sphere>> for Capsule
[src]
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]
Performs the +
operation.
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]
Performs the -
operation.
impl AddAssign<Vector3<f32>> for Capsule
[src]
fn add_assign(&mut self, v: Vector3<f32>)
[src]
Performs the +=
operation.
impl SubAssign<Vector3<f32>> for Capsule
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
Performs the -=
operation.
impl Shape for Capsule
[src]
fn center(&self) -> Point3<f32>
[src]
Returns the center of mass of the geometry, assuming a regular density.
fn closest_point(&self, to: Point3<f32>) -> Point3<f32>
[src]
Returns the closest point on the shape to the given point.
fn set_pos(&mut self, p: Point3<f32>)
[src]
Sets the center of the shape to p.
impl Volumetric for Capsule
[src]
fn rotate<R: Rotation3<f32>>(self, r: R) -> Self
[src]
Rotate the bound in place. This is useless for spheres.
fn rotate_about<R: Rotation3<f32>>(self, r: R, p: Point3<f32>) -> Self
[src]
Rotates the object around a point.