Fix blob brush doing weird things due to mutable vectors

Dieser Commit ist enthalten in:
Hannes Greule 2020-07-14 21:32:16 +02:00
Ursprung da96365504
Commit eb74c7307c

Datei anzeigen

@ -74,10 +74,12 @@ public class BlobBrush implements Brush {
MutableVector3 mutable = new MutableVector3();
double roughness = 1 - sphericity;
for (int xr = -sizeInt; xr <= sizeInt; xr++) {
mutable.mutX(xr);
for (int yr = -sizeInt; yr <= sizeInt; yr++) {
mutable.mutY(yr);
for (int zr = -sizeInt; zr <= sizeInt; zr++) {
// pt == mutable as it's a MutableVector3
// so it must be set each time
mutable.mutX(xr);
mutable.mutY(yr);
mutable.mutZ(zr);
Vector3 pt = transform.apply(mutable);
int x = MathMan.roundInt(pt.getX());