Class AxisAlignedBB
java.lang.Object
ua.mcchickenstudio.opencreative.utils.millennium.math.AxisAlignedBB
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAxisAlignedBB(double x1, double y1, double z1, double x2, double y2, double z2) AxisAlignedBB(Vec3 location) -
Method Summary
Modifier and TypeMethodDescriptionaddCoord(double x, double y, double z) Adds the coordinates to the bounding box extending it if the point lies outside the current ranges.calculateIntercept(Vec3 p_72327_1_, Vec3 p_72327_2_) doublecalculateXOffset(AxisAlignedBB other, double p_72316_2_) if instance and the argument bounding boxes overlap in the Y and Z dimensions, calculate the offset between them in the X dimension.doublecalculateYOffset(AxisAlignedBB other, double p_72323_2_) if instance and the argument bounding boxes overlap in the X and Z dimensions, calculate the offset between them in the Y dimension.doublecalculateZOffset(AxisAlignedBB other, double p_72322_2_) if instance and the argument bounding boxes overlap in the Y and X dimensions, calculate the offset between them in the Z dimension.clone()contract(double x, double y, double z) Returns a bounding box that is inset by the specified amountsvoidexpand(double x, double y, double z) Returns a bounding box expanded by the specified vector (if negative numbers are given it will shrink).static AxisAlignedBBfromBounds(double p_178781_0_, double p_178781_2_, double p_178781_4_, double p_178781_6_, double p_178781_8_, double p_178781_10_) returns an AABB with corners x1, y1, z1 and x2, y2, z2doubleReturns the average length of the edges of the bounding box.doublebooleanintersectsWith(AxisAlignedBB other) Returns whether the given bounding box intersects with this one.booleanisVecInside(Vec3 vec) Returns if the supplied Vec3D is completely inside the bounding boxoffset(double x, double y, double z) Offsets the current bounding box by the specified coordinates.offsetAndUpdate(double par1, double par3, double par5) toString()union(AxisAlignedBB other)
-
Field Details
-
minX
public double minX -
minY
public double minY -
minZ
public double minZ -
maxX
public double maxX -
maxY
public double maxY -
maxZ
public double maxZ
-
-
Constructor Details
-
AxisAlignedBB
-
AxisAlignedBB
public AxisAlignedBB(double x1, double y1, double z1, double x2, double y2, double z2) -
AxisAlignedBB
-
-
Method Details
-
fromBounds
public static AxisAlignedBB fromBounds(double p_178781_0_, double p_178781_2_, double p_178781_4_, double p_178781_6_, double p_178781_8_, double p_178781_10_) returns an AABB with corners x1, y1, z1 and x2, y2, z2 -
addCoord
Adds the coordinates to the bounding box extending it if the point lies outside the current ranges. Args: x, y, z -
expand
Returns a bounding box expanded by the specified vector (if negative numbers are given it will shrink). Args: x, y, z -
union
-
offset
Offsets the current bounding box by the specified coordinates. Args: x, y, z -
calculateXOffset
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
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
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. -
intersectsWith
Returns whether the given bounding box intersects with this one. Args: axisAlignedBB -
isVecInside
Returns if the supplied Vec3D is completely inside the bounding box -
getAverageEdgeLength
public double getAverageEdgeLength()Returns the average length of the edges of the bounding box. -
contract
Returns a bounding box that is inset by the specified amounts -
calculateIntercept
-
toString
-
offsetAndUpdate
-
copyFrom
-
getEyeHeight
public double getEyeHeight() -
clone
-