pub struct Params { /* private fields */ }
Expand description
Julia set rendering parameters.
The parameters are:
- Image dimensions (in pixels)
- View dimensions and view center determining the rendered area. (Only the view height is specified explicitly; the width is inferred from the height and the image dimension ratio.)
- Infinity distance
- Upper bound on the iteration count
See the Julia set theory for more details regarding these parameters.
Implementations§
source§impl Params
impl Params
sourcepub fn new(image_dimensions: [u32; 2], view_height: f32) -> Self
pub fn new(image_dimensions: [u32; 2], view_height: f32) -> Self
Creates a new set of params with the specified image_dimensions
and the view_height
of the rendered area.
The remaining parameters are set as follows:
- The width of the rendered area is inferred from these params.
- The view is centered at
0
. - The infinity distance is set at
3
.
§Panics
Panics if any of the following conditions do not hold:
image_dimensions
are positiveview_height
is positive
sourcepub fn with_view_center(self, view_center: [f32; 2]) -> Self
pub fn with_view_center(self, view_center: [f32; 2]) -> Self
Sets the view center.
sourcepub fn with_infinity_distance(self, inf_distance: f32) -> Self
pub fn with_infinity_distance(self, inf_distance: f32) -> Self
sourcepub fn with_max_iterations(self, max_iterations: u8) -> Self
pub fn with_max_iterations(self, max_iterations: u8) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more