pub struct Contacts {
pub floor: bool,
pub ceiling: bool,
pub wall: bool,
pub last_floor_normal: Vec2,
pub last_ceiling_normal: Vec2,
pub desired: Vec2,
pub effective: Vec2,
pub down_blocked: bool,
pub up_blocked: bool,
}Expand description
What a resolved move ran into.
Normals are stored whole rather than as a single component so the caller can read them in its own axis convention.
Fields§
§floor: boolA floor face was contacted.
ceiling: boolA ceiling face was contacted.
wall: boolA side face was contacted.
last_floor_normal: Vec2Normal of the most recent floor contact, or zero if there was none.
last_ceiling_normal: Vec2Normal of the most recent ceiling contact, or zero if there was none.
desired: Vec2The delta the caller asked for.
effective: Vec2The delta actually applied.
down_blocked: boolMotion against up was requested and not achieved — the body is
resting on something.
up_blocked: boolMotion along up was requested and not achieved — a head-bump.
Trait Implementations§
impl Copy for Contacts
impl StructuralPartialEq for Contacts
Auto Trait Implementations§
impl Freeze for Contacts
impl RefUnwindSafe for Contacts
impl Send for Contacts
impl Sync for Contacts
impl Unpin for Contacts
impl UnsafeUnpin for Contacts
impl UnwindSafe for Contacts
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