public final class VoxelShapes extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
VoxelShapes.BoxConsumer |
Modifier and Type | Field and Description |
---|---|
private static VoxelShape |
EMPTY |
private static VoxelShape |
FULL_CUBE |
static VoxelShape |
UNBOUNDED |
Constructor and Description |
---|
VoxelShapes() |
Modifier and Type | Method and Description |
---|---|
static boolean |
adjacentSidesCoverSquare(VoxelShape one,
VoxelShape two,
Direction direction) |
static double |
calculateMaxOffset(Direction.Axis axis,
Box box,
Stream<VoxelShape> shapes,
double maxDist) |
private static double |
calculatePushVelocity(Box box,
WorldView world,
double initial,
ShapeContext context,
AxisCycleDirection direction,
Stream<VoxelShape> shapes) |
static double |
calculatePushVelocity(Direction.Axis axis,
Box box,
WorldView world,
double initial,
ShapeContext context,
Stream<VoxelShape> shapes) |
private static int |
clamp(double value,
double min,
double max) |
static VoxelShape |
combine(VoxelShape one,
VoxelShape two,
BooleanBiFunction function) |
static VoxelShape |
combineAndSimplify(VoxelShape first,
VoxelShape second,
BooleanBiFunction function) |
protected static PairList |
createListPair(int size,
it.unimi.dsi.fastutil.doubles.DoubleList first,
it.unimi.dsi.fastutil.doubles.DoubleList second,
boolean includeFirst,
boolean includeSecond) |
static VoxelShape |
cuboid(Box box) |
static VoxelShape |
cuboid(double xMin,
double yMin,
double zMin,
double xMax,
double yMax,
double zMax) |
static VoxelShape |
empty() |
static VoxelShape |
extrudeFace(VoxelShape shape,
Direction direction) |
private static int |
findRequiredBitResolution(double min,
double max) |
static VoxelShape |
fullCube() |
static boolean |
isSideCovered(VoxelShape shape,
VoxelShape neighbor,
Direction direction) |
protected static long |
lcm(int a,
int b) |
private static boolean |
matchesAnywhere(PairList mergedX,
PairList mergedY,
PairList mergedZ,
VoxelSet shape1,
VoxelSet shape2,
BooleanBiFunction predicate) |
static boolean |
matchesAnywhere(VoxelShape shape1,
VoxelShape shape2,
BooleanBiFunction predicate) |
static VoxelShape |
union(VoxelShape first,
VoxelShape second) |
static VoxelShape |
union(VoxelShape first,
VoxelShape[] others) |
static boolean |
unionCoversFullCube(VoxelShape one,
VoxelShape two) |
private static final VoxelShape FULL_CUBE
public static final VoxelShape UNBOUNDED
private static final VoxelShape EMPTY
public static VoxelShape empty()
public static VoxelShape fullCube()
public static VoxelShape cuboid(double xMin, double yMin, double zMin, double xMax, double yMax, double zMax)
public static VoxelShape cuboid(Box box)
private static int findRequiredBitResolution(double min, double max)
protected static long lcm(int a, int b)
public static VoxelShape union(VoxelShape first, VoxelShape second)
public static VoxelShape union(VoxelShape first, VoxelShape[] others)
public static VoxelShape combineAndSimplify(VoxelShape first, VoxelShape second, BooleanBiFunction function)
public static VoxelShape combine(VoxelShape one, VoxelShape two, BooleanBiFunction function)
public static boolean matchesAnywhere(VoxelShape shape1, VoxelShape shape2, BooleanBiFunction predicate)
private static boolean matchesAnywhere(PairList mergedX, PairList mergedY, PairList mergedZ, VoxelSet shape1, VoxelSet shape2, BooleanBiFunction predicate)
public static double calculateMaxOffset(Direction.Axis axis, Box box, Stream<VoxelShape> shapes, double maxDist)
public static double calculatePushVelocity(Direction.Axis axis, Box box, WorldView world, double initial, ShapeContext context, Stream<VoxelShape> shapes)
private static double calculatePushVelocity(Box box, WorldView world, double initial, ShapeContext context, AxisCycleDirection direction, Stream<VoxelShape> shapes)
private static int clamp(double value, double min, double max)
@Environment(value=CLIENT) public static boolean isSideCovered(VoxelShape shape, VoxelShape neighbor, Direction direction)
public static VoxelShape extrudeFace(VoxelShape shape, Direction direction)
public static boolean adjacentSidesCoverSquare(VoxelShape one, VoxelShape two, Direction direction)
public static boolean unionCoversFullCube(VoxelShape one, VoxelShape two)
protected static PairList createListPair(int size, it.unimi.dsi.fastutil.doubles.DoubleList first, it.unimi.dsi.fastutil.doubles.DoubleList second, boolean includeFirst, boolean includeSecond)