Trait rust_3d::traits::IsBuildable2D
[−]
[src]
pub trait IsBuildable2D: Sized + Is2D + IsBuildableND + Eq + PartialEq + Ord + PartialOrd + Hash { fn new(x: f64, y: f64) -> Self; fn from<P>(&mut self, other: P)
where
P: Is2D; fn normalized(&self) -> Result<Self> { ... } fn multiply_m(&self, m: &Matrix3) -> Self { ... } fn parse(text: String) -> Result<Self> { ... } }
IsBuildable2D is a trait used for types which are positioned in 2D space and can be constructed
Required Methods
fn new(x: f64, y: f64) -> Self
Should build an object from x and y coordinates
fn from<P>(&mut self, other: P) where
P: Is2D,
P: Is2D,
Should use the coordinates of another as its own
Provided Methods
fn normalized(&self) -> Result<Self>
Returns this with normalized values
fn multiply_m(&self, m: &Matrix3) -> Self
Applies a matrix to this
fn parse(text: String) -> Result<Self>
Creates this from a "x y" string. E.g. "4.3 17.29"
Implementors
impl IsBuildable2D for FilterBox2D
impl IsBuildable2D for FilterCircle
impl IsBuildable2D for Point2D
impl IsBuildable2D for Circle
impl IsBuildable2D for Box2D