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

Trait Implementations

Derived Implementations

impl PartialEq for Line3f

fn eq(&self, __arg_0: &Line3f) -> bool

fn ne(&self, __arg_0: &Line3f) -> bool

impl Debug for Line3f

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Copy for Line3f

impl Clone for Line3f

fn clone(&self) -> Line3f

fn clone_from(&mut self, source: &Self)