Static fix

This commit is contained in:
paulevsGitch 2022-02-16 06:12:38 +03:00
parent de7e7eb4ce
commit 39d5f58f0c
2 changed files with 5 additions and 5 deletions

View file

@ -5,7 +5,7 @@ import com.mojang.math.Vector3f;
import java.util.function.Consumer;
public class SDFCoordModify extends SDFUnary {
private static Vector3f pos = new Vector3f();
private final Vector3f pos = new Vector3f();
private Consumer<Vector3f> function;
public SDFCoordModify setFunction(Consumer<Vector3f> function) {

View file

@ -4,7 +4,7 @@ import com.mojang.math.Quaternion;
import com.mojang.math.Vector3f;
public class SDFRotation extends SDFUnary {
private static final Vector3f POS = new Vector3f();
private final Vector3f pos = new Vector3f();
private Quaternion rotation;
public SDFRotation setRotation(Vector3f axis, float rotationAngle) {
@ -14,8 +14,8 @@ public class SDFRotation extends SDFUnary {
@Override
public float getDistance(float x, float y, float z) {
POS.set(x, y, z);
POS.transform(rotation);
return source.getDistance(POS.x(), POS.y(), POS.z());
pos.set(x, y, z);
pos.transform(rotation);
return source.getDistance(pos.x(), pos.y(), pos.z());
}
}