[−][src]Trait rust_3d::Is3D
Is3D is a trait used for types which are positioned within the 3D space
Required methods
fn x(&self) -> f64
Should return the x-coordinate
fn y(&self) -> f64
Should return the y-coordinate
fn z(&self) -> f64
Should return the z-coordinate
Provided methods
fn xyz(&self) -> [f64; 3]
Returns the position as x,y,z array
fn xy(&self) -> [f64; 2]
Returns the components of the position as array
fn xz(&self) -> [f64; 2]
Returns the components of the position as array
fn yz(&self) -> [f64; 2]
Returns the components of the position as array
fn dot(&self, other: &dyn Is3D) -> f64
Calculates the dot product with another Is3D
fn abs(&self) -> NonNegative
The absolute / length of this position
fn rad_to(&self, other: &dyn Is3D) -> Result<Rad>
Calculates the angle to the other Is3D in radians
fn to_str(&self) -> String
Transforms the position in a "x y z" string. E.g. "3.72 5.99 1.01"
Trait Implementations
impl<P> HasDistanceTo<P> for dyn Is3D where
P: Is3D,
[src]
P: Is3D,
fn sqr_distance(&self, other: &P) -> NonNegative
[src]
fn distance(&self, other: &T) -> NonNegative
[src]
Implementations on Foreign Types
impl<P> Is3D for Box<P> where
P: IsND + Is3D,
[src]
Loading content...
P: IsND + Is3D,