pub struct PackerInstance {
pub do_rotations: bool,
pub minimize: Minimize,
/* private fields */
}Expand description
§Example
let mut my_instance = PackerInstance::new(
&mut my_boxes, // Our boxes
Vector3D::<u64>::new(500, 0, 500), // Our container size
true, // Allow rotations
(false, true, false), // Minimize height only
&Sorting::descending_volume // Our initial sorting heuristic
);Fields§
§do_rotations: bool§minimize: MinimizeImplementations§
Source§impl PackerInstance
impl PackerInstance
pub fn container_size(&self) -> Vector3D<u64>
pub fn boxes(&self) -> &Vec<Box3D>
pub fn holes(&self) -> &HashSetFnv<Box3D>
pub fn finished(&self) -> bool
pub fn next_box_id(&self) -> usize
pub fn next_hole_id(&self) -> usize
Trait Implementations§
Source§impl Clone for PackerInstance
impl Clone for PackerInstance
Source§fn clone(&self) -> PackerInstance
fn clone(&self) -> PackerInstance
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 PackerInstance
impl Debug for PackerInstance
Source§impl Default for PackerInstance
impl Default for PackerInstance
Source§fn default() -> PackerInstance
fn default() -> PackerInstance
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PackerInstance
impl RefUnwindSafe for PackerInstance
impl Send for PackerInstance
impl Sync for PackerInstance
impl Unpin for PackerInstance
impl UnwindSafe for PackerInstance
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