[][src]Struct tray_rust::sampler::Region

pub struct Region {
    pub current: (u32, u32),
    pub start: (u32, u32),
    pub end: (u32, u32),
    pub dim: (u32, u32),
}

Defines a region of the image being sampled in pixel coordinates

Fields

current: (u32, u32)

Current coordinates of the pixel to sample (x, y)

start: (u32, u32)

Coordinates of the start of region being sampled (x, y)

end: (u32, u32)

Coordinates of the end of the region being sampled (x, y)

dim: (u32, u32)

Dimensions of the region being sampled

Methods

impl Region[src]

pub fn new(start: (u32, u32), dim: (u32, u32)) -> Region[src]

Create a new region starting at start with dimension dim

pub fn select_region(&mut self, start: (u32, u32))[src]

Select a new region starting at region indices start with the same dimensions eg. with blocks of width 8 the 2nd region along x is at 16 so to get this block you'd set start.0 = 2

Trait Implementations

impl Clone for Region[src]

impl Copy for Region[src]

impl Debug for Region[src]

Auto Trait Implementations

impl Send for Region

impl Sync for Region

impl Unpin for Region

impl UnwindSafe for Region

impl RefUnwindSafe for Region

Blanket Implementations

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

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

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.

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

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

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

impl<T> SetParameter for T[src]