pub struct BBox3D<T = f64> {
pub left: T,
pub bottom: T,
pub right: T,
pub top: T,
pub near: T,
pub far: T,
}Expand description
A BBOX is defined in lon-lat space and helps with zooming motion to see the entire 3D line or polygon
Fields§
§left: Tleft most longitude (WM) or S (S2)
bottom: Tbottom most latitude (WM) or T (S2)
right: Tright most longitude (WM) or T (S2)
top: Ttop most latitude (WM) or S (S2)
near: Tnear most height (WM) or T (S2) generic height is relative to the surface of the earth in meters
far: Tfar most height (WM) or T (S2) generic height is relative to the surface of the earth in meters
Implementations§
Source§impl<T> BBox3D<T>
impl<T> BBox3D<T>
Sourcepub fn new(left: T, bottom: T, right: T, top: T, near: T, far: T) -> BBox3D<T>where
T: Copy,
pub fn new(left: T, bottom: T, right: T, top: T, near: T, far: T) -> BBox3D<T>where
T: Copy,
Creates a new BBox3D
Sourcepub fn point_overlap<M>(&self, point: VectorPoint<M>) -> bool
pub fn point_overlap<M>(&self, point: VectorPoint<M>) -> bool
Checks if a point is within the BBox
Sourcepub fn merge(&self, other: &BBox3D<T>) -> BBox3D<T>where
T: PartialOrd + Copy,
pub fn merge(&self, other: &BBox3D<T>) -> BBox3D<T>where
T: PartialOrd + Copy,
Merges another bounding box with this one
Sourcepub fn merge_in_place(&mut self, other: &BBox3D<T>)where
T: PartialOrd + Copy,
pub fn merge_in_place(&mut self, other: &BBox3D<T>)where
T: PartialOrd + Copy,
Merges in place another bounding box with this one
Source§impl BBox3D
impl BBox3D
Sourcepub fn from_point<M>(point: &VectorPoint<M>) -> BBox3Dwhere
M: Clone,
pub fn from_point<M>(point: &VectorPoint<M>) -> BBox3Dwhere
M: Clone,
Creates a new BBox3D from a point
Sourcepub fn from_linestring<M>(line: &Vec<VectorPoint<M>>) -> BBox3Dwhere
M: Clone,
pub fn from_linestring<M>(line: &Vec<VectorPoint<M>>) -> BBox3Dwhere
M: Clone,
Creates a new BBox from a linestring
Sourcepub fn from_multi_linestring<M>(lines: &Vec<Vec<VectorPoint<M>>>) -> BBox3Dwhere
M: Clone,
pub fn from_multi_linestring<M>(lines: &Vec<Vec<VectorPoint<M>>>) -> BBox3Dwhere
M: Clone,
Creates a new BBox from a multi-linestring
Sourcepub fn from_polygon<M>(polygon: &Vec<Vec<VectorPoint<M>>>) -> BBox3Dwhere
M: Clone,
pub fn from_polygon<M>(polygon: &Vec<Vec<VectorPoint<M>>>) -> BBox3Dwhere
M: Clone,
Creates a new BBox from a polygon
Sourcepub fn from_multi_polygon<M>(polygons: &Vec<Vec<Vec<VectorPoint<M>>>>) -> BBox3Dwhere
M: Clone,
pub fn from_multi_polygon<M>(polygons: &Vec<Vec<Vec<VectorPoint<M>>>>) -> BBox3Dwhere
M: Clone,
Creates a new BBox from a multi-polygon
Sourcepub fn extend_from_point<M>(&mut self, point: &VectorPoint<M>)where
M: Clone,
pub fn extend_from_point<M>(&mut self, point: &VectorPoint<M>)where
M: Clone,
Extends the bounding box with a point