[][src]Trait rust_3d::IsEditable3D

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_xyz(&mut self, x: f64, y: f64, z: f64) { ... }
fn set_xy(&mut self, x: f64, y: f64) { ... }
fn set_xz(&mut self, x: f64, z: f64) { ... }
fn set_yz(&mut self, y: f64, z: f64) { ... }
fn increase_distance_to_by<P>(&mut self, other: &P, factor: Positive)
    where
        P: Is3D
, { ... }
fn add<P>(&mut self, other: &P)
    where
        P: Is3D
, { ... }
fn subtract<P>(&mut self, other: &P)
    where
        P: Is3D
, { ... }
fn scale_pos(&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

Loading content...

Provided methods

fn set_xyz(&mut self, x: f64, y: f64, z: f64)

Sets the position from x, y and z values

fn set_xy(&mut self, x: f64, y: f64)

Updates the position with x and y values

fn set_xz(&mut self, x: f64, z: f64)

Updates the position with x and z values

fn set_yz(&mut self, y: f64, z: f64)

Updates the position with y and z values

fn increase_distance_to_by<P>(&mut self, other: &P, factor: Positive) where
    P: Is3D

Increases distance towards other by factor

fn add<P>(&mut self, other: &P) where
    P: Is3D

Adds the coordinates of other onto this. x = x + other.x ...

fn subtract<P>(&mut self, other: &P) where
    P: Is3D

Subtracts the coordinates of other from this. x = x - other.x ...

fn scale_pos(&mut self, val: f64)

Scales the coordinates by applying a factor to all of them

Loading content...

Implementors

impl IsEditable3D for Box3D[src]

impl IsEditable3D for FilterBox3D[src]

impl IsEditable3D for FilterSphere[src]

impl IsEditable3D for Point3D[src]

impl IsEditable3D for Sphere[src]

Loading content...