Trait rust_3d::traits::IsEditable3D
[−]
[src]
pub trait IsEditable3D: Is3D + IsEditableND { fn set_x(&mut self, val: f64); fn set_y(&mut self, val: f64); fn set_z(&mut self, val: f64); fn set_pos(&mut self, x: f64, y: f64, z: f64) { ... } fn add<P>(&mut self, other: &P)
where
P: Is3D, { ... } fn substract<P>(&mut self, other: &P)
where
P: Is3D, { ... } fn scale(&mut self, val: f64) { ... } }
IsEditable3D is a trait used for types which are positioned in 3D space and their position can be changed
Required Methods
fn set_x(&mut self, val: f64)
Should set the position in x
fn set_y(&mut self, val: f64)
Should set the position in y
fn set_z(&mut self, val: f64)
Should set the position in z
Provided Methods
fn set_pos(&mut self, x: f64, y: f64, z: f64)
Sets the position from a x, y and z values
fn add<P>(&mut self, other: &P) where
P: Is3D,
P: Is3D,
Adds the coordinates of other onto this. x = x + other.x ...
fn substract<P>(&mut self, other: &P) where
P: Is3D,
P: Is3D,
Substracts the coordinates of other from this. x = x - other.x ...
fn scale(&mut self, val: f64)
Scales the coordinates by applying a factor to all of them
Implementors
impl IsEditable3D for FilterBox3D
impl IsEditable3D for FilterSphere
impl IsEditable3D for Point3D
impl IsEditable3D for Sphere
impl IsEditable3D for Box3D