Struct moon_engine::collider::Circle
source · [−]Expand description
A Cicle Collider.
Fields
origin: Point
radius: f32
Radius of the Circle Collider.
The radius defines how far any given point on it’s circumference is from it’s center.
Implementations
Trait Implementations
sourceimpl Collide<Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>> for Circle
impl Collide<Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>> for Circle
Circle and Point Collision
sourceimpl Collider for Circle
impl Collider for Circle
sourcefn get_bounding_box(&self) -> AABB
fn get_bounding_box(&self) -> AABB
Get the bounding box of a Collider as an AABB
.
sourcefn get_center(&self) -> Point
fn get_center(&self) -> Point
Get the center of the Collider as a Point
.
Auto Trait Implementations
impl RefUnwindSafe for Circle
impl Send for Circle
impl Sync for Circle
impl Unpin for Circle
impl UnwindSafe for Circle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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 SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
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 more
fn 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).
fn to_subset_unchecked(&self) -> SS
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.