Package icyllis.arc3d.core

# Class RectanglePacker.BinaryTree

java.lang.Object
icyllis.arc3d.core.RectanglePacker
icyllis.arc3d.core.RectanglePacker.BinaryTree

Enclosing class:
  `RectanglePacker`

public static final class RectanglePacker.BinaryTree extends RectanglePacker

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class icyllis.arc3d.core.RectanglePacker

  `RectanglePacker.BinaryTree, RectanglePacker.Horizon, RectanglePacker.HorizonOld, RectanglePacker.Power2Line, RectanglePacker.Skyline`

- ## Field Summary

  ### Fields inherited from class icyllis.arc3d.core.RectanglePacker

  `ALGORITHM_BINARY_TREE, ALGORITHM_HORIZON, ALGORITHM_HORIZON_OLD, ALGORITHM_POWER2_LINE, ALGORITHM_SKYLINE, ALGORITHM_SKYLINE_NEW, mArea, mHeight, mWidth`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BinaryTree(int width, int height)`
  Constructor assumes both width and height > 0 invalid input: '&'invalid input: '&' invalid input: '<'= 32767.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `addRect(Rect2i rect)`
  Decides upon an (x, y) position for the given rectangle (leaving its width and height unchanged).
  `void`
  `clear()`
  Clears all the tracked data.

  ### Methods inherited from class icyllis.arc3d.core.RectanglePacker

  `free, getCoverage, getHeight, getWidth, make, make`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BinaryTree

    public BinaryTree(int width, int height)
    Constructor assumes both width and height > 0 invalid input: '&'invalid input: '&' invalid input: '<'= 32767.
    Parameters:
      `width` - the max width
      `height` - the max height

- ## Method Details

  - ### clear

    public void clear()
    Description copied from class: `RectanglePacker`
    Clears all the tracked data.
    Specified by:
      `clear` in class `RectanglePacker`

  - ### addRect

    public boolean addRect(Rect2i rect)
    Description copied from class: `RectanglePacker`
    Decides upon an (x, y) position for the given rectangle (leaving its width and height unchanged).
    Specified by:
      `addRect` in class `RectanglePacker`
    Returns:
      true on success; false on failure