Structures, texture changes
This commit is contained in:
parent
bd9d71206f
commit
846b14cf7c
21 changed files with 262 additions and 22 deletions
|
@ -41,6 +41,16 @@ public class SplineHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public static void parableOffset(List<Vector3f> spline, float distance) {
|
||||
int count = spline.size();
|
||||
for (int i = 1; i < count; i++) {
|
||||
Vector3f pos = spline.get(i);
|
||||
float x = (float) i / (float) (count + 1);
|
||||
float y = pos.getY() + x * x * distance;
|
||||
pos.set(pos.getX(), y, pos.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
public static SDF buildSDF(List<Vector3f> spline, float radius1, float radius2, Function<BlockPos, BlockState> placerFunction) {
|
||||
int count = spline.size();
|
||||
float max = count - 2;
|
||||
|
|
|
@ -7,6 +7,10 @@ public class SDFRotation extends SDFUnary {
|
|||
private static final Vector3f POS = new Vector3f();
|
||||
private Quaternion rotation;
|
||||
|
||||
public SDFRotation setRotation() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDistance(float x, float y, float z) {
|
||||
POS.set(x, y, z);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue