Struct dumbmath::line::Line3f
[−]
[src]
pub struct Line3f { pub points: (Vec3f, Vec3f), }
Line of infinite length represented by two distinct points it passes through.
Fields
points |
Methods
impl Line3f
fn new(a: Vec3f, b: Vec3f) -> Option<Line3f>
Create a new line. Return None if the input points are identical.
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