Coords

Struct Coords 

Source
#[repr(C)]
pub struct Coords(pub f64, pub f64, pub f64, pub f64);
Expand description

A generic 4-dimensional point/vector

Tuple Fields§

§0: f64§1: f64§2: f64§3: f64

Implementations§

Source§

impl Coords

Source

pub fn new(x: f64, y: f64, z: f64, t: f64) -> Coords

Create a new Coords

Source

pub fn new_xy(x: f64, y: f64) -> Coords

Create a new Coords from xy

Trait Implementations§

Source§

impl Clone for Coords

Source§

fn clone(&self) -> Coords

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Coords

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Coords

Source§

fn default() -> Coords

Returns the “default value” for a type. Read more
Source§

impl GetXY for Coords

Source§

fn x(&self) -> f64

Returns the x value
Source§

fn y(&self) -> f64

Returns the y value
Source§

fn xy(&self) -> (f64, f64)

Returns the x and y values
Source§

impl GetZ for Coords

Source§

fn z(&self) -> Option<f64>

Returns the z value
Source§

impl NewXY for Coords

Source§

fn new_xy(x: f64, y: f64) -> Self

Create a new point with xy
Source§

impl NewXYZ for Coords

Source§

fn new_xyz(x: f64, y: f64, z: f64) -> Self

Create a new point with xyz
Source§

impl PartialEq for Coords

Source§

fn eq(&self, other: &Coords) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SetXY for Coords

Source§

fn set_x(&mut self, x: f64)

Set the x value
Source§

fn set_y(&mut self, y: f64)

Set the y value
Source§

fn set_xy(&mut self, x: f64, y: f64)

Set both x and y
Source§

impl SetZ for Coords

Source§

fn set_z(&mut self, z: f64)

Set the z value
Source§

impl TransformCoordinates for Coords

Source§

fn x(&self) -> f64

Get Geodetic X coordinates
Source§

fn y(&self) -> f64

Get Geodetic Y coordinates
Source§

fn z(&self) -> f64

Get Geodetic Z coordinates
Source§

fn t(&self) -> f64

Get the temporal coordinate
Source§

fn set_x(&mut self, x: f64)

Set Geodetic X coordinates
Source§

fn set_y(&mut self, y: f64)

Set Geodetic Y coordinates
Source§

fn set_z(&mut self, z: f64)

Set Geodetic Z coordinates
Source§

fn set_t(&mut self, t: f64)

Set the temporal coordinate
Source§

fn has_z(&self) -> bool

Check if Z exists
Source§

fn get(&self, idx: usize) -> f64

Get a coordinate at index
Source§

fn set(&mut self, idx: usize, val: f64)

Set a coordinate at index
Source§

fn u(&self) -> f64

Get U
Source§

fn set_u(&mut self, u: f64)

Set U
Source§

fn lam(&self) -> f64

Get lambda (radial longitude)
Source§

fn set_lam(&mut self, lam: f64)

Set lambda (radial longitude)
Source§

fn s(&self) -> f64

Get S (Geodesic length)
Source§

fn set_s(&mut self, s: f64)

Set S (Geodesic length)
Source§

fn o(&self) -> f64

Get Omega (Rotation)
Source§

fn set_o(&mut self, o: f64)

Set Omega (Rotation)
Source§

fn e(&self) -> f64

Get East (Directional coordinate)
Source§

fn set_e(&mut self, e: f64)

Set East (Directional coordinate)
Source§

fn v(&self) -> f64

Get V (UV space)
Source§

fn set_v(&mut self, v: f64)

Set V (UV space)
Source§

fn phi(&self) -> f64

Get Phi (radial latitude)
Source§

fn set_phi(&mut self, phi: f64)

Set Phi (radial latitude)
Source§

fn a1(&self) -> f64

Get fwd azi (Geodesic measurement)
Source§

fn set_a1(&mut self, t: f64)

Set fwd azi (Geodesic measurement)
Source§

fn p(&self) -> f64

Get Phi (Rotations measurement)
Source§

fn set_p(&mut self, t: f64)

Set Phi (Rotations measurement)
Source§

fn n(&self) -> f64

Get North (Directional coordinate)
Source§

fn set_n(&mut self, n: f64)

Set North (Directional coordinate)
Source§

fn w(&self) -> f64

Get W
Source§

fn set_w(&mut self, w: f64)

Set W
Source§

fn a2(&self) -> f64

Get rev azi (Geodesic measurement)
Source§

fn set_a2(&mut self, a2: f64)

Set rev azi (Geodesic measurement)
Source§

fn k(&self) -> f64

Get Kappa (Rotation)
Source§

fn set_k(&mut self, k: f64)

Set Kappa (Rotation)
Source§

fn up(&self) -> f64

Get Up (Directional coordinate)
Source§

fn set_up(&mut self, up: f64)

Set Up (Directional coordinate)
Source§

impl Copy for Coords

Source§

impl StructuralPartialEq for Coords

Auto Trait Implementations§

§

impl Freeze for Coords

§

impl RefUnwindSafe for Coords

§

impl Send for Coords

§

impl Sync for Coords

§

impl Unpin for Coords

§

impl UnwindSafe for Coords

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClampWGS84Point for T
where T: GetXY + SetXY,

Source§

fn clamp_wgs84(&mut self)

Updates the WGS84 point’s x and y values as needed to be valid WGS84
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SetXYZ for T
where T: SetXY + SetZ,

Source§

fn set_xyz(&mut self, x: f64, y: f64, z: f64)

Set x, y and z
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where 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>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> GetXYZ for T
where T: GetXY + GetZ,