Struct bcar::EntryPlanner [−][src]
pub struct EntryPlanner { /* fields omitted */ }
Implementations
impl EntryPlanner
[src]
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]
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 Copy for EntryPlanner
[src]impl PartialEq<EntryPlanner> 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]
impl StructuralPartialEq for EntryPlanner
[src]Auto Trait Implementations
impl RefUnwindSafe for EntryPlanner
impl RefUnwindSafe for EntryPlanner
impl Send for EntryPlanner
impl Send for EntryPlanner
impl Sync for EntryPlanner
impl Sync for EntryPlanner
impl Unpin for EntryPlanner
impl Unpin for EntryPlanner
impl UnwindSafe for EntryPlanner
impl UnwindSafe for EntryPlanner