pub struct DistanceOutput {
pub point_a: Vec2,
pub point_b: Vec2,
pub normal: Vec2,
pub distance: f32,
pub iterations: i32,
pub simplex_count: i32,
}Expand description
Output for shape_distance.
(b2DistanceOutput)
Fields§
§point_a: Vec2Closest point on shape A, in shape A’s frame
point_b: Vec2Closest point on shape B, in shape A’s frame
normal: Vec2A to B normal in shape A’s frame. Invalid if distance is zero.
distance: f32The final distance, zero if overlapped
iterations: i32Number of GJK iterations used
simplex_count: i32The number of simplexes stored in the simplex array
Trait Implementations§
Source§impl Clone for DistanceOutput
impl Clone for DistanceOutput
Source§fn clone(&self) -> DistanceOutput
fn clone(&self) -> DistanceOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DistanceOutput
Source§impl Debug for DistanceOutput
impl Debug for DistanceOutput
Source§impl Default for DistanceOutput
impl Default for DistanceOutput
Source§fn default() -> DistanceOutput
fn default() -> DistanceOutput
Returns the “default value” for a type. Read more
Source§impl PartialEq for DistanceOutput
impl PartialEq for DistanceOutput
impl StructuralPartialEq for DistanceOutput
Auto Trait Implementations§
impl Freeze for DistanceOutput
impl RefUnwindSafe for DistanceOutput
impl Send for DistanceOutput
impl Sync for DistanceOutput
impl Unpin for DistanceOutput
impl UnsafeUnpin for DistanceOutput
impl UnwindSafe for DistanceOutput
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