pub struct Capsule {
pub axis: LineSegment,
pub radius: f32,
}Expand description
A cylinder capped with a half-sphere at each end
Fields§
§axis: LineSegmentThe central axis of the capsule
radius: f32The radius of the capsule
Implementations§
Trait Implementations§
Source§impl ClosestPoint<Capsule> for Ray
impl ClosestPoint<Capsule> for Ray
Source§fn closest_point(&self, other: &Capsule) -> Point
fn closest_point(&self, other: &Capsule) -> Point
The closest point to another object
Source§impl ClosestPoint<Ray> for Capsule
impl ClosestPoint<Ray> for Capsule
Source§fn closest_point(&self, other: &Ray) -> Point
fn closest_point(&self, other: &Ray) -> Point
The closest point to another object
Source§impl Intersection<Capsule> for Ray
impl Intersection<Capsule> for Ray
Source§fn intersects(&self, rhs: &Capsule) -> bool
fn intersects(&self, rhs: &Capsule) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Ray> for Capsule
impl Intersection<Ray> for Capsule
Source§fn intersects(&self, rhs: &Ray) -> bool
fn intersects(&self, rhs: &Ray) -> bool
Whether this shape intersect with the other
Auto Trait Implementations§
impl Freeze for Capsule
impl RefUnwindSafe for Capsule
impl Send for Capsule
impl Sync for Capsule
impl Unpin for Capsule
impl UnwindSafe for Capsule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more