pub struct VectorPoint {
pub x: f64,
pub y: f64,
pub z: Option<f64>,
pub m: Option<MValue>,
pub t: Option<f64>,
}
Expand description
A Vector Point uses a structure for 2D or 3D points
Fields§
§x: f64
X coordinate
y: f64
Y coordinate
z: Option<f64>
Z coordinate or “altitude”. May be None
m: Option<MValue>
M-Value
t: Option<f64>
T for tolerance. A tmp value used for simplification
Implementations§
Source§impl VectorPoint
impl VectorPoint
Sourcepub fn project(&mut self, bbox: &mut Option<BBox3D>)
pub fn project(&mut self, bbox: &mut Option<BBox3D>)
Project the point into the 0->1 coordinate system
Sourcepub fn unproject(&mut self)
pub fn unproject(&mut self)
Unproject the point from the 0->1 coordinate system back to a lon-lat coordinate
Sourcepub fn distance(&self, other: &VectorPoint) -> f64
pub fn distance(&self, other: &VectorPoint) -> f64
Calculate the distance between two points
Trait Implementations§
Source§impl Clone for VectorPoint
impl Clone for VectorPoint
Source§fn clone(&self) -> VectorPoint
fn clone(&self) -> VectorPoint
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VectorPoint
impl Debug for VectorPoint
Source§impl<'de> Deserialize<'de> for VectorPoint
impl<'de> Deserialize<'de> for VectorPoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VectorPoint
impl PartialEq for VectorPoint
Source§impl Serialize for VectorPoint
impl Serialize for VectorPoint
impl StructuralPartialEq for VectorPoint
Auto Trait Implementations§
impl Freeze for VectorPoint
impl RefUnwindSafe for VectorPoint
impl Send for VectorPoint
impl Sync for VectorPoint
impl Unpin for VectorPoint
impl UnwindSafe for VectorPoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more