mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-23 00:29:51 +00:00
Reformat & add .editorconfig
This commit is contained in:
@@ -27,6 +27,11 @@ public class Vector2 implements Cloneable {
|
||||
return x;
|
||||
}
|
||||
|
||||
public Vector2 setX(double x) {
|
||||
this.x = x;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Z component
|
||||
*
|
||||
@@ -36,6 +41,11 @@ public class Vector2 implements Cloneable {
|
||||
return z;
|
||||
}
|
||||
|
||||
public Vector2 setZ(double z) {
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiply X and Z components by a value.
|
||||
*
|
||||
@@ -164,14 +174,4 @@ public class Vector2 implements Cloneable {
|
||||
throw new Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 setX(double x) {
|
||||
this.x = x;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector2 setZ(double z) {
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,12 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class Rectangle extends Polygon {
|
||||
private Vector2 min;
|
||||
private Vector2 max;
|
||||
private final Vector2 min;
|
||||
private final Vector2 max;
|
||||
|
||||
public Rectangle(Vector2 min, Vector2 max) {
|
||||
this.max = new Vector2(Math.min(min.getX(), max.getX()), Math.min(min.getZ(), max.getZ()));
|
||||
this.min = new Vector2(Math.max(min.getX(), max.getX()), Math.max(min.getZ(), max.getZ()));
|
||||
;
|
||||
}
|
||||
|
||||
public Rectangle(Vector2 center, double xRadius, double zRadius) {
|
||||
|
||||
@@ -8,6 +8,11 @@ import java.util.List;
|
||||
public abstract class VoxelGeometry {
|
||||
public List<Vector> geometry = new ArrayList<>();
|
||||
|
||||
public static VoxelGeometry getBlank() {
|
||||
return new VoxelGeometry() {
|
||||
};
|
||||
}
|
||||
|
||||
public List<Vector> getGeometry() {
|
||||
return geometry;
|
||||
}
|
||||
@@ -19,9 +24,4 @@ public abstract class VoxelGeometry {
|
||||
public void merge(VoxelGeometry other) {
|
||||
geometry.addAll(other.geometry);
|
||||
}
|
||||
|
||||
public static VoxelGeometry getBlank() {
|
||||
return new VoxelGeometry() {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user