Package com.technicjelle.BMUtils
Class Cheese
java.lang.Object
com.technicjelle.BMUtils.Cheese
A
Shape
with possibly some holes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection
<Cheese> createPlatterFromCells
(Vector2d cellSize, Vector2i... cells) Creates BlueMapShape
s with potentially some holes, from a collection of custom-sized cells.
Designed to be looped over and fed into a BlueMapShapeMarker
orExtrudeMarker
static Collection
<Cheese> createPlatterFromChunks
(Vector2i... chunks) Creates BlueMapShape
s with potentially some holes, from a collection of chunks.
Designed to be looped over and fed into a BlueMapShapeMarker
orExtrudeMarker
static Cheese
createSingleFromCells
(Vector2d cellSize, Vector2i... cells) Creates a single BlueMapShape
with potentially some holes, from a collection of custom-sized cells.
Designed to be fed directly into a BlueMapShapeMarker
orExtrudeMarker
.static Cheese
createSingleFromChunks
(Vector2i... chunks) Creates a single BlueMapShape
with potentially some holes, from a collection of chunks.
Designed to be fed directly into a BlueMapShapeMarker
orExtrudeMarker
.getHoles()
getShape()
-
Constructor Details
-
Cheese
Creates a new Cheese with no holes.- Parameters:
shape
- The outer shape of the cheese.
-
Cheese
Creates a new Cheese with holes.- Parameters:
shape
- The outer shape of the cheese.holes
- Any holes in the cheese.
-
Cheese
Creates a new Cheese with holes.- Parameters:
shape
- The outer shape of the cheese.holes
- Any holes in the cheese.
-
-
Method Details
-
getShape
- Returns:
- The outer shape of the cheese.
-
getHoles
- Returns:
- Any holes in the cheese.
-
createPlatterFromChunks
Creates BlueMapShape
s with potentially some holes, from a collection of chunks.
Designed to be looped over and fed into a BlueMapShapeMarker
orExtrudeMarker
- Parameters:
chunks
- The chunks to create the cheese from.- Returns:
- A collection of
Cheese
objects, each representing a single connected area.
-
createSingleFromChunks
Creates a single BlueMapShape
with potentially some holes, from a collection of chunks.
Designed to be fed directly into a BlueMapShapeMarker
orExtrudeMarker
.
WARNING:
This method assumes that all chunks are connected!
If you're not absolutely 100% sure that your chunks will always be connected, usecreatePlatterFromChunks(Vector2i...)
instead.
If multiple disconnected areas are found, only the first one will be returned.- Parameters:
chunks
- The chunks to create the cheese from.- Returns:
- A single
Cheese
object representing a single connected area.
-
createPlatterFromCells
Creates BlueMapShape
s with potentially some holes, from a collection of custom-sized cells.
Designed to be looped over and fed into a BlueMapShapeMarker
orExtrudeMarker
- Parameters:
cellSize
- The size of a single cell.cells
- The cells to create the cheese from.- Returns:
- A collection of
Cheese
objects, each representing a single connected area.
-
createSingleFromCells
Creates a single BlueMapShape
with potentially some holes, from a collection of custom-sized cells.
Designed to be fed directly into a BlueMapShapeMarker
orExtrudeMarker
.
WARNING:
This method assumes that all cells are connected!
If you're not absolutely 100% sure that your cells will always be connected, usecreatePlatterFromCells(Vector2d, Vector2i...)
instead.
If multiple disconnected areas are found, only the first one will be returned.- Parameters:
cellSize
- The size of a single cell.cells
- The cells to create the cheese from.- Returns:
- A single
Cheese
object representing a single connected area.
-