pub struct Line3f {
pub points: (Vec3f, Vec3f),
}
Expand description
Line of infinite length represented by two distinct points it passes through.
Fields§
§points: (Vec3f, Vec3f)
Implementations§
source§impl Line3f
impl Line3f
sourcepub fn new(a: Vec3f, b: Vec3f) -> Option<Line3f>
pub fn new(a: Vec3f, b: Vec3f) -> Option<Line3f>
Create a new line. Return None if the input points are identical.
sourcepub fn closest_points_between_lines(self, line: Line3f) -> Option<(f32, f32)>
pub fn closest_points_between_lines(self, line: Line3f) -> Option<(f32, f32)>
Find the closest points between two lines. The result is a
pair of parametric points, the first for self
and the second
for line
. If the lines are parallel then None is
returned.
Adapted from “Real-Time Collision Detection” by Christer Ericson, published by Morgan Kaufmann Publishers, Copyright 2005 Elsevier Inc
Trait Implementations§
source§impl PartialEq for Line3f
impl PartialEq for Line3f
impl Copy for Line3f
impl StructuralPartialEq for Line3f
Auto Trait Implementations§
impl Freeze for Line3f
impl RefUnwindSafe for Line3f
impl Send for Line3f
impl Sync for Line3f
impl Unpin for Line3f
impl UnwindSafe for Line3f
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