pub struct Coor3D(pub [f64; 3]);
Expand description
Generic 3D coordinate tuple, with no fixed interpretation of the elements
Tuple Fields§
§0: [f64; 3]
Implementations§
source§impl Coor3D
impl Coor3D
Constructors
sourcepub fn geo(latitude: f64, longitude: f64, height: f64) -> Coor3D
pub fn geo(latitude: f64, longitude: f64, height: f64) -> Coor3D
A Coor3D
from latitude/longitude/height/time, with the angular input in degrees
sourcepub fn arcsec(longitude: f64, latitude: f64, height: f64) -> Coor3D
pub fn arcsec(longitude: f64, latitude: f64, height: f64) -> Coor3D
A Coor3D
from longitude/latitude/height/time, with the angular input in seconds
of arc. Mostly for handling grid shift elements.
sourcepub fn gis(longitude: f64, latitude: f64, height: f64) -> Coor3D
pub fn gis(longitude: f64, latitude: f64, height: f64) -> Coor3D
A Coor3D
from longitude/latitude/height/time, with the angular input in degrees
sourcepub fn raw(first: f64, second: f64, third: f64) -> Coor3D
pub fn raw(first: f64, second: f64, third: f64) -> Coor3D
A Coor3D
from longitude/latitude/height/time, with the angular input in radians
sourcepub fn iso_dm(latitude: f64, longitude: f64, height: f64) -> Coor3D
pub fn iso_dm(latitude: f64, longitude: f64, height: f64) -> Coor3D
A Coor3D
from latitude/longitude/height/time,
with the angular input in the ISO-6709 DDDMM.mmmmm format
sourcepub fn iso_dms(latitude: f64, longitude: f64, height: f64) -> Coor3D
pub fn iso_dms(latitude: f64, longitude: f64, height: f64) -> Coor3D
A Coor3D
from latitude/longitude/height/time, with
the angular input in the ISO-6709 DDDMMSS.sssss format
Trait Implementations§
source§impl CoordinateTuple for Coor3D
impl CoordinateTuple for Coor3D
source§fn nth_unchecked(&self, n: usize) -> f64
fn nth_unchecked(&self, n: usize) -> f64
nth()
.source§fn set_nth_unchecked(&mut self, n: usize, value: f64)
fn set_nth_unchecked(&mut self, n: usize, value: f64)
source§fn nth(&self, n: usize) -> f64
fn nth(&self, n: usize) -> f64
n >= DIMENSION
.
See also nth()
.source§fn y(&self) -> f64
fn y(&self) -> f64
source§fn t(&self) -> f64
fn t(&self) -> f64
source§fn xy(&self) -> (f64, f64)
fn xy(&self) -> (f64, f64)
source§fn xyz(&self) -> (f64, f64, f64)
fn xyz(&self) -> (f64, f64, f64)
source§fn xyzt(&self) -> (f64, f64, f64, f64)
fn xyzt(&self) -> (f64, f64, f64, f64)
source§fn xy_to_degrees(&self) -> (f64, f64)
fn xy_to_degrees(&self) -> (f64, f64)
source§fn xyz_to_degrees(&self) -> (f64, f64, f64)
fn xyz_to_degrees(&self) -> (f64, f64, f64)
source§fn xyzt_to_degrees(&self) -> (f64, f64, f64, f64)
fn xyzt_to_degrees(&self) -> (f64, f64, f64, f64)
source§fn xy_to_arcsec(&self) -> (f64, f64)
fn xy_to_arcsec(&self) -> (f64, f64)
source§fn xyz_to_arcsec(&self) -> (f64, f64, f64)
fn xyz_to_arcsec(&self) -> (f64, f64, f64)
source§fn xyzt_to_arcsec(&self) -> (f64, f64, f64, f64)
fn xyzt_to_arcsec(&self) -> (f64, f64, f64, f64)
source§fn xy_to_radians(&self) -> (f64, f64)
fn xy_to_radians(&self) -> (f64, f64)
source§fn xyz_to_radians(&self) -> (f64, f64, f64)
fn xyz_to_radians(&self) -> (f64, f64, f64)
source§fn xyzt_to_radians(&self) -> (f64, f64, f64, f64)
fn xyzt_to_radians(&self) -> (f64, f64, f64, f64)
source§fn set_nth(&mut self, n: usize, value: f64)
fn set_nth(&mut self, n: usize, value: f64)
CoordinateTuple
with value
.
If n >=
dim()
fill the coordinate with f64::NAN
.
See also set_nth_unchecked()
.source§fn set_xy(&mut self, x: f64, y: f64)
fn set_xy(&mut self, x: f64, y: f64)
CoordinateTuple
with x
and y
.
If the dimension is less than 2, fill the coordinate with f64::NAN
.
See also set_nth_unchecked()
.source§fn set_xyz(&mut self, x: f64, y: f64, z: f64)
fn set_xyz(&mut self, x: f64, y: f64, z: f64)
CoordinateTuple
with x
, y
and z
.
If the dimension is less than 3, fill the coordinate with f64::NAN
.source§fn set_xyzt(&mut self, x: f64, y: f64, z: f64, t: f64)
fn set_xyzt(&mut self, x: f64, y: f64, z: f64, t: f64)
CoordinateTuple
with x
, y
z
and t
.
If the dimension is less than 4, fill the coordinate with f64::NAN
.source§fn hypot2(&self, other: &Self) -> f64where
Self: Sized,
fn hypot2(&self, other: &Self) -> f64where
Self: Sized,
source§fn hypot3(&self, other: &Self) -> f64where
Self: Sized,
fn hypot3(&self, other: &Self) -> f64where
Self: Sized,
fn scale(&self, factor: f64) -> Self
fn dot(&self, other: Self) -> f64where
Self: Sized,
source§impl PartialEq for Coor3D
impl PartialEq for Coor3D
impl Copy for Coor3D
impl StructuralPartialEq for Coor3D
Auto Trait Implementations§
impl Freeze for Coor3D
impl RefUnwindSafe for Coor3D
impl Send for Coor3D
impl Sync for Coor3D
impl Unpin for Coor3D
impl UnwindSafe for Coor3D
Blanket Implementations§
source§impl<T> AngularUnits for Twhere
T: CoordinateTuple + Copy,
impl<T> AngularUnits for Twhere
T: CoordinateTuple + Copy,
source§fn to_degrees(&self) -> T
fn to_degrees(&self) -> T
Convert the first two elements of self
from radians to degrees
source§fn to_radians(&self) -> T
fn to_radians(&self) -> T
Convert the first two elements of self
from degrees to radians