Struct circle_packer::CircleSortedPacker
source · pub struct CircleSortedPacker { /* private fields */ }
Expand description
Sorts the radii for you for better results. This is sorted, so it isn’t stable (the order changes). The packing can change drastically depending on the relative size of the provided radii. Sorting the radii like this tends to produce a more efficient packing.
Implementations§
source§impl CircleSortedPacker
impl CircleSortedPacker
sourcepub fn circles(&self) -> Vec<Circle>
pub fn circles(&self) -> Vec<Circle>
This makes a packer, then packs all the radii provided so far in descending order. It returns the circles back in the provided order.
sourcepub fn circles_in(&self, embedding_circle: &Circle) -> Vec<Circle>
pub fn circles_in(&self, embedding_circle: &Circle) -> Vec<Circle>
Same thing as the circles
method, but embeds it in the provided circle.
Trait Implementations§
source§impl Clone for CircleSortedPacker
impl Clone for CircleSortedPacker
source§fn clone(&self) -> CircleSortedPacker
fn clone(&self) -> CircleSortedPacker
Returns a copy 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 CircleSortedPacker
impl Debug for CircleSortedPacker
source§impl Default for CircleSortedPacker
impl Default for CircleSortedPacker
source§fn default() -> CircleSortedPacker
fn default() -> CircleSortedPacker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CircleSortedPacker
impl Send for CircleSortedPacker
impl Sync for CircleSortedPacker
impl Unpin for CircleSortedPacker
impl UnwindSafe for CircleSortedPacker
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