Struct lyon_algorithms::geom::LineEquation [−]
pub struct LineEquation<S> { /* fields omitted */ }
A line defined by the equation
a * x + b * y + c = 0; a * a + b * b = 1
.
Methods
impl<S> LineEquation<S> where
S: Scalar,
impl<S> LineEquation<S> where
S: Scalar,
pub fn new(a: S, b: S, c: S) -> LineEquation<S>
pub fn new(a: S, b: S, c: S) -> LineEquation<S>
pub fn a(&self) -> S
pub fn a(&self) -> S
pub fn b(&self) -> S
pub fn b(&self) -> S
pub fn c(&self) -> S
pub fn c(&self) -> S
pub fn project_point(
&self,
p: &TypedPoint2D<S, UnknownUnit>
) -> TypedPoint2D<S, UnknownUnit>
pub fn project_point(
&self,
p: &TypedPoint2D<S, UnknownUnit>
) -> TypedPoint2D<S, UnknownUnit>
pub fn signed_distance_to_point(&self, p: &TypedPoint2D<S, UnknownUnit>) -> S
pub fn signed_distance_to_point(&self, p: &TypedPoint2D<S, UnknownUnit>) -> S
pub fn distance_to_point(&self, p: &TypedPoint2D<S, UnknownUnit>) -> S
pub fn distance_to_point(&self, p: &TypedPoint2D<S, UnknownUnit>) -> S
pub fn invert(&self) -> LineEquation<S>
pub fn invert(&self) -> LineEquation<S>
pub fn parallel_line(&self, p: &TypedPoint2D<S, UnknownUnit>) -> LineEquation<S>
pub fn parallel_line(&self, p: &TypedPoint2D<S, UnknownUnit>) -> LineEquation<S>
pub fn offset(&self, d: S) -> LineEquation<S>
pub fn offset(&self, d: S) -> LineEquation<S>
pub fn tangent(&self) -> TypedVector2D<S, UnknownUnit>
pub fn tangent(&self) -> TypedVector2D<S, UnknownUnit>
pub fn normal(&self) -> TypedVector2D<S, UnknownUnit>
pub fn normal(&self) -> TypedVector2D<S, UnknownUnit>
pub fn solve_y_for_x(&self, x: S) -> Option<S>
pub fn solve_y_for_x(&self, x: S) -> Option<S>
pub fn solve_x_for_y(&self, y: S) -> Option<S>
pub fn solve_x_for_y(&self, y: S) -> Option<S>
pub fn is_horizontal(&self) -> bool
pub fn is_horizontal(&self) -> bool
pub fn is_vertical(&self) -> bool
pub fn is_vertical(&self) -> bool
Trait Implementations
impl<S> Clone for LineEquation<S> where
S: Clone,
impl<S> Clone for LineEquation<S> where
S: Clone,
fn clone(&self) -> LineEquation<S>
fn clone(&self) -> LineEquation<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<S> Debug for LineEquation<S> where
S: Debug,
impl<S> Debug for LineEquation<S> where
S: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<S> Copy for LineEquation<S> where
S: Copy,
impl<S> Copy for LineEquation<S> where
S: Copy,
impl<S> Eq for LineEquation<S> where
S: Eq,
impl<S> Eq for LineEquation<S> where
S: Eq,
impl<S> PartialEq<LineEquation<S>> for LineEquation<S> where
S: PartialEq<S>,
impl<S> PartialEq<LineEquation<S>> for LineEquation<S> where
S: PartialEq<S>,
fn eq(&self, other: &LineEquation<S>) -> bool
fn eq(&self, other: &LineEquation<S>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &LineEquation<S>) -> bool
fn ne(&self, other: &LineEquation<S>) -> bool
This method tests for !=
.
Auto Trait Implementations
impl<S> Send for LineEquation<S> where
S: Send,
impl<S> Send for LineEquation<S> where
S: Send,
impl<S> Sync for LineEquation<S> where
S: Sync,
impl<S> Sync for LineEquation<S> where
S: Sync,