pub struct TerrainElevationTexture {
pub width: u32,
pub height: u32,
pub min_elev: f32,
pub max_elev: f32,
pub data: Arc<Vec<f32>>,
}Expand description
GPU-sampleable elevation texture payload for a terrain tile.
Fields§
§width: u32Width of the elevation texture in texels.
height: u32Height of the elevation texture in texels.
min_elev: f32Minimum elevation in meters.
max_elev: f32Maximum elevation in meters.
data: Arc<Vec<f32>>Elevation samples in meters, row-major, matching ElevationGrid.
Wrapped in Arc so that cloning terrain descriptors (e.g. for
the frame-key cache in TerrainManager) is a cheap reference-count
bump instead of a ~260 KB memcpy per tile.
Trait Implementations§
Source§impl Clone for TerrainElevationTexture
impl Clone for TerrainElevationTexture
Source§fn clone(&self) -> TerrainElevationTexture
fn clone(&self) -> TerrainElevationTexture
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for TerrainElevationTexture
impl RefUnwindSafe for TerrainElevationTexture
impl Send for TerrainElevationTexture
impl Sync for TerrainElevationTexture
impl Unpin for TerrainElevationTexture
impl UnsafeUnpin for TerrainElevationTexture
impl UnwindSafe for TerrainElevationTexture
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