pub struct QuantizedMeshHeader {
pub center: [f64; 3],
pub min_height: f32,
pub max_height: f32,
pub bounding_sphere_center: [f64; 3],
pub bounding_sphere_radius: f64,
pub horizon_occlusion_point: [f64; 3],
}Expand description
Quantized mesh header (88 bytes).
All coordinates are in Earth-Centered Earth-Fixed (ECEF) frame.
Fields§
§center: [f64; 3]Center of the tile in ECEF coordinates (meters)
min_height: f32Minimum height in the tile (meters)
max_height: f32Maximum height in the tile (meters)
bounding_sphere_center: [f64; 3]Bounding sphere center in ECEF coordinates (meters)
bounding_sphere_radius: f64Bounding sphere radius (meters)
horizon_occlusion_point: [f64; 3]Horizon occlusion point in ellipsoid-scaled ECEF coordinates
Implementations§
Source§impl QuantizedMeshHeader
impl QuantizedMeshHeader
Sourcepub fn from_bounds(
bounds: &TileBounds,
min_height: f32,
max_height: f32,
) -> Self
pub fn from_bounds( bounds: &TileBounds, min_height: f32, max_height: f32, ) -> Self
Create a header from tile bounds and height range.
Computes ECEF coordinates, bounding sphere, and horizon occlusion point.
Falls back to corner+edge sample points for the horizon occlusion — callers
that have the actual mesh vertices should prefer from_bounds_with_vertices
for tighter occlusion.
Sourcepub fn from_bounds_with_vertices(
bounds: &TileBounds,
min_height: f32,
max_height: f32,
vertices_geodetic: &[(f64, f64, f64)],
) -> Self
pub fn from_bounds_with_vertices( bounds: &TileBounds, min_height: f32, max_height: f32, vertices_geodetic: &[(f64, f64, f64)], ) -> Self
Like from_bounds, but uses the supplied mesh vertices (geodetic
(lon, lat, height)) to compute a tighter horizon occlusion point via
the Cesium EllipsoidalOccluder algorithm.
Sourcepub fn from_bytes(bytes: &[u8]) -> Option<Self>
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Deserialize header from bytes.
Trait Implementations§
Source§impl Clone for QuantizedMeshHeader
impl Clone for QuantizedMeshHeader
Source§fn clone(&self) -> QuantizedMeshHeader
fn clone(&self) -> QuantizedMeshHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more