Struct mgf::Capsule
[−]
[src]
pub struct Capsule {
pub a: Point3<f32>,
pub d: Vector3<f32>,
pub r: f32,
}A sphere swept along a line.
Fields
a: Point3<f32>
d: Vector3<f32>
r: f32
Methods
impl Capsule[src]
fn rotate(self, r: Quaternion<f32>) -> Self[src]
Rotates the capsule about the origin
Trait Implementations
impl BoundedBy<AABB> for Capsule[src]
impl BoundedBy<Sphere> for Capsule[src]
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]
impl MinDistance<Point3<f32>> 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 set_pos(&mut self, p: Point3<f32>)[src]
Sets the center of the shape to p.
impl Collider<Intersection, Ray> for Capsule[src]
fn collide<F: FnMut(Intersection)>(&self, rhs: &Ray, callback: F) -> bool[src]
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.
impl Collider<Contact, Moving<Sphere>> for Capsule[src]
fn collide<F: FnMut(Contact)>(
&self,
sphere: &Moving<Sphere>,
callback: F
) -> bool[src]
&self,
sphere: &Moving<Sphere>,
callback: F
) -> bool
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.
impl Collider<Contact, Moving<Capsule>> for Capsule[src]
fn collide<F: FnMut(Contact)>(
&self,
capsule: &Moving<Capsule>,
callback: F
) -> bool[src]
&self,
capsule: &Moving<Capsule>,
callback: F
) -> bool
Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found. Read more
fn check_collision(&self, other: &T) -> Option<CollisionType>[src]
Returns the first collision found if any exists.