[]Struct rltk::Point3

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

Helper struct defining a 2D point in space.

Fields

x: i32y: i32z: i32

Methods

impl Point3

pub fn new<T>(x: T, y: T, z: T) -> Point3 where
    T: TryInto<i32>, 

Create a new point from an x/y/z coordinate.

pub fn from_tuple(t: (i32, i32, i32)) -> Point3

Create a point from an x/y/z tuple

pub fn to_vec3(&self) -> Vec3

Converts into an UltraViolet Vec3

pub fn to_vec3i(&self) -> Vec3i

Converts into an UltraViolet Vec3

Trait Implementations

impl Add<Point3> for Point3

Overloads: We support basic point math Support adding a point to a point

type Output = Point3

The resulting type after applying the + operator.

impl Add<i32> for Point3

Support adding an int to a point

type Output = Point3

The resulting type after applying the + operator.

impl Clone for Point3

impl Copy for Point3

impl Debug for Point3

impl Div<Point3> for Point3

Support dividing a point by a point

type Output = Point3

The resulting type after applying the / operator.

impl Div<f32> for Point3

Support dividing a point by an f32

type Output = Point3

The resulting type after applying the / operator.

impl Div<i32> for Point3

Support dividing a point by an int

type Output = Point3

The resulting type after applying the / operator.

impl Eq for Point3

impl From<Vec3> for Point3

impl From<Vec3i> for Point3

impl Mul<Point3> for Point3

Support multiplying a point by a point

type Output = Point3

The resulting type after applying the * operator.

impl Mul<f32> for Point3

Support multiplying a point by an f32

type Output = Point3

The resulting type after applying the * operator.

impl Mul<i32> for Point3

Support multiplying a point by an int

type Output = Point3

The resulting type after applying the * operator.

impl PartialEq<Point3> for Point3

impl StructuralEq for Point3

impl StructuralPartialEq for Point3

impl Sub<Point3> for Point3

Support subtracting a point from a point

type Output = Point3

The resulting type after applying the - operator.

impl Sub<i32> for Point3

Support subtracting an int from a point

type Output = Point3

The resulting type after applying the - operator.

Auto Trait Implementations

impl RefUnwindSafe for Point3

impl Send for Point3

impl Sync for Point3

impl Unpin for Point3

impl UnwindSafe for Point3

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> From<T> for T[src]

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

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>,