pub struct GridScalarLayer {
pub grid: GeoGrid,
pub field: ScalarField2D,
pub ramp: ColorRamp,
/* private fields */
}Expand description
A flat georeferenced colour grid overlay.
Each grid cell is coloured by evaluating the ColorRamp at the
cell’s normalised ScalarField2D value.
This layer participates in the standard MapState::pick system:
a geographic pick query resolves to the grid cell via
GeoGrid::cell_at_geo and returns the cell index and scalar
value in the PickHit result.
Fields§
§grid: GeoGridGrid geometry.
field: ScalarField2DScalar field values.
ramp: ColorRampColour transfer function.
Implementations§
Trait Implementations§
Source§impl Clone for GridScalarLayer
impl Clone for GridScalarLayer
Source§fn clone(&self) -> GridScalarLayer
fn clone(&self) -> GridScalarLayer
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 moreSource§impl Debug for GridScalarLayer
impl Debug for GridScalarLayer
Source§impl Layer for GridScalarLayer
impl Layer for GridScalarLayer
Source§fn set_visible(&mut self, visible: bool)
fn set_visible(&mut self, visible: bool)
Toggle visibility on or off.
Source§fn set_opacity(&mut self, opacity: f32)
fn set_opacity(&mut self, opacity: f32)
Set the layer opacity. Read more
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Borrow the layer as
&mut dyn Any for mutable concrete type access.Auto Trait Implementations§
impl Freeze for GridScalarLayer
impl RefUnwindSafe for GridScalarLayer
impl Send for GridScalarLayer
impl Sync for GridScalarLayer
impl Unpin for GridScalarLayer
impl UnsafeUnpin for GridScalarLayer
impl UnwindSafe for GridScalarLayer
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