[−][src]Struct arcs::components::Space
Methods
impl Space
[src]
pub const WORLD_RADIUS: f64
[src]
pub fn modify(&mut self, spatial: SpatialEntity)
[src]
Modifies the spatial position of the given SpatialEntity
inside of
Space
If the SpatialEntity
is not already inside of
Space
it will be inserted.
pub fn remove(&mut self, entity: Entity)
[src]
pub fn remove_by_id(&mut self, id: Index)
[src]
pub fn iter<'this>(&'this self) -> impl Iterator<Item = SpatialEntity> + 'this
[src]
Returns an iterator over all SpatialEntity
in this Space
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn query_point<'this>(
&'this self,
point: Point,
radius: f64
) -> impl Iterator<Item = SpatialEntity> + 'this
[src]
&'this self,
point: Point,
radius: f64
) -> impl Iterator<Item = SpatialEntity> + 'this
Performs a spatial query in an radius around a given Point
Returns an iterator with all SpatialEntity
inhabiting the Space
close to the given point
The returned iterator can be empty
pub fn query_region<'this>(
&'this self,
region: BoundingBox
) -> impl Iterator<Item = SpatialEntity> + 'this
[src]
&'this self,
region: BoundingBox
) -> impl Iterator<Item = SpatialEntity> + 'this
Performs a spatial query for a given BoundingBox
Returns an iterator with all SpatialEntity
inhabiting the Space
of the given BoundingBox
The returned iterator can be empty
pub fn clear(&mut self)
[src]
Clears the Space
of all SpatialEntity
pub fn resize(&mut self, size: impl Spatial<f64>)
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Space
impl Send for Space
impl Sync for Space
impl Unpin for Space
impl UnwindSafe for Space
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> RoundFrom<T> for T
[src]
fn round_from(x: T) -> T
[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
[src]
U: RoundFrom<T>,
fn round_into(self) -> U
[src]
impl<T> TryDefault for T where
T: Default,
[src]
T: Default,
fn try_default() -> Result<T, String>
[src]
fn unwrap_default() -> Self
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,