pub struct Container { /* private fields */ }Expand description
A container in which Item’s can be placed.
Implementations§
Source§impl Container
impl Container
pub fn new( original_outer: OriginalShape, quality_zones: Vec<InferiorQualityZone>, cde_config: CDEConfig, ) -> Result<Self>
Sourcepub fn area(&self) -> f32
pub fn area(&self) -> f32
Gross area of the original outer contour, without subtracting holes or quality zones.
Sourcepub fn outer_orig(&self) -> &Arc<OriginalShape>
pub fn outer_orig(&self) -> &Arc<OriginalShape>
Original contour of the container as defined in the input
Sourcepub fn outer_cd(&self) -> &Arc<SPolygon>
pub fn outer_cd(&self) -> &Arc<SPolygon>
Contour of the container to be used for collision detection
Sourcepub fn quality_zones(&self) -> &[Option<InferiorQualityZone>; 10]
pub fn quality_zones(&self) -> &[Option<InferiorQualityZone>; 10]
Zones of different qualities in the container, stored per quality.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin for Container
impl UnwindSafe for Container
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§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