pub struct MaxRects {
pub heuristic: MaxRectsHeuristic,
}Expand description
MaxRects rectangle bin-packing algorithm.
Maintains a list of maximal free rectangles. For each sprite the algorithm scores every free rect under the configured heuristic, places the sprite in the best-scoring position, then splits and prunes the free-rect list to maintain the invariant that no free rect overlaps any placed sprite.
ContactPointRule falls back to BestAreaFit scoring until the full contact
computation is implemented in Phase 2.
Fields§
§heuristic: MaxRectsHeuristicPlacement scoring heuristic (default: BestShortSideFit).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MaxRects
impl RefUnwindSafe for MaxRects
impl Send for MaxRects
impl Sync for MaxRects
impl Unpin for MaxRects
impl UnsafeUnpin for MaxRects
impl UnwindSafe for MaxRects
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> 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