pub struct Circle {
pub center: Point,
pub radius: fsize,
}
Expand description
Geometric primitive representing a circle
Fields§
§center: Point
§radius: fsize
Implementations§
Trait Implementations§
Source§impl CollidesWith<AARectangle> for Circle
impl CollidesWith<AARectangle> for Circle
fn collides_with(&self, rect: &AARectangle) -> bool
Source§impl CollidesWith<Circle> for Circle
impl CollidesWith<Circle> for Circle
fn collides_with(&self, other: &Circle) -> bool
Source§impl CollidesWith<Edge> for Circle
impl CollidesWith<Edge> for Circle
fn collides_with(&self, edge: &Edge) -> bool
Source§impl CollidesWith<Point> for Circle
impl CollidesWith<Point> for Circle
fn collides_with(&self, point: &Point) -> bool
Source§impl SeparationDistance<Circle> for Circle
impl SeparationDistance<Circle> for Circle
Source§fn separation_distance(&self, other: &Circle) -> (GeoPosition, fsize)
fn separation_distance(&self, other: &Circle) -> (GeoPosition, fsize)
In case of a collision between
self
and other
, returns GeoPosition::Interior and the minimum distance to separate the two primitives.
Otherwise, returns GeoPosition::Exterior and the minimum distance between the two primitives. (similar to Distance::distance)Source§fn sq_separation_distance(&self, other: &Circle) -> (GeoPosition, fsize)
fn sq_separation_distance(&self, other: &Circle) -> (GeoPosition, fsize)
Squared version of SeparationDistance::separation_distance
Source§impl SeparationDistance<Edge> for Circle
impl SeparationDistance<Edge> for Circle
Source§fn separation_distance(&self, e: &Edge) -> (GeoPosition, fsize)
fn separation_distance(&self, e: &Edge) -> (GeoPosition, fsize)
In case of a collision between
self
and other
, returns GeoPosition::Interior and the minimum distance to separate the two primitives.
Otherwise, returns GeoPosition::Exterior and the minimum distance between the two primitives. (similar to Distance::distance)Source§fn sq_separation_distance(&self, e: &Edge) -> (GeoPosition, fsize)
fn sq_separation_distance(&self, e: &Edge) -> (GeoPosition, fsize)
Squared version of SeparationDistance::separation_distance
Source§impl SeparationDistance<Point> for Circle
impl SeparationDistance<Point> for Circle
Source§fn separation_distance(&self, point: &Point) -> (GeoPosition, fsize)
fn separation_distance(&self, point: &Point) -> (GeoPosition, fsize)
In case of a collision between
self
and other
, returns GeoPosition::Interior and the minimum distance to separate the two primitives.
Otherwise, returns GeoPosition::Exterior and the minimum distance between the two primitives. (similar to Distance::distance)Source§fn sq_separation_distance(&self, point: &Point) -> (GeoPosition, fsize)
fn sq_separation_distance(&self, point: &Point) -> (GeoPosition, fsize)
Squared version of SeparationDistance::separation_distance
Source§impl Transformable for Circle
impl Transformable for Circle
fn transform(&mut self, t: &Transformation) -> &mut Self
fn transform_clone(&self, t: &Transformation) -> Self
Source§impl TransformableFrom for Circle
impl TransformableFrom for Circle
fn transform_from(&mut self, reference: &Self, t: &Transformation) -> &mut Self
impl QTQueryable for Circle
impl StructuralPartialEq for Circle
Auto Trait Implementations§
impl Freeze for Circle
impl RefUnwindSafe for Circle
impl Send for Circle
impl Sync for Circle
impl Unpin for Circle
impl UnwindSafe for Circle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more