Creates a new bounding box using the coordinates of the given vectors as corners. @param corner1 the first corner @param corner2 the second corner @return the bounding box
(@NotNull Vector corner1, @NotNull Vector corner2)
| 38 | * @return the bounding box |
| 39 | */ |
| 40 | @NotNull |
| 41 | public static BoundingBox of(@NotNull Vector corner1, @NotNull Vector corner2) { |
| 42 | Preconditions.checkArgument(corner1 != null, "Corner1 is null!"); |
| 43 | Preconditions.checkArgument(corner2 != null, "Corner2 is null!"); |
| 44 | return new BoundingBox(corner1.getX(), corner1.getY(), corner1.getZ(), corner2.getX(), corner2.getY(), corner2.getZ()); |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Creates a new bounding box using the coordinates of the given locations |