pub struct Line {
pub guid: String,
pub name: String,
_x0: f32,
_y0: f32,
_z0: f32,
_x1: f32,
_y1: f32,
_z1: f32,
pub width: f32,
pub linecolor: Color,
pub xform: Xform,
}
Fields§
§guid: String
§name: String
§_x0: f32
§_y0: f32
§_z0: f32
§_x1: f32
§_y1: f32
§_z1: f32
§width: f32
§linecolor: Color
§xform: Xform
Implementations§
Source§impl Line
impl Line
pub fn new(x0: f32, y0: f32, z0: f32, x1: f32, y1: f32, z1: f32) -> Self
pub fn from_points(p1: &Point, p2: &Point) -> Self
pub fn with_name( name: &str, x0: f32, y0: f32, z0: f32, x1: f32, y1: f32, z1: f32, ) -> Self
pub fn x0(&self) -> f32
pub fn y0(&self) -> f32
pub fn z0(&self) -> f32
pub fn x1(&self) -> f32
pub fn y1(&self) -> f32
pub fn z1(&self) -> f32
pub fn set_x0(&mut self, v: f32)
pub fn set_y0(&mut self, v: f32)
pub fn set_z0(&mut self, v: f32)
pub fn set_x1(&mut self, v: f32)
pub fn set_y1(&mut self, v: f32)
pub fn set_z1(&mut self, v: f32)
pub fn length(&self) -> f32
pub fn squared_length(&self) -> f32
pub fn to_vector(&self) -> Vector
pub fn point_at(&self, t: f32) -> Point
pub fn start(&self) -> Point
pub fn end(&self) -> Point
Trait Implementations§
Source§impl AddAssign<&Vector> for Line
impl AddAssign<&Vector> for Line
Source§fn add_assign(&mut self, other: &Vector)
fn add_assign(&mut self, other: &Vector)
Performs the
+=
operation. Read moreSource§impl<'de> Deserialize<'de> for Line
impl<'de> Deserialize<'de> for Line
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DivAssign<f32> for Line
impl DivAssign<f32> for Line
Source§fn div_assign(&mut self, factor: f32)
fn div_assign(&mut self, factor: f32)
Performs the
/=
operation. Read moreSource§impl MulAssign<f32> for Line
impl MulAssign<f32> for Line
Source§fn mul_assign(&mut self, factor: f32)
fn mul_assign(&mut self, factor: f32)
Performs the
*=
operation. Read moreAuto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
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