cc.funkemunky.api.utils

## Class BoundingBox

- java.lang.Object
- - cc.funkemunky.api.utils.BoundingBox

    public class BoundingBox
    extends java.lang.Object

### Field Summary

Fields
`float` `maxX`
`float` `maxY`
`float` `maxZ`
`float` `minX`
`float` `minY`
`float` `minZ`

### Constructor Summary

Constructors
Constructor and Description
`BoundingBox(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)`
`BoundingBox(org.bukkit.util.Vector min, org.bukkit.util.Vector max)`

### Method Summary

All Methods Instance Methods Concrete Methods
`BoundingBox` `add(float x, float y, float z)`
`BoundingBox` `add(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)`
`BoundingBox` `add(org.bukkit.util.Vector vector)`
`BoundingBox` `addCoord(float x, float y, float z)`
`double` `calculateXOffset(BoundingBox other, double offsetX)` if instance and the argument bounding boxes overlap in the Y and Z dimensions, calculate the offset between them in the X dimension.
`double` `calculateYOffset(BoundingBox other, double offsetY)` if instance and the argument bounding boxes overlap in the X and Z dimensions, calculate the offset between them in the Y dimension.
`double` `calculateZOffset(BoundingBox other, double offsetZ)` if instance and the argument bounding boxes overlap in the Y and X dimensions, calculate the offset between them in the Z dimension.
`boolean` `collides(java.lang.Object other)`
`boolean` `collides(org.bukkit.util.Vector vector)`
`boolean` `collidesHorizontally(java.lang.Object other)`
`boolean` `collidesHorizontally(org.bukkit.util.Vector vector)`
`boolean` `collidesVertically(java.lang.Object other)`
`boolean` `collidesVertically(org.bukkit.util.Vector vector)`
`java.util.List<org.bukkit.block.Block>` `getAllBlocks(org.bukkit.entity.Player player)`
`java.util.List<BoundingBox>` `getCollidingBlockBoxes(org.bukkit.entity.Player player)`
`java.util.List<org.bukkit.block.Block>` `getCollidingBlocks(org.bukkit.entity.Player player)`
`org.bukkit.util.Vector` `getMaximum()`
`org.bukkit.util.Vector` `getMinimum()`
`BoundingBox` `grow(float x, float y, float z)`
`boolean` `inBlock(org.bukkit.entity.Player player)`
`boolean` `intersectsWithBox(java.lang.Object other)`
`boolean` `intersectsWithBox(org.bukkit.util.Vector vector)`
`BoundingBox` `shrink(float x, float y, float z)`
`BoundingBox` `subtract(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)`
`java.lang.Object` `toAxisAlignedBB()`
`java.lang.String` `toString()`

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

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

### Field Detail

#### minX

    public float minX

#### minY

    public float minY

#### minZ

    public float minZ

#### maxX

    public float maxX

#### maxY

    public float maxY

#### maxZ

    public float maxZ

### Constructor Detail

#### BoundingBox

    public BoundingBox(float minX,
                       float minY,
                       float minZ,
                       float maxX,
                       float maxY,
                       float maxZ)

#### BoundingBox

    public BoundingBox(org.bukkit.util.Vector min,
                       org.bukkit.util.Vector max)

### Method Detail

#### add

    public BoundingBox add(float x,
                           float y,
                           float z)

#### add

    public BoundingBox add(org.bukkit.util.Vector vector)

#### grow

    public BoundingBox grow(float x,
                            float y,
                            float z)

#### shrink

    public BoundingBox shrink(float x,
                              float y,
                              float z)

#### add

    public BoundingBox add(float minX,
                           float minY,
                           float minZ,
                           float maxX,
                           float maxY,
                           float maxZ)

#### subtract

    public BoundingBox subtract(float minX,
                                float minY,
                                float minZ,
                                float maxX,
                                float maxY,
                                float maxZ)

#### intersectsWithBox

    public boolean intersectsWithBox(org.bukkit.util.Vector vector)

#### getCollidingBlockBoxes

    public java.util.List<BoundingBox> getCollidingBlockBoxes(org.bukkit.entity.Player player)

#### getMinimum

    public org.bukkit.util.Vector getMinimum()

#### getMaximum

    public org.bukkit.util.Vector getMaximum()

#### getCollidingBlocks

    public java.util.List<org.bukkit.block.Block> getCollidingBlocks(org.bukkit.entity.Player player)

#### getAllBlocks

    public java.util.List<org.bukkit.block.Block> getAllBlocks(org.bukkit.entity.Player player)

#### inBlock

    public boolean inBlock(org.bukkit.entity.Player player)

#### intersectsWithBox

    public boolean intersectsWithBox(java.lang.Object other)

#### collides

    public boolean collides(org.bukkit.util.Vector vector)

#### collides

    public boolean collides(java.lang.Object other)

#### collidesHorizontally

    public boolean collidesHorizontally(org.bukkit.util.Vector vector)

#### collidesHorizontally

    public boolean collidesHorizontally(java.lang.Object other)

#### collidesVertically

    public boolean collidesVertically(org.bukkit.util.Vector vector)

#### collidesVertically

    public boolean collidesVertically(java.lang.Object other)

#### calculateXOffset

    public double calculateXOffset(BoundingBox other,
                                   double offsetX)

if instance and the argument bounding boxes overlap in the Y and Z dimensions, calculate the offset between them in the X dimension. return var2 if the bounding boxes do not overlap or if var2 is closer to 0 then the calculated offset. Otherwise return the calculated offset.

#### calculateYOffset

    public double calculateYOffset(BoundingBox other,
                                   double offsetY)

if instance and the argument bounding boxes overlap in the X and Z dimensions, calculate the offset between them in the Y dimension. return var2 if the bounding boxes do not overlap or if var2 is closer to 0 then the calculated offset. Otherwise return the calculated offset.

#### calculateZOffset

    public double calculateZOffset(BoundingBox other,
                                   double offsetZ)

if instance and the argument bounding boxes overlap in the Y and X dimensions, calculate the offset between them in the Z dimension. return var2 if the bounding boxes do not overlap or if var2 is closer to 0 then the calculated offset. Otherwise return the calculated offset.

#### addCoord

    public BoundingBox addCoord(float x,
                                float y,
                                float z)

#### toAxisAlignedBB

    public java.lang.Object toAxisAlignedBB()

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`