pub struct Point(pub fsize, pub fsize);
Expand description
Geometric primitive representing a point: (x, y)
Tuple Fields§
§0: fsize
§1: fsize
Implementations§
Trait Implementations§
Source§impl AlmostCollidesWith<Point> for AARectangle
impl AlmostCollidesWith<Point> for AARectangle
fn almost_collides_with(&self, point: &Point) -> bool
Source§impl CollidesWith<Point> for AARectangle
impl CollidesWith<Point> for AARectangle
fn collides_with(&self, point: &Point) -> bool
Source§impl CollidesWith<Point> for Circle
impl CollidesWith<Point> for Circle
fn collides_with(&self, point: &Point) -> bool
Source§impl CollidesWith<Point> for SimplePolygon
impl CollidesWith<Point> for SimplePolygon
fn collides_with(&self, point: &Point) -> bool
Source§impl<T> CollidesWith<T> for Pointwhere
T: CollidesWith<Point>,
impl<T> CollidesWith<T> for Pointwhere
T: CollidesWith<Point>,
fn collides_with(&self, other: &T) -> bool
Source§impl Distance<Point> for AARectangle
impl Distance<Point> for AARectangle
Source§impl Distance<Point> for SimplePolygon
impl Distance<Point> for SimplePolygon
Source§impl SeparationDistance<Point> for AARectangle
impl SeparationDistance<Point> for AARectangle
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 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 SeparationDistance<Point> for SimplePolygon
impl SeparationDistance<Point> for SimplePolygon
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 Point
impl Transformable for Point
fn transform(&mut self, t: &Transformation) -> &mut Self
fn transform_clone(&self, t: &Transformation) -> Self
Source§impl TransformableFrom for Point
impl TransformableFrom for Point
fn transform_from(&mut self, reference: &Self, t: &Transformation) -> &mut Self
impl Copy for Point
impl Eq for Point
impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
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