Struct spade::primitives::SimpleCircle
source · Expand description
An n-dimensional circle, defined by its origin and radius.
Fields
center: V
The circle’s center.
radius: V::Scalar
The circle’s radius.
Implementations
sourceimpl<V> SimpleCircle<V>where
V: PointN,
V::Scalar: SpadeFloat,
impl<V> SimpleCircle<V>where
V: PointN,
V::Scalar: SpadeFloat,
sourcepub fn new(center: V, radius: V::Scalar) -> SimpleCircle<V>
pub fn new(center: V, radius: V::Scalar) -> SimpleCircle<V>
Create a new circle.
Trait Implementations
sourceimpl<V: Clone + PointN> Clone for SimpleCircle<V>where
V::Scalar: Clone,
impl<V: Clone + PointN> Clone for SimpleCircle<V>where
V::Scalar: Clone,
sourcefn clone(&self) -> SimpleCircle<V>
fn clone(&self) -> SimpleCircle<V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<V: Ord + PointN> Ord for SimpleCircle<V>where
V::Scalar: Ord,
impl<V: Ord + PointN> Ord for SimpleCircle<V>where
V::Scalar: Ord,
sourcefn cmp(&self, other: &SimpleCircle<V>) -> Ordering
fn cmp(&self, other: &SimpleCircle<V>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<V: PartialEq + PointN> PartialEq<SimpleCircle<V>> for SimpleCircle<V>where
V::Scalar: PartialEq,
impl<V: PartialEq + PointN> PartialEq<SimpleCircle<V>> for SimpleCircle<V>where
V::Scalar: PartialEq,
sourcefn eq(&self, other: &SimpleCircle<V>) -> bool
fn eq(&self, other: &SimpleCircle<V>) -> bool
sourceimpl<V: PartialOrd + PointN> PartialOrd<SimpleCircle<V>> for SimpleCircle<V>where
V::Scalar: PartialOrd,
impl<V: PartialOrd + PointN> PartialOrd<SimpleCircle<V>> for SimpleCircle<V>where
V::Scalar: PartialOrd,
sourcefn partial_cmp(&self, other: &SimpleCircle<V>) -> Option<Ordering>
fn partial_cmp(&self, other: &SimpleCircle<V>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl<V> SpatialObject for SimpleCircle<V>where
V: PointN,
V::Scalar: SpadeFloat,
impl<V> SpatialObject for SimpleCircle<V>where
V: PointN,
V::Scalar: SpadeFloat,
type Point = V
type Point = V
The object’s point type.
sourcefn mbr(&self) -> BoundingRect<V>
fn mbr(&self) -> BoundingRect<V>
Returns the object’s minimal bounding rectangle. Read more
impl<V: Copy + PointN> Copy for SimpleCircle<V>where
V::Scalar: Copy,
impl<V: Eq + PointN> Eq for SimpleCircle<V>where
V::Scalar: Eq,
impl<V: PointN> StructuralEq for SimpleCircle<V>
impl<V: PointN> StructuralPartialEq for SimpleCircle<V>
Auto Trait Implementations
impl<V> RefUnwindSafe for SimpleCircle<V>where
V: RefUnwindSafe,
<V as PointN>::Scalar: RefUnwindSafe,
impl<V> Send for SimpleCircle<V>where
V: Send,
<V as PointN>::Scalar: Send,
impl<V> Sync for SimpleCircle<V>where
V: Sync,
<V as PointN>::Scalar: Sync,
impl<V> Unpin for SimpleCircle<V>where
V: Unpin,
<V as PointN>::Scalar: Unpin,
impl<V> UnwindSafe for SimpleCircle<V>where
V: UnwindSafe,
<V as PointN>::Scalar: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.