diff options
author | Sven Gothel <[email protected]> | 2023-04-12 19:05:10 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-04-12 19:05:10 +0200 |
commit | 3224346312357430eeb7af3f561e85f9695870b6 (patch) | |
tree | 536a3366b60c41014c0dab3f264d5f4bbe2f238b /src/jogl/classes/com | |
parent | 2fbaa25d70854de2857d9fa20ac6a34c294a4222 (diff) |
Graph/Math: Cleanup toString(), spacing and use System.lineSeparator()
Diffstat (limited to 'src/jogl/classes/com')
4 files changed, 21 insertions, 27 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java index 9ef09d8c5..004562767 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java @@ -1264,9 +1264,9 @@ public final class FloatUtil { sb.append(prefix).append(" "); } matrixRowToString(sb, f, a, aOffset, rows, columns, rowMajorOrder, i); - sb.append(Platform.getNewline()); + sb.append(System.lineSeparator()); } - sb.append(prefix).append("}").append(Platform.getNewline()); + sb.append(prefix).append("}").append(System.lineSeparator()); return sb; } @@ -1293,9 +1293,9 @@ public final class FloatUtil { sb.append(prefix).append(" "); } matrixRowToString(sb, f, a, aOffset, rows, columns, rowMajorOrder, i); - sb.append(Platform.getNewline()); + sb.append(System.lineSeparator()); } - sb.append(prefix).append("}").append(Platform.getNewline()); + sb.append(prefix).append("}").append(System.lineSeparator()); return sb; } diff --git a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java index ad521de2a..f76ae8059 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java +++ b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java @@ -816,7 +816,7 @@ public class AABBox { @Override public final String toString() { - return "[ dim "+getWidth()+" x "+getHeight()+" x "+getDepth()+ - ", box "+low+" .. "+high+", ctr "+center+" ]"; + return "[dim "+getWidth()+" x "+getHeight()+" x "+getDepth()+ + ", box "+low+" .. "+high+", ctr "+center+"]"; } } diff --git a/src/jogl/classes/com/jogamp/opengl/math/geom/Frustum.java b/src/jogl/classes/com/jogamp/opengl/math/geom/Frustum.java index f72154827..73079959b 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/geom/Frustum.java +++ b/src/jogl/classes/com/jogamp/opengl/math/geom/Frustum.java @@ -27,13 +27,9 @@ */ package com.jogamp.opengl.math.geom; -import jogamp.common.os.PlatformPropsImpl; - -import com.jogamp.opengl.math.FloatUtil; import com.jogamp.opengl.math.FovHVHalves; import com.jogamp.opengl.math.Matrix4f; import com.jogamp.opengl.math.Vec3f; -import com.jogamp.opengl.math.geom.Frustum.FovDesc; /** * Providing frustum {@link #getPlanes() planes} derived by different inputs @@ -364,13 +360,13 @@ public class Frustum { if( null == sb ) { sb = new StringBuilder(); } - sb.append("Frustum[ Planes[ ").append(PlatformPropsImpl.NEWLINE) - .append(" L: ").append(planes[0]).append(", ").append(PlatformPropsImpl.NEWLINE) - .append(" R: ").append(planes[1]).append(", ").append(PlatformPropsImpl.NEWLINE) - .append(" B: ").append(planes[2]).append(", ").append(PlatformPropsImpl.NEWLINE) - .append(" T: ").append(planes[3]).append(", ").append(PlatformPropsImpl.NEWLINE) - .append(" N: ").append(planes[4]).append(", ").append(PlatformPropsImpl.NEWLINE) - .append(" F: ").append(planes[5]).append("], ").append(PlatformPropsImpl.NEWLINE) + sb.append("Frustum[Planes[").append(System.lineSeparator()) + .append(" L: ").append(planes[0]).append(", ").append(System.lineSeparator()) + .append(" R: ").append(planes[1]).append(", ").append(System.lineSeparator()) + .append(" B: ").append(planes[2]).append(", ").append(System.lineSeparator()) + .append(" T: ").append(planes[3]).append(", ").append(System.lineSeparator()) + .append(" N: ").append(planes[4]).append(", ").append(System.lineSeparator()) + .append(" F: ").append(planes[5]).append("], ").append(System.lineSeparator()) .append("]"); return sb; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java index c9400889b..f99f6c891 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java +++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java @@ -36,8 +36,6 @@ import com.jogamp.opengl.GLException; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.opengl.GLUniformData; -import jogamp.common.os.PlatformPropsImpl; - import com.jogamp.common.nio.Buffers; import com.jogamp.opengl.math.FloatUtil; import com.jogamp.opengl.math.Matrix4f; @@ -1129,30 +1127,30 @@ public final class PMVMatrix implements GLMatrixFunc { sb.append("PMVMatrix[modified[P ").append(modP).append(", Mv ").append(modMv).append(", T ").append(modT); sb.append("], dirty/used[PMv ").append(pmvDirty).append("/").append(pmvUsed).append(", Pmvi ").append(pmviDirty).append("/").append(pmviUsed).append(", Frustum ").append(frustumDirty).append("/").append(frustumUsed); - sb.append("], dirty/req[Mvi ").append(mviDirty).append("/").append(mviReq).append(", Mvit ").append(mvitDirty).append("/").append(mvitReq).append("]").append(PlatformPropsImpl.NEWLINE); - sb.append(", Projection").append(PlatformPropsImpl.NEWLINE); + sb.append("], dirty/req[Mvi ").append(mviDirty).append("/").append(mviReq).append(", Mvit ").append(mvitDirty).append("/").append(mvitReq).append("]").append(System.lineSeparator()); + sb.append(", Projection").append(System.lineSeparator()); matP.toString(sb, null, f); - sb.append(", Modelview").append(PlatformPropsImpl.NEWLINE); + sb.append(", Modelview").append(System.lineSeparator()); matMv.toString(sb, null, f); - sb.append(", Texture").append(PlatformPropsImpl.NEWLINE); + sb.append(", Texture").append(System.lineSeparator()); matTex.toString(sb, null, f); if( null != matPMv ) { - sb.append(", P * Mv").append(PlatformPropsImpl.NEWLINE); + sb.append(", P * Mv").append(System.lineSeparator()); matPMv.toString(sb, null, f); ++count; } if( null != matPMvi ) { - sb.append(", P * Mv").append(PlatformPropsImpl.NEWLINE); + sb.append(", P * Mv").append(System.lineSeparator()); matPMvi.toString(sb, null, f); ++count; } if( mviReq ) { - sb.append(", Inverse Modelview").append(PlatformPropsImpl.NEWLINE); + sb.append(", Inverse Modelview").append(System.lineSeparator()); matMvi.toString(sb, null, f); ++count; } if( mvitReq ) { - sb.append(", Inverse Transposed Modelview").append(PlatformPropsImpl.NEWLINE); + sb.append(", Inverse Transposed Modelview").append(System.lineSeparator()); matMvit.toString(sb, null, f); ++count; } |