Struct bcar::EntryPlanner [−][src]
Implementations
impl EntryPlanner[src]
pub fn new(slot: PSlot, car_size: Size) -> EntryPlanner[src]
pub fn parked(&self, car: BCar) -> bool[src]
Return if the car is inside the slot.
Examples
let c = bcar::BCar::default(); let s = bcar::PSlot::default(); let p = bcar::EntryPlanner::new(s, c.size); let mut c = c; c.pose.x = 1.1; c.pose.y = -1.1; let p = bcar::EntryPlanner::new(s, c.size); assert!(p.parked(c));
pub fn unparked(&self, car: BCar) -> bool[src]
Return if the front of the car is outside, so able to leave the slot.
Use this method when going out of the parking slot and want to check if the car is finally out.
Examples
let c = bcar::BCar::default(); let s = bcar::PSlot::default(); let p = bcar::EntryPlanner::new(s, c.size); let mut c = c; c.pose.x = 1.1; c.pose.y = -1.1; let p = bcar::EntryPlanner::new(s, c.size); assert!(!p.unparked(c));
pub fn collide(&self, c: BCar) -> Option<Point>[src]
Return if car c collide with the parking slot self.slot.
Check each frame line of the car with each frame line of the slot.
pub fn drive_out_of_slot(&self, c: &mut BCar) -> (u8, Vec<BCar>)[src]
Drive the car c out ouf self.slot and return True if success.
pub fn drive_in_the_slot(&self, c: &mut BCar) -> (u8, Vec<BCar>)[src]
Drive the car c in the self.slot.
pub fn guess_goal_by_reversed(&self) -> BCarⓘ[src]
Return goal of left rear in parking slot.
Use 1e-3 offset to avoid init collision.
pub fn find_goals_by_bfs(&self) -> Vec<BCar>[src]
Use 1e-3 offset to avoid init collision.
pub fn find_entries_by_bfs(&self) -> PoseRange[src]
Trait Implementations
impl Clone for EntryPlanner[src]
fn clone(&self) -> EntryPlanner[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for EntryPlanner[src]
impl Debug for EntryPlanner[src]
impl PartialEq<EntryPlanner> for EntryPlanner[src]
fn eq(&self, other: &EntryPlanner) -> bool[src]
fn ne(&self, other: &EntryPlanner) -> bool[src]
impl StructuralPartialEq for EntryPlanner[src]
Auto Trait Implementations
impl RefUnwindSafe for EntryPlanner[src]
impl Send for EntryPlanner[src]
impl Sync for EntryPlanner[src]
impl Unpin for EntryPlanner[src]
impl UnwindSafe for EntryPlanner[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[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.
pub 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>,