Struct rust_sc2::geometry::Point3 [−][src]
Point in 3D game world.
Fields
x: f32
y: f32
z: 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.
fn add(self, other: Self) -> Self
[src]
impl Add<f32> for Point3
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: f32) -> Self
[src]
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.
fn div(self, other: Self) -> Self
[src]
impl Div<f32> for Point3
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: f32) -> Self
[src]
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.
fn mul(self, other: Self) -> Self
[src]
impl Mul<f32> for Point3
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: f32) -> Self
[src]
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.
fn sub(self, other: Self) -> Self
[src]
impl Sub<f32> for Point3
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: f32) -> Self
[src]
impl Sum<Point3> for Point3
[src]
Auto Trait Implementations
impl RefUnwindSafe for Point3
[src]
impl Send for Point3
[src]
impl Sync for Point3
[src]
impl Unpin for Point3
[src]
impl UnwindSafe for Point3
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Distance for T where
T: Into<Point2>,
[src]
T: Into<Point2>,
fn distance_squared<P: Into<Point2>>(self, other: P) -> f32
[src]
fn distance<P: Into<Point2>>(self, other: P) -> f32
[src]
fn is_closer<P: Into<Point2>>(self, distance: f32, other: P) -> bool
[src]
fn is_further<P: Into<Point2>>(self, distance: f32, other: P) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,