[−][src]Struct spherical_blue_noise::BlueNoiseSphere
Points on sphere that forms blue noise.
The only way to get points is through iterator, created by calling into_iterator method:
BlueNoiseSphere::new(16, &mut rand::thread_rng()).into_iter()
Implementations
impl BlueNoiseSphere
[src]
pub fn new<R: Rng + ?Sized>(num_of_points: u32, rng: &mut R) -> Self
[src]
Creates new spherical blue noise from num_of_points
with default parameters.
pub fn new_with_params<R: Rng + ?Sized>(
rng: &mut R,
num_of_points: u32,
num_of_iterations: u16,
maximum_angular_displacement_threshold: f32,
angular_displacement_threshold_decay: f32
) -> Self
[src]
rng: &mut R,
num_of_points: u32,
num_of_iterations: u16,
maximum_angular_displacement_threshold: f32,
angular_displacement_threshold_decay: f32
) -> Self
Creates new spherical blue noise with passed parameters.
-
num_of_points
- The number of points that should lie on the sphere. -
num_of_iterations
- The number of iterations the algorithm makes before returning blue noise. More is slower and better. -
maximum_angular_displacement_threshold
- The "starting speed" of points to converge into blue noise. -
angular_displacement_threshold_decay
- The ratio that governs the decay of the starting speed. If the ratio is bigger, then the algorithm needs fewer iterations to converge, at the cost of more randomness in produced pattern. With bigger ratio, point may "vibrate" rather than converge into blue noise.
pub fn new_raw<R: Rng + ?Sized>(num_of_points: u32, rng: &mut R) -> Self
[src]
Returns new BlueNoiseSphere
with random points on the sphere, without passed any iteration of the algorithm, should then be called method advance
or advance_multiple
.
pub fn advance_multiple(
self,
num_of_iterations: u16,
maximum_angular_displacement_threshold: f32,
angular_displacement_threshold_decay: f32
) -> Self
[src]
self,
num_of_iterations: u16,
maximum_angular_displacement_threshold: f32,
angular_displacement_threshold_decay: f32
) -> Self
Calls num_of_iterations
times the advance
method on BlueNoiseSphere
. Each time the maximum_angular_displacement_threshold
is reduced by angular_displacement_threshold_decay
.
pub fn advance(&self, maximum_angular_displacement_threshold: f32) -> Self
[src]
Makes random points on sphere into blue noise. Takes maximum_angular_displacement_threshold
as displacement (in radians) of each point toward direction, in which the point is pushed away by other particles. Returns new BlueNoiseSphere
struct.
Trait Implementations
impl Clone for BlueNoiseSphere
[src]
pub fn clone(&self) -> BlueNoiseSphere
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl IntoIterator for BlueNoiseSphere
[src]
Auto Trait Implementations
impl RefUnwindSafe for BlueNoiseSphere
[src]
impl Send for BlueNoiseSphere
[src]
impl Sync for BlueNoiseSphere
[src]
impl Unpin for BlueNoiseSphere
[src]
impl UnwindSafe for BlueNoiseSphere
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,