Class BoundingBoxEnclosed

Object
BoundingBoxEnclosed

public class BoundingBoxEnclosed extends Object
Describes a BoundingBox that is optionally enclosed by a larger containing BoundingBox to given padding.

No checks currently occur that enclosing fully contains box.

Author:
Owen Feehan
  • Constructor Details

    • BoundingBoxEnclosed

      public BoundingBoxEnclosed(BoundingBox box)
      Create with a box that has no padding.

      i.e. this box is enclosed by itself.

      Parameters:
      box - the box.
    • BoundingBoxEnclosed

      public BoundingBoxEnclosed(BoundingBox box, BoundingBox enclosing)
      Creates a new BoundingBoxEnclosed instance.
      Parameters:
      box - The BoundingBox in which the image should be placed. This excludes padding.
      enclosing - An enclosing box (equal to or larger than box covering all screen-space used for this entity, including padding.

      This should be identical to box if there is no padding.

  • Method Details

    • getBox

      public BoundingBox getBox()
      The BoundingBox in which the image should be placed. This excludes padding.
    • getEnclosing

      public BoundingBox getEnclosing()
      An enclosing box (equal to or larger than box covering all screen-space used for this entity, including padding.

      This should be identical to box if there is no padding.