pub struct Axis<S: Scalar> {
pub point: Vector3<S>,
pub direction: Vector3<S>,
}Expand description
A straight line: through point, along the unit vector direction.
Fields§
§point: Vector3<S>§direction: Vector3<S>Implementations§
Source§impl<S: Scalar> Axis<S>
impl<S: Scalar> Axis<S>
Sourcepub fn try_new(point: Vector3<S>, direction: Vector3<S>) -> GeopResult<Self>
pub fn try_new(point: Vector3<S>, direction: Vector3<S>) -> GeopResult<Self>
The line through point along direction, which need not be unit
length but must not be zero.
Sourcepub fn project(&self, p: &Vector3<S>) -> Vector3<S>
pub fn project(&self, p: &Vector3<S>) -> Vector3<S>
The point of the line closest to p: the foot of the perpendicular
from p.
Sourcepub fn could_contain(&self, p: &Vector3<S>) -> bool
pub fn could_contain(&self, p: &Vector3<S>) -> bool
Whether p could lie on the line.
Sourcepub fn could_be_parallel(&self, other: &Axis<S>) -> bool
pub fn could_be_parallel(&self, other: &Axis<S>) -> bool
Whether other could run parallel to this line, either way.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Axis<S>where
S: Freeze,
impl<S> RefUnwindSafe for Axis<S>where
S: RefUnwindSafe,
impl<S> Send for Axis<S>
impl<S> Sync for Axis<S>
impl<S> Unpin for Axis<S>where
S: Unpin,
impl<S> UnsafeUnpin for Axis<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Axis<S>where
S: UnwindSafe,
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