Skip to content

Commit

Permalink
Fix resetting matrix properties in Matrix4.set(col, row, v) and setRo…
Browse files Browse the repository at this point in the history
…wColumn() (#335)
  • Loading branch information
httpdigest committed May 24, 2023
1 parent 9672295 commit 8773210
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 77 deletions.
72 changes: 36 additions & 36 deletions src/main/java/org/joml/Matrix4d.java
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ public Matrix4d mul0(Matrix4dc right, Matrix4d dest) {
._m31(nm31)
._m32(nm32)
._m33(nm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

/**
Expand Down Expand Up @@ -1413,7 +1413,7 @@ private Matrix4d mulGeneric(
._m31(nm31)
._m32(nm32)
._m33(nm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

/**
Expand Down Expand Up @@ -1554,7 +1554,7 @@ private Matrix4d mulLocalGeneric(Matrix4dc left, Matrix4d dest) {
._m31(nm31)
._m32(nm32)
._m33(nm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

/**
Expand Down Expand Up @@ -1736,7 +1736,7 @@ public Matrix4d mulPerspectiveAffine(Matrix4x3dc view, Matrix4d dest) {
_m10(lm00 * view.m10())._m11(lm11 * view.m11())._m12(lm22 * view.m12())._m13(lm23 * view.m12()).
_m20(lm00 * view.m20())._m21(lm11 * view.m21())._m22(lm22 * view.m22())._m23(lm23 * view.m22()).
_m30(lm00 * view.m30())._m31(lm11 * view.m31())._m32(lm22 * view.m32() + m32)._m33(lm23 * view.m32())
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -1938,7 +1938,7 @@ private Matrix4d mulGeneric(Matrix4fc right, Matrix4d dest) {
._m31(nm31)
._m32(nm32)
._m33(nm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -1968,7 +1968,7 @@ public Matrix4d mulPerspectiveAffine(Matrix4dc view, Matrix4d dest) {
._m10(nm10)._m11(nm11)._m12(nm12)._m13(nm13)
._m20(nm20)._m21(nm21)._m22(nm22)._m23(nm23)
._m30(nm30)._m31(nm31)._m32(nm32)._m33(nm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

/**
Expand Down Expand Up @@ -2185,7 +2185,7 @@ public Matrix4d fma4x3(Matrix4dc other, double otherFactor, Matrix4d dest) {
._m31(Math.fma(other.m31(), otherFactor, m31))
._m32(Math.fma(other.m32(), otherFactor, m32))
._m33(m33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -2217,7 +2217,7 @@ public Matrix4d add(Matrix4dc other, Matrix4d dest) {
._m31(m31 + other.m31())
._m32(m32 + other.m32())
._m33(m33 + other.m33())
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -2249,7 +2249,7 @@ public Matrix4d sub(Matrix4dc subtrahend, Matrix4d dest) {
._m31(m31 - subtrahend.m31())
._m32(m32 - subtrahend.m32())
._m33(m33 - subtrahend.m33())
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -2281,7 +2281,7 @@ public Matrix4d mulComponentWise(Matrix4dc other, Matrix4d dest) {
._m31(m31 * other.m31())
._m32(m32 * other.m32())
._m33(m33 * other.m33())
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -2313,7 +2313,7 @@ public Matrix4d add4x3(Matrix4dc other, Matrix4d dest) {
._m31(m31 + other.m31())
._m32(m32 + other.m32())
._m33(m33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -2345,7 +2345,7 @@ public Matrix4d add4x3(Matrix4fc other, Matrix4d dest) {
._m31(m31 + other.m31())
._m32(m32 + other.m32())
._m33(m33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -2377,7 +2377,7 @@ public Matrix4d sub4x3(Matrix4dc subtrahend, Matrix4d dest) {
._m31(m31 - subtrahend.m31())
._m32(m32 - subtrahend.m32())
._m33(m33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -2409,7 +2409,7 @@ public Matrix4d mul4x3ComponentWise(Matrix4dc other, Matrix4d dest) {
._m31(m31 * other.m31())
._m32(m32 * other.m32())
._m33(m33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -2936,7 +2936,7 @@ private Matrix4d invertGenericNonThis(Matrix4d dest) {
._m31(Math.fma( m00, j, Math.fma(-m01, h, m02 * g)) * det)
._m32(Math.fma(-m30, d, Math.fma( m31, b, -m32 * a)) * det)
._m33(Math.fma( m20, d, Math.fma(-m21, b, m22 * a)) * det)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}
private Matrix4d invertGenericThis(Matrix4d dest) {
double a = m00 * m11 - m01 * m10;
Expand Down Expand Up @@ -2986,7 +2986,7 @@ private Matrix4d invertGenericThis(Matrix4d dest) {
._m31(nm31)
._m32(nm32)
._m33(nm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

public Matrix4d invertPerspective(Matrix4d dest) {
Expand Down Expand Up @@ -3100,7 +3100,7 @@ public Matrix4d invertPerspectiveView(Matrix4dc view, Matrix4d dest) {
._m31(nm31)
._m32(nm32)
._m33(pm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

public Matrix4d invertPerspectiveView(Matrix4x3dc view, Matrix4d dest) {
Expand Down Expand Up @@ -3131,7 +3131,7 @@ public Matrix4d invertPerspectiveView(Matrix4x3dc view, Matrix4d dest) {
._m31(view.m12() * pm32 + vm31 * pm33)
._m32(view.m22() * pm32 + vm32 * pm33)
._m33(pm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

public Matrix4d invertAffine(Matrix4d dest) {
Expand Down Expand Up @@ -3217,7 +3217,7 @@ private Matrix4d transposeNonThisGeneric(Matrix4d dest) {
._m31(m13)
._m32(m23)
._m33(m33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}
private Matrix4d transposeThisGeneric(Matrix4d dest) {
double nm10 = m01;
Expand All @@ -3239,7 +3239,7 @@ private Matrix4d transposeThisGeneric(Matrix4d dest) {
._m30(nm30)
._m31(nm31)
._m32(nm32)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

/**
Expand Down Expand Up @@ -3647,7 +3647,7 @@ public Matrix4d zero() {
_m31(0.0).
_m32(0.0).
_m33(0.0).
_properties(0);
_properties(PROPERTY_UNKNOWN);
}

/**
Expand Down Expand Up @@ -8800,13 +8800,13 @@ public Vector3d getRow(int row, Vector3d dest) throws IndexOutOfBoundsException
public Matrix4d setRow(int row, Vector4dc src) throws IndexOutOfBoundsException {
switch (row) {
case 0:
return _m00(src.x())._m10(src.y())._m20(src.z())._m30(src.w())._properties(0);
return _m00(src.x())._m10(src.y())._m20(src.z())._m30(src.w())._properties(PROPERTY_UNKNOWN);
case 1:
return _m01(src.x())._m11(src.y())._m21(src.z())._m31(src.w())._properties(0);
return _m01(src.x())._m11(src.y())._m21(src.z())._m31(src.w())._properties(PROPERTY_UNKNOWN);
case 2:
return _m02(src.x())._m12(src.y())._m22(src.z())._m32(src.w())._properties(0);
return _m02(src.x())._m12(src.y())._m22(src.z())._m32(src.w())._properties(PROPERTY_UNKNOWN);
case 3:
return _m03(src.x())._m13(src.y())._m23(src.z())._m33(src.w())._properties(0);
return _m03(src.x())._m13(src.y())._m23(src.z())._m33(src.w())._properties(PROPERTY_UNKNOWN);
default:
throw new IndexOutOfBoundsException();
}
Expand Down Expand Up @@ -8885,13 +8885,13 @@ public Vector3d getColumn(int column, Vector3d dest) throws IndexOutOfBoundsExce
public Matrix4d setColumn(int column, Vector4dc src) throws IndexOutOfBoundsException {
switch (column) {
case 0:
return _m00(src.x())._m01(src.y())._m02(src.z())._m03(src.w())._properties(0);
return _m00(src.x())._m01(src.y())._m02(src.z())._m03(src.w())._properties(PROPERTY_UNKNOWN);
case 1:
return _m10(src.x())._m11(src.y())._m12(src.z())._m13(src.w())._properties(0);
return _m10(src.x())._m11(src.y())._m12(src.z())._m13(src.w())._properties(PROPERTY_UNKNOWN);
case 2:
return _m20(src.x())._m21(src.y())._m22(src.z())._m23(src.w())._properties(0);
return _m20(src.x())._m21(src.y())._m22(src.z())._m23(src.w())._properties(PROPERTY_UNKNOWN);
case 3:
return _m30(src.x())._m31(src.y())._m32(src.z())._m33(src.w())._properties(0);
return _m30(src.x())._m31(src.y())._m32(src.z())._m33(src.w())._properties(PROPERTY_UNKNOWN);
default:
throw new IndexOutOfBoundsException();
}
Expand All @@ -8913,7 +8913,7 @@ public double get(int column, int row) {
* @return this
*/
public Matrix4d set(int column, int row, double value) {
return MemUtil.INSTANCE.set(this, column, row, value);
return MemUtil.INSTANCE.set(this, column, row, value)._properties(PROPERTY_UNKNOWN);
}

public double getRowColumn(int row, int column) {
Expand All @@ -8932,7 +8932,7 @@ public double getRowColumn(int row, int column) {
* @return this
*/
public Matrix4d setRowColumn(int row, int column, double value) {
return MemUtil.INSTANCE.set(this, column, row, value);
return MemUtil.INSTANCE.set(this, column, row, value)._properties(PROPERTY_UNKNOWN);
}

/**
Expand Down Expand Up @@ -11663,7 +11663,7 @@ public Matrix4d lookAtPerspective(double eyeX, double eyeY, double eyeZ,
._m31(nm31)
._m32(nm32)
._m33(nm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);
}

/**
Expand Down Expand Up @@ -12097,7 +12097,7 @@ public Matrix4d lookAtPerspectiveLH(double eyeX, double eyeY, double eyeZ,
._m31(nm31)
._m32(nm32)
._m33(nm33)
._properties(0);
._properties(PROPERTY_UNKNOWN);

return dest;
}
Expand Down Expand Up @@ -13719,7 +13719,7 @@ private Matrix4d frustumGeneric(double left, double right, double bottom, double
._m21(nm21)
._m22(nm22)
._m23(nm23)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -14023,7 +14023,7 @@ private Matrix4d frustumLHGeneric(double left, double right, double bottom, doub
._m21(nm21)
._m22(nm22)
._m23(nm23)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down Expand Up @@ -15062,7 +15062,7 @@ public Matrix4d pick(double x, double y, double width, double height, int[] view
._m11(m11 * sy)
._m12(m12 * sy)
._m13(m13 * sy)
._properties(0);
._properties(PROPERTY_UNKNOWN);
return dest;
}

Expand Down
Loading

0 comments on commit 8773210

Please sign in to comment.