[−]Struct rltk::Point3
Helper struct defining a 2D point in space.
Fields
x: i32
y: i32
z: i32
Methods
impl Point3
pub fn new<T>(x: T, y: T, z: T) -> Point3 where
T: TryInto<i32>,
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.
fn add(self, rhs: Point3) -> Point3
impl Add<i32> for Point3
Support adding an int to a point
type Output = Point3
The resulting type after applying the +
operator.
fn add(self, rhs: i32) -> Point3
impl Clone for Point3
fn clone(&self) -> Point3
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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.
fn div(self, rhs: Point3) -> Point3
impl Div<f32> for Point3
Support dividing a point by an f32
type Output = Point3
The resulting type after applying the /
operator.
fn div(self, rhs: f32) -> Point3
impl Div<i32> for Point3
Support dividing a point by an int
type Output = Point3
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> Point3
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.
fn mul(self, rhs: Point3) -> Point3
impl Mul<f32> for Point3
Support multiplying a point by an f32
type Output = Point3
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Point3
impl Mul<i32> for Point3
Support multiplying a point by an int
type Output = Point3
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> Point3
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.
fn sub(self, rhs: Point3) -> Point3
impl Sub<i32> for Point3
Support subtracting an int from a point
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]
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,
fn borrow_mut(&mut self) -> &mut T
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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.
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>,