[−][src]Struct psyche_utils::grid::GridSamplerDistance
Grid sampler that uses field distance to center and maximum range - each field is scaled by weight produced from that distance-in-range equation.
Note
Weight component of sampling result equals sum of weights of each sampled fields.
Example
use psyche_utils::grid::{Grid, GridSamplerDistance}; let grid = Grid::new(2, 2, 1.0); let sampler = GridSamplerDistance::new((0.0, 0.0), 1.0, (1.0, 1.0)); assert_eq!(grid.sample(sampler).unwrap(), (1.0, 1.0));
Fields
center: (Scalar, Scalar)
XY scalar position of sampler center.
range: Scalar
Range of sampling.
cell_size: (Scalar, Scalar)
Scale mapping between grid cell and world cell.
Methods
impl GridSamplerDistance
[src]
Trait Implementations
impl<T> GridSampler<T, f64> for GridSamplerDistance where
T: GridSampleZeroValue<T> + Add<Output = T> + Clone + Mul<Scalar, Output = T>,
[src]
T: GridSampleZeroValue<T> + Add<Output = T> + Clone + Mul<Scalar, Output = T>,
impl PartialEq<GridSamplerDistance> for GridSamplerDistance
[src]
fn eq(&self, other: &GridSamplerDistance) -> bool
[src]
fn ne(&self, other: &GridSamplerDistance) -> bool
[src]
impl Clone for GridSamplerDistance
[src]
fn clone(&self) -> GridSamplerDistance
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for GridSamplerDistance
[src]
Auto Trait Implementations
impl Send for GridSamplerDistance
impl Sync for GridSamplerDistance
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,