[][src]Struct oxygengine_procedural::Grid2d

pub struct Grid2d<T> { /* fields omitted */ }

Implementations

impl<T> Grid2d<T> where
    T: Clone + Send + Sync
[src]

pub fn new(cols: usize, rows: usize, fill: T) -> Grid2d<T>[src]

pub fn with_cells(cols: usize, cells: Vec<T>) -> Grid2d<T>[src]

pub fn resize(&mut self, cols: usize, rows: usize, default: T)[src]

pub fn cols(&self) -> usize[src]

pub fn rows(&self) -> usize[src]

pub fn size(&self) -> (usize, usize)[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn cells(&self) -> &[T][src]

pub fn cells_mut(&mut self) -> &mut [T][src]

pub fn cell(&self, col: usize, row: usize) -> Option<&T>[src]

pub fn cell_mut(&mut self, col: usize, row: usize) -> Option<&mut T>[src]

pub fn get(&self, col: usize, row: usize) -> Option<T>[src]

pub fn set(&mut self, col: usize, row: usize, value: T)[src]

pub fn get_col_cells(&self, index: usize) -> Option<Vec<T>>[src]

pub fn get_row_cells(&self, index: usize) -> Option<Vec<T>>[src]

pub fn copy_part(&self, range: Range<(usize, usize)>, result: &mut Grid2d<T>) where
    T: Default
[src]

pub fn get_part(&self, range: Range<(usize, usize)>) -> Grid2d<T>[src]

pub fn get_part_seamless(&self, range: Range<(usize, usize)>) -> Grid2d<T>[src]

pub fn get_view(&self, range: Range<(usize, usize)>) -> Grid2d<&T>[src]

pub fn get_view_seamless(&self, range: Range<(usize, usize)>) -> Grid2d<&T>[src]

pub fn copy_sample(&self, (usize, usize), margin: usize, result: &mut Grid2d<T>) where
    T: Default
[src]

pub fn sample(&self, (usize, usize), margin: usize) -> Grid2d<T>[src]

pub fn sample_seamless(&self, (usize, usize), margin: usize) -> Grid2d<T>[src]

pub fn view_sample(&self, (usize, usize), margin: usize) -> Grid2d<&T>[src]

pub fn view_sample_seamless(&self, (usize, usize), margin: usize) -> Grid2d<&T>[src]

pub fn map<F, R>(&self, f: F) -> Grid2d<R> where
    F: FnMut(usize, usize, &T) -> R,
    R: Clone + Send + Sync
[src]

pub fn with<F>(&mut self, f: F) where
    F: FnMut(usize, usize, &T) -> T, 
[src]

pub fn iter(&self) -> impl DoubleEndedIterator[src]

pub fn iter_mut(&mut self) -> impl DoubleEndedIterator[src]

pub fn iter_view(
    &self,
    range: Range<(usize, usize)>
) -> impl DoubleEndedIterator
[src]

pub fn iter_view_mut(
    &mut self,
    range: Range<(usize, usize)>
) -> impl DoubleEndedIterator
[src]

pub fn iter_sample(
    &'a self,
    range: Range<(usize, usize)>,
    margin: usize
) -> impl DoubleEndedIterator + 'a
[src]

pub fn neighbor_sample(&self, (usize, usize)) -> Grid2dNeighborSample<T> where
    T: Default + Copy
[src]

pub fn windows(&self, (usize, usize)) -> impl DoubleEndedIterator[src]

pub fn windows_seamless(&self, (usize, usize)) -> impl DoubleEndedIterator[src]

pub fn into_inner(self) -> (usize, usize, Vec<T>)[src]

pub fn from_view(view: &Grid2d<&T>) -> Grid2d<T>[src]

pub fn get_common_areas(
    first_size: (usize, usize),
    second_size: (usize, usize),
    second_offset: (usize, usize)
) -> Option<(Range<(usize, usize)>, Range<(usize, usize)>)>
[src]

pub fn access_decoupled(
    &'a self,
    read: &[(usize, usize)],
    write: &[(usize, usize)],
    reads: &mut [&'a T],
    writes: &mut [&'a mut T]
) -> Result<(), Grid2dError>
[src]

pub unsafe fn access_decoupled_unsafe(
    &'a self,
    read: &[(usize, usize)],
    write: &[(usize, usize)],
    reads: &mut [&'a T],
    writes: &mut [&'a mut T]
) -> Result<(), Grid2dError>
[src]

impl<T> Grid2d<T> where
    T: Clone + Send + Sync + PartialEq<T>, 
[src]

pub fn has_union_with(
    &self,
    other: &Grid2d<T>,
    offset_col: usize,
    offset_row: usize
) -> bool
[src]

Trait Implementations

impl<'_, T> Add<&'_ Grid2d<T>> for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Add<T, Output = T>, 
[src]

type Output = Result<Grid2d<T>, Grid2dError>

The resulting type after applying the + operator.

impl<T> Clone for Grid2d<T> where
    T: Clone
[src]

impl<T> Debug for Grid2d<T> where
    T: Debug
[src]

impl<T> Default for Grid2d<T> where
    T: Default
[src]

impl<'de, T> Deserialize<'de> for Grid2d<T> where
    T: Deserialize<'de>, 
[src]

impl<'_, T> Div<&'_ Grid2d<T>> for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Div<T, Output = T>, 
[src]

type Output = Result<Grid2d<T>, Grid2dError>

The resulting type after applying the / operator.

impl<I, T> From<(usize, I)> for Grid2d<T> where
    I: Iterator<Item = T>,
    T: Clone + Send + Sync
[src]

impl<T> Index<[usize; 2]> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

type Output = T

The returned type after indexing.

impl<T> Index<(usize, usize)> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<[usize; 2]> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

impl<T> IndexMut<(usize, usize)> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

impl<T> Into<(usize, usize, Vec<T>)> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

impl<T> Into<Vec<T>> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

impl<T> IntoIterator for Grid2d<T> where
    T: Clone + Send + Sync
[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?

impl<'_, T> Mul<&'_ Grid2d<T>> for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Mul<T, Output = T>, 
[src]

type Output = Result<Grid2d<T>, Grid2dError>

The resulting type after applying the * operator.

impl<'_, T> Neg for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Neg<Output = T>, 
[src]

type Output = Grid2d<T>

The resulting type after applying the - operator.

impl<T> PartialEq<Grid2d<T>> for Grid2d<T> where
    T: PartialEq<T>, 
[src]

impl<T> Serialize for Grid2d<T> where
    T: Serialize
[src]

impl<'_, T> Sub<&'_ Grid2d<T>> for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Sub<T, Output = T>, 
[src]

type Output = Result<Grid2d<T>, Grid2dError>

The resulting type after applying the - operator.

Auto Trait Implementations

impl<T> RefUnwindSafe for Grid2d<T> where
    T: RefUnwindSafe

impl<T> Send for Grid2d<T> where
    T: Send

impl<T> Sync for Grid2d<T> where
    T: Sync

impl<T> Unpin for Grid2d<T> where
    T: Unpin

impl<T> UnwindSafe for Grid2d<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.