Struct pathfinder_geometry::line_segment::LineSegment2F

source ·
pub struct LineSegment2F(pub F32x4);

Tuple Fields§

§0: F32x4

Implementations§

source§

impl LineSegment2F

source

pub fn new(from: Vector2F, to: Vector2F) -> LineSegment2F

source

pub fn from(self) -> Vector2F

source

pub fn to(self) -> Vector2F

source

pub fn set_from(&mut self, point: Vector2F)

source

pub fn set_to(&mut self, point: Vector2F)

source

pub fn from_x(self) -> f32

source

pub fn from_y(self) -> f32

source

pub fn to_x(self) -> f32

source

pub fn to_y(self) -> f32

source

pub fn set_from_x(&mut self, x: f32)

source

pub fn set_from_y(&mut self, y: f32)

source

pub fn set_to_x(&mut self, x: f32)

source

pub fn set_to_y(&mut self, y: f32)

source

pub fn split(self, t: f32) -> (LineSegment2F, LineSegment2F)

source

pub fn split_at_x(self, x: f32) -> (LineSegment2F, LineSegment2F)

source

pub fn split_at_y(self, y: f32) -> (LineSegment2F, LineSegment2F)

source

pub fn solve_t_for_x(self, x: f32) -> f32

source

pub fn solve_t_for_y(self, y: f32) -> f32

source

pub fn solve_x_for_y(self, y: f32) -> f32

source

pub fn solve_y_for_x(self, x: f32) -> f32

source

pub fn reversed(self) -> LineSegment2F

source

pub fn upper_point(self) -> Vector2F

source

pub fn min_x(self) -> f32

source

pub fn max_x(self) -> f32

source

pub fn min_y(self) -> f32

source

pub fn max_y(self) -> f32

source

pub fn y_winding(self) -> i32

source

pub fn orient(self, y_winding: i32) -> LineSegment2F

source

pub fn square_length(self) -> f32

source

pub fn vector(self) -> Vector2F

source

pub fn intersection_t(self, other: LineSegment2F) -> Option<f32>

source

pub fn sample(self, t: f32) -> Vector2F

source

pub fn midpoint(self) -> Vector2F

source

pub fn offset(self, distance: f32) -> LineSegment2F

source

pub fn is_zero_length(self) -> bool

Trait Implementations§

source§

impl Add<Vector2F> for LineSegment2F

§

type Output = LineSegment2F

The resulting type after applying the + operator.
source§

fn add(self, point: Vector2F) -> LineSegment2F

Performs the + operation. Read more
source§

impl Clone for LineSegment2F

source§

fn clone(&self) -> LineSegment2F

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for LineSegment2F

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for LineSegment2F

source§

fn default() -> LineSegment2F

Returns the “default value” for a type. Read more
source§

impl Mul<LineSegment2F> for Transform2F

§

type Output = LineSegment2F

The resulting type after applying the * operator.
source§

fn mul(self, line_segment: LineSegment2F) -> LineSegment2F

Performs the * operation. Read more
source§

impl Mul<Vector2F> for LineSegment2F

§

type Output = LineSegment2F

The resulting type after applying the * operator.
source§

fn mul(self, factors: Vector2F) -> LineSegment2F

Performs the * operation. Read more
source§

impl Mul<f32> for LineSegment2F

§

type Output = LineSegment2F

The resulting type after applying the * operator.
source§

fn mul(self, factor: f32) -> LineSegment2F

Performs the * operation. Read more
source§

impl MulAssign<Vector2F> for LineSegment2F

source§

fn mul_assign(&mut self, factors: Vector2F)

Performs the *= operation. Read more
source§

impl PartialEq for LineSegment2F

source§

fn eq(&self, other: &LineSegment2F) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<Vector2F> for LineSegment2F

§

type Output = LineSegment2F

The resulting type after applying the - operator.
source§

fn sub(self, point: Vector2F) -> LineSegment2F

Performs the - operation. Read more
source§

impl Copy for LineSegment2F

source§

impl StructuralPartialEq for LineSegment2F

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.