pub struct QTHazard {
pub qt_bbox: Rect,
pub hkey: HazKey,
pub entity: HazardEntity,
pub presence: QTHazPresence,
}Fields§
§qt_bbox: RectThe bounding box of the quadtree node
hkey: HazKeyThe key of the hazard in the hazard map in CDEngine
entity: HazardEntityEntity inducing the hazard
presence: QTHazPresenceHow the hazard is present in the node
Implementations§
Source§impl QTHazard
impl QTHazard
Sourcepub fn constrict(
&self,
quadrants: [Rect; 4],
haz_map: &SlotMap<HazKey, Hazard>,
) -> [Self; 4]
pub fn constrict( &self, quadrants: [Rect; 4], haz_map: &SlotMap<HazKey, Hazard>, ) -> [Self; 4]
Returns the resulting QTHazards after constricting to the provided quadrants.
The quadrants should be ordered according to the Cartesian system
and should all be inside the bounds from which self was created.
pub fn n_edges(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QTHazard
impl RefUnwindSafe for QTHazard
impl Send for QTHazard
impl Sync for QTHazard
impl Unpin for QTHazard
impl UnwindSafe for QTHazard
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