### SortedBin::new Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/sortedbin/struct.SortedBin.html Creates a new instance of SortedBin with the specified bin, placed items, and removed items. ```APIDOC ## pub fn new(bin: Bin, items: Vec, removed_items: Vec) -> Self ### Description Creates a new SortedBin instance containing the provided bin, a list of placed items, and a list of removed items. ### Parameters - **bin** (Bin) - The bin container. - **items** (Vec) - A list of items currently placed in the bin. - **removed_items** (Vec) - A list of items that have been removed from the bin. ``` -------------------------------- ### SpaceLeftBin::new Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/bin/struct.SpaceLeftBin.html Creates a new instance of SpaceLeftBin. ```APIDOC ## pub const fn new(input: u32) -> Self ### Description Default constructor for the SpaceLeftBin struct. ### Parameters - **input** (u32) - The value representing the bin space. ### Returns - **Self** - A new instance of SpaceLeftBin. ``` -------------------------------- ### AABBVersion1::new Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/aabb/struct.AABBVersion1.html Creates a new instance of the AABB collision checker. ```APIDOC ## pub fn new(length: usize) -> Self ### Description Creates a new AABB Checker instance with the specified length. ### Parameters - **length** (usize) - Required - The length parameter for the checker. ``` -------------------------------- ### Vector3u32::new Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/vector/struct.Vector3u32.html Creates a new instance of Vector3u32 with the specified x, y, and z coordinates. ```APIDOC ## pub fn new(x: u32, y: u32, z: u32) -> Vector3u32 ### Description Creates a new 3D vector with the provided unsigned 32-bit integer coordinates. ### Parameters - **x** (u32) - The x-coordinate. - **y** (u32) - The y-coordinate. - **z** (u32) - The z-coordinate. ``` -------------------------------- ### Algorithmen3DBinPackaging Trait Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/algorithmen/trait.Algorithmen3DBinPackaging.html The core trait definition outlining the required methods for 3D bin packing implementations. ```rust pub trait Algorithmen3DBinPackaging where Self: Sized, { // Required methods fn create_algorithmen( input: Vec, bin: Bin, ) -> Result; fn add_item(&mut self, input: Vec) -> Result<(), AlgorithmenError>; fn remove_item(&mut self, input: Vec) -> Result<(), Vec>; fn space_left(&self) -> u32; fn check_fit_quick(input: &[Item], bin: &Bin) -> (bool, SpaceLeftBin); fn calculate(self) -> Result; fn calculate_custom( self, custom_score_function: Option, ) -> Result where F: Fn(&Bin, &Item, &Corners) -> f32 + Send + Sync; } ``` -------------------------------- ### Bin Struct Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/bin/struct.Bin.html The primary structure representing a bin, including its identifier, spatial position, and weight capacity. ```rust pub struct Bin { pub id: i32, pub position: Vector3, pub max_weight: u32, pub weight_currently: u32, } ``` -------------------------------- ### SecondAlgorithmen Struct Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/second_algorithmen/struct.SecondAlgorithmen.html The primary structure definition for the SecondAlgorithmen algorithm implementation. ```rust pub struct SecondAlgorithmen { /* private fields */ } ``` -------------------------------- ### SortedBin Struct Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/sortedbin/struct.SortedBin.html The structure definition for SortedBin, containing the bin, placed items, and removed items. ```rust pub struct SortedBin { pub bin: Bin, pub items: Vec, pub removed_items: Vec, } ``` -------------------------------- ### AABBVersion1::add Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/aabb/struct.AABBVersion1.html Adds a new item to the collision checker. ```APIDOC ## pub fn add(&mut self, item: AABBVersion1CheckedItem, corner: &Corners) -> Result<()> ### Description Adds a new value to the AABB checker. ### Parameters - **item** (AABBVersion1CheckedItem) - Required - The item to add. - **corner** (&Corners) - Required - The corner coordinates for the item. ``` -------------------------------- ### AABBVersion1 Struct Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/aabb/struct.AABBVersion1.html The internal structure definition for the AABBVersion1 collision checker. ```rust pub struct AABBVersion1 { /* private fields */ } ``` -------------------------------- ### Item Struct Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/items/struct.Item.html The primary data structure representing an item with its physical properties. ```rust pub struct Item { pub id: i32, pub size_cube: Vector3, pub weight: u32, pub order: u32, } ``` -------------------------------- ### AABBVersion1::point_is_free Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/aabb/struct.AABBVersion1.html Checks if a specific point is valid. ```APIDOC ## pub fn point_is_free(&self, p: &Corners) -> bool ### Description Checks if a point is valid within the collision checker. ### Parameters - **p** (&Corners) - Required - The point to check. ``` -------------------------------- ### Define Corners struct Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/corners/struct.Corners.html The structure definition for Corners, containing a 3D vector position. ```rust pub struct Corners { pub position: Vector3, } ``` -------------------------------- ### Vector3u32::divide_all Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/vector/struct.Vector3u32.html Divides all components of the vector by a specified value. ```APIDOC ## pub fn divide_all(&mut self, d: u32) ### Description Divides the x, y, and z components of the vector by the provided divisor `d` in-place. ### Parameters - **d** (u32) - The divisor value. ``` -------------------------------- ### AABBVersion1::add_v2 Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/aabb/struct.AABBVersion1.html Adds a new item to the collision checker using the version 2 implementation. ```APIDOC ## pub fn add_v2(&mut self, item: AABBVersion1CheckedItem, corner: &Corners) -> Result<()> ### Description Version 2 of the add method for the AABB checker. ### Parameters - **item** (AABBVersion1CheckedItem) - Required - The item to add. - **corner** (&Corners) - Required - The corner coordinates for the item. ``` -------------------------------- ### Vector3u32 Coordinate Accessors Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/vector/struct.Vector3u32.html Methods to retrieve the x, y, and z components of the vector. ```APIDOC ## pub fn x(&self) -> u32 ## pub fn y(&self) -> u32 ## pub fn z(&self) -> u32 ### Description Retrieves the respective coordinate value from the vector instance. ``` -------------------------------- ### SpaceLeftBin Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/bin/struct.SpaceLeftBin.html The primary definition of the SpaceLeftBin struct as a tuple struct containing a u32. ```rust pub struct SpaceLeftBin(pub u32); ``` -------------------------------- ### ItemsPlaced Struct Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/items/struct.ItemsPlaced.html The structure definition for ItemsPlaced, containing the position and the item. ```rust pub struct ItemsPlaced { pub position: Vector3, pub item: Item, } ``` -------------------------------- ### AABBVersion1::check_item Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/aabb/struct.AABBVersion1.html Checks if an item collides with existing items. ```APIDOC ## pub fn check_item(&self, item: Item, corner: &Corners) -> Option ### Description Checks if an item causes a collision or not. ### Parameters - **item** (Item) - Required - The item to check. - **corner** (&Corners) - Required - The corner coordinates for the item. ``` -------------------------------- ### AABBVersion1::check_item_v2 Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/aabb/struct.AABBVersion1.html Checks if an item collides using the version 2 implementation. ```APIDOC ## pub fn check_item_v2(&self, item: Item, corner: &Corners) -> Option ### Description Version 2 of the check_item method. ### Parameters - **item** (Item) - Required - The item to check. - **corner** (&Corners) - Required - The corner coordinates for the item. ``` -------------------------------- ### Define Vector3 Struct Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/vector/struct.Vector3.html The structure definition for Vector3, requiring generic type T to implement several traits including Serialize, Num, and Copy. ```rust pub struct Vector3 where T: Serialize + PartialEq + PartialOrd + Send + Sync + Num + PrimInt + DivAssign + Div + Copy, { pub x: T, pub y: T, pub z: T, } ``` -------------------------------- ### Define Vector6 Struct Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/vector/struct.Vector6.html The structure definition for a 6-dimensional vector requiring specific trait bounds on the generic type T. ```rust pub struct Vector6 where T: Serialize + PartialEq + PartialOrd + PrimInt + DivAssign + Div + Copy, { pub x: T, pub y: T, pub z: T, pub w: T, pub a: T, pub b: T, } ``` -------------------------------- ### AlgorithmenError Enum Definition Source: https://docs.rs/binpack-3d/0.1.0/binpack_3d/algorithmen/enum.AlgorithmenError.html The core enum structure defining the possible error states during algorithm execution. ```rust pub enum AlgorithmenError { NotEnoughSpace, NoElementLeft, ItemToBigForBin, } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.