pub struct BaseSampler {
pub samples_per_pixel: u32,
pub current_pixel: Point2i,
pub current_pixel_sample_index: u32,
pub samples1d_array_sizes: Vec<u32>,
pub samples2d_array_sizes: Vec<u32>,
pub sample_array1d: Vec<Vec<Float>>,
pub sample_array2d: Vec<Vec<Point2f>>,
pub array1d_offset: u64,
pub array2d_offset: u64,
}Fields§
§samples_per_pixel: u32§current_pixel: Point2i§current_pixel_sample_index: u32§samples1d_array_sizes: Vec<u32>§samples2d_array_sizes: Vec<u32>§sample_array1d: Vec<Vec<Float>>§sample_array2d: Vec<Vec<Point2f>>§array1d_offset: u64§array2d_offset: u64Implementations§
Source§impl BaseSampler
impl BaseSampler
pub fn new(samples_per_pixel: u32) -> Self
pub fn request_1d_array(&mut self, n: u32)
pub fn request_2d_array(&mut self, n: u32)
pub fn get_1d_array(&mut self, n: u32) -> Option<Vec<Float>>
pub fn get_2d_array(&mut self, n: u32) -> Option<Vec<Vector2f>>
pub fn start_pixel(&mut self, p: &Point2i)
pub fn start_next_sample(&mut self) -> bool
pub fn set_sample_number(&mut self, sample_num: u32) -> bool
pub fn get_samples_per_pixel(&self) -> u32
Trait Implementations§
Source§impl Clone for BaseSampler
impl Clone for BaseSampler
Source§fn clone(&self) -> BaseSampler
fn clone(&self) -> BaseSampler
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 BaseSampler
impl Debug for BaseSampler
Source§impl Default for BaseSampler
impl Default for BaseSampler
Source§fn default() -> BaseSampler
fn default() -> BaseSampler
Returns the “default value” for a type. Read more
Source§impl PartialEq for BaseSampler
impl PartialEq for BaseSampler
impl StructuralPartialEq for BaseSampler
Auto Trait Implementations§
impl Freeze for BaseSampler
impl RefUnwindSafe for BaseSampler
impl Send for BaseSampler
impl Sync for BaseSampler
impl Unpin for BaseSampler
impl UnwindSafe for BaseSampler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().