Class StructureBoundingBox
java.lang.Object
net.glowstone.generator.structures.util.StructureBoundingBox
-
Constructor Summary
ConstructorsConstructorDescriptionStructureBoundingBox(org.bukkit.util.Vector min, org.bukkit.util.Vector max) -
Method Summary
Modifier and TypeMethodDescriptionvoidexpandTo(StructureBoundingBox boundingBox) Changes this bounding box to the bounding box of the union of itself and another bounding box.org.bukkit.util.VectorgetMax()org.bukkit.util.VectorgetMin()booleanintersectsWith(int minX, int minZ, int maxX, int maxZ) Whether this box intersects the given vertically-infinite box.booleanintersectsWith(StructureBoundingBox boundingBox) Whether this box intersects the given box.booleanisVectorInside(org.bukkit.util.Vector vec) Checks whether the given point is inside a block that intersects this box.voidoffset(org.bukkit.util.Vector offset)
-
Constructor Details
-
StructureBoundingBox
public StructureBoundingBox(org.bukkit.util.Vector min, org.bukkit.util.Vector max)
-
-
Method Details
-
isVectorInside
public boolean isVectorInside(org.bukkit.util.Vector vec) Checks whether the given point is inside a block that intersects this box.- Parameters:
vec- the point to check- Returns:
- true if this box intersects the block containing
vec
-
intersectsWith
Whether this box intersects the given box.- Parameters:
boundingBox- the box to check intersection with- Returns:
- true if the given box intersects this box; false otherwise
-
intersectsWith
public boolean intersectsWith(int minX, int minZ, int maxX, int maxZ) Whether this box intersects the given vertically-infinite box.- Parameters:
minX- the minimum X coordinateminZ- the minimum Z coordinatemaxX- the maximum X coordinatemaxZ- the maximum Z coordinate- Returns:
- true if the given box intersects this box; false otherwise
-
expandTo
Changes this bounding box to the bounding box of the union of itself and another bounding box.- Parameters:
boundingBox- the other bounding box to contain
-
offset
public void offset(org.bukkit.util.Vector offset) -
getMin
public org.bukkit.util.Vector getMin() -
getMax
public org.bukkit.util.Vector getMax()
-