Struct rust_sc2::geometry::Point3[][src]

pub struct Point3 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}

Point in 3D game world.

Fields

x: f32y: f32z: f32

Implementations

impl Point3[src]

pub fn new(x: f32, y: f32, z: f32) -> Self[src]

Constructs new 3D Point with given coordinates.

pub fn offset(self, x: f32, y: f32, z: f32) -> Self[src]

Returns new point with given offset.

pub fn round(self) -> Self[src]

Returns rounded point.

pub fn as_tuple(self) -> (f32, f32, f32)[src]

Returns tuple with point's coordinates.

pub fn to2(self) -> Point2[src]

Converts 3D Point to 2D Point.

Trait Implementations

impl Add<Point3> for Point3[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<f32> for Point3[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for Point3[src]

impl Copy for Point3[src]

impl Debug for Point3[src]

impl Default for Point3[src]

impl Div<Point3> for Point3[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<f32> for Point3[src]

type Output = Self

The resulting type after applying the / operator.

impl From<(f32, f32, f32)> for Point3[src]

impl From<Point3> for Point2[src]

impl Mul<Point3> for Point3[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<f32> for Point3[src]

type Output = Self

The resulting type after applying the * operator.

impl Radius for Point3[src]

impl Radius for &Point3[src]

impl Sub<Point3> for Point3[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<f32> for Point3[src]

type Output = Self

The resulting type after applying the - operator.

impl Sum<Point3> for Point3[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Distance for T where
    T: Into<Point2>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,