Skip to content

Commit

Permalink
Static fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulevsGitch committed Feb 16, 2022
1 parent de7e7eb commit 39d5f58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/ru/bclib/sdf/operator/SDFCoordModify.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ru/bclib/sdf/operator/SDFRotation.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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) {
Expand All @@ -14,8 +14,8 @@ public SDFRotation setRotation(Vector3f axis, float rotationAngle) {

@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());
}
}

0 comments on commit 39d5f58

Please sign in to comment.