[][src]Trait rust_3d::IsBuildable3D

pub trait IsBuildable3D: Sized + Is3D + Eq + PartialEq + Ord + PartialOrd + Hash {
    fn new(x: f64, y: f64, z: f64) -> Self;
fn from<P>(&mut self, other: &P)
    where
        P: Is3D
; fn new_from<P>(other: &P) -> Self
    where
        P: Is3D
, { ... }
fn multiply_m(&self, m: &Matrix4) -> Self { ... }
fn normalized(&self) -> Result<Self> { ... }
fn zero() -> Self { ... }
fn parse(text: &str) -> Result<Self> { ... }
fn center<P>(&self, other: &P) -> Self
    where
        P: Is3D
, { ... } }

IsBuildable3D is a trait used for types which are positioned in 3D space and can be constructed

Required methods

fn new(x: f64, y: f64, z: f64) -> Self

Should build an object from x, y and z coordinates

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

Should use the coordinates of another as its own

Loading content...

Provided methods

fn new_from<P>(other: &P) -> Self where
    P: Is3D

Uses the coordinates of other to create a new

fn multiply_m(&self, m: &Matrix4) -> Self

Applies a matrix to this

fn normalized(&self) -> Result<Self>

Returns this with normalized values

fn zero() -> Self

Returns a new object with 0/0/0 as coordinates

fn parse(text: &str) -> Result<Self>

Creates this from a "x y z" string. E.g. "32.2 14.7 1.90"

fn center<P>(&self, other: &P) -> Self where
    P: Is3D

Returns the center between this and other

Loading content...

Implementors

impl IsBuildable3D for Box3D[src]

impl IsBuildable3D for FilterBox3D[src]

impl IsBuildable3D for FilterSphere[src]

impl IsBuildable3D for Point3D[src]

impl IsBuildable3D for Sphere[src]

Loading content...