Package net.glowstone.entity.physics
Class EntityBoundingBox
java.lang.Object
net.glowstone.entity.physics.BoundingBox
net.glowstone.entity.physics.EntityBoundingBox
- All Implemented Interfaces:
Cloneable
A BoundingBox which changes position over time as an entity moves.
-
Field Summary
Fields inherited from class net.glowstone.entity.physics.BoundingBox
maxCorner, minCorner
-
Constructor Summary
ConstructorsConstructorDescriptionEntityBoundingBox
(double horizSize, double vertSize) EntityBoundingBox
(double width, double vertSize, double depth) Creates an instance with the given size. -
Method Summary
Methods inherited from class net.glowstone.entity.physics.BoundingBox
copyOf, fromCorners, fromPositionAndSize, intersects, intersects
-
Constructor Details
-
EntityBoundingBox
public EntityBoundingBox(double horizSize, double vertSize) -
EntityBoundingBox
public EntityBoundingBox(double width, double vertSize, double depth) Creates an instance with the given size.- Parameters:
width
- the size on the X axisvertSize
- the size on the Y axisdepth
- the size on the Z axis
-
-
Method Details
-
getSize
public org.bukkit.util.Vector getSize()Description copied from class:BoundingBox
Returns the displacement of the maximum corner from the minimum corner.- Overrides:
getSize
in classBoundingBox
- Returns:
- the displacement of the maximum corner from the minimum corner
-
setCenter
public void setCenter(double x, double y, double z) Moves this box so that its center is the given point.- Parameters:
x
- the center X coordinatey
- the center Y coordinatez
- the center Z coordinate
-