Trait rust_3d::traits::IsBuildable2D
[−]
[src]
pub trait IsBuildable2D: Is2D + IsBuildableND + Eq + PartialEq + Ord + PartialOrd + Hash { fn new(x: f64, y: f64) -> Box<Self>; fn from<P>(&mut self, other: P)
where
P: Is2D; fn normalized(&self) -> Result<Box<Self>> { ... } fn parse(text: String) -> Result<Box<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) -> Box<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<Box<Self>>
Returns this with normalized values
fn parse(text: String) -> Result<Box<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