From efc9c443de9c3c09f887dad3e62315f5acf95adb Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Tue, 7 Apr 2020 10:51:33 -0700 Subject: [PATCH] elimiate incidental hard tabs from jme3-core --- .../java/com/jme3/animation/BoneTrack.java | 2 +- .../java/com/jme3/app/LegacyApplication.java | 2 +- .../com/jme3/bounding/BoundingSphere.java | 20 +++++++++---------- .../com/jme3/bounding/BoundingVolume.java | 2 +- .../java/com/jme3/bounding/Intersection.java | 8 ++++---- .../jme3/bounding/OrientedBoundingBox.java | 2 +- .../DefaultParticleInfluencer.java | 2 +- .../jme3/environment/util/EnvMapUtils.java | 4 ++-- .../main/java/com/jme3/font/ColorTags.java | 2 +- .../src/main/java/com/jme3/math/Eigen3f.java | 8 ++++---- .../src/main/java/com/jme3/math/Vector3f.java | 2 +- .../com/jme3/opencl/AbstractOpenCLObject.java | 2 +- .../java/com/jme3/opencl/MappingAccess.java | 8 ++++---- .../java/com/jme3/opencl/MemoryAccess.java | 6 +++--- .../java/com/jme3/opencl/OpenCLObject.java | 10 +++++----- .../main/java/com/jme3/renderer/Camera.java | 14 ++++++------- .../src/main/java/com/jme3/texture/Image.java | 8 ++++---- .../Common/MatDefs/Misc/ShowNormals.j3md | 2 +- .../resources/Common/MatDefs/Misc/Sky.j3md | 4 ++-- .../Common/MatDefs/Misc/SoftParticle.frag | 2 +- .../Common/MatDefs/Misc/Unshaded.j3md | 6 +++--- .../ShaderNodes/Basic/Mat3Vec3Mult100.frag | 2 +- .../ShaderNodes/Common/Billboard100.frag | 6 +++--- .../MatDefs/ShaderNodes/Misc/Dashed100.frag | 8 ++++---- .../Misc/PerspectiveDivide100.frag | 2 +- .../Common/MatDefs/Shadow/PostShadow.j3md | 2 +- .../jme3/asset/plugins/HttpZipLocator.java | 12 +++++------ .../com/jme3/texture/plugins/HDRLoader.java | 4 ++-- .../test/java/com/jme3/math/FastMathTest.java | 6 +++--- .../src/test/resources/bad-booleans1.j3md | 6 +++--- .../src/test/resources/bad-booleans2.j3md | 6 +++--- .../src/test/resources/bad-booleans3.j3md | 6 +++--- .../java/jme3tools/optimize/LodGenerator.java | 4 ++-- 33 files changed, 90 insertions(+), 90 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/animation/BoneTrack.java b/jme3-core/src/main/java/com/jme3/animation/BoneTrack.java index d12f004de..deb12c806 100644 --- a/jme3-core/src/main/java/com/jme3/animation/BoneTrack.java +++ b/jme3-core/src/main/java/com/jme3/animation/BoneTrack.java @@ -89,7 +89,7 @@ public final class BoneTrack implements JmeCloneable, Track { * @param scales the scale of the bone for each frame */ public BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) { - this.targetBoneIndex = targetBoneIndex; + this.targetBoneIndex = targetBoneIndex; this.setKeyframes(times, translations, rotations, scales); } diff --git a/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java b/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java index 1cc53b75e..900c7fa51 100644 --- a/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java +++ b/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java @@ -695,7 +695,7 @@ public class LegacyApplication implements Application, SystemListener { * Runs tasks enqueued via {@link #enqueue(Callable)} */ protected void runQueuedTasks() { - AppTask task; + AppTask task; while( (task = taskQueue.poll()) != null ) { if (!task.isCancelled()) { task.invoke(); diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java index 7936c7224..5387fa1bf 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java +++ b/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java @@ -148,24 +148,24 @@ public class BoundingSphere extends BoundingVolume { // * computeFromTris creates a new Bounding Box from a given // * set of triangles. It is used in OBBTree calculations. // * -// * @param indices -// * @param mesh +// * @param indices +// * @param mesh // * @param start // * @param end // */ // public void computeFromTris(int[] indices, Mesh mesh, int start, int end) { -// if (end - start <= 0) { +// if (end - start <= 0) { // return; // } // -// Vector3f[] vertList = new Vector3f[(end - start) * 3]; +// Vector3f[] vertList = new Vector3f[(end - start) * 3]; // // int count = 0; // for (int i = start; i < end; i++) { -// mesh.getTriangle(indices[i], verts); -// vertList[count++] = new Vector3f(verts[0]); -// vertList[count++] = new Vector3f(verts[1]); -// vertList[count++] = new Vector3f(verts[2]); +// mesh.getTriangle(indices[i], verts); +// vertList[count++] = new Vector3f(verts[0]); +// vertList[count++] = new Vector3f(verts[1]); +// vertList[count++] = new Vector3f(verts[2]); // } // // averagePoints(vertList); @@ -486,7 +486,7 @@ public class BoundingSphere extends BoundingVolume { } // case OBB: { -// OrientedBoundingBox box = (OrientedBoundingBox) volume; +// OrientedBoundingBox box = (OrientedBoundingBox) volume; // BoundingSphere rVal = (BoundingSphere) this.clone(null); // return rVal.mergeOBB(box); // } @@ -532,7 +532,7 @@ public class BoundingSphere extends BoundingVolume { } // case OBB: { -// return mergeOBB((OrientedBoundingBox) volume); +// return mergeOBB((OrientedBoundingBox) volume); // } default: diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingVolume.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingVolume.java index 4491fcedf..80463d6bf 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingVolume.java +++ b/jme3-core/src/main/java/com/jme3/bounding/BoundingVolume.java @@ -284,7 +284,7 @@ public abstract class BoundingVolume implements Savable, Cloneable, Collidable { * the bounding box to test against. * @return true if this volume intersects the given bounding box. */ -// public abstract boolean intersectsOrientedBoundingBox(OrientedBoundingBox bb); +// public abstract boolean intersectsOrientedBoundingBox(OrientedBoundingBox bb); /** * * determines if a given point is contained within this bounding volume. diff --git a/jme3-core/src/main/java/com/jme3/bounding/Intersection.java b/jme3-core/src/main/java/com/jme3/bounding/Intersection.java index 37beede01..a7c9a692e 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/Intersection.java +++ b/jme3-core/src/main/java/com/jme3/bounding/Intersection.java @@ -121,8 +121,8 @@ public final class Intersection { // private boolean axisTestX01(float a, float b, float fa, float fb, // Vector3f center, Vector3f ext, // Vector3f v1, Vector3f v2, Vector3f v3){ -// float p0 = a * v0.y - b * v0.z; -// float p2 = a * v2.y - b * v2.z; +// float p0 = a * v0.y - b * v0.z; +// float p2 = a * v2.y - b * v2.z; // if(p0 < p2){ // min = p0; // max = p2; @@ -130,8 +130,8 @@ public final class Intersection { // min = p2; // max = p0; // } -// float rad = fa * boxhalfsize.y + fb * boxhalfsize.z; -// if(min > rad || max < -rad) +// float rad = fa * boxhalfsize.y + fb * boxhalfsize.z; +// if(min > rad || max < -rad) // return false; // } public static boolean intersect(BoundingBox bbox, Vector3f v1, Vector3f v2, Vector3f v3) { diff --git a/jme3-core/src/main/java/com/jme3/bounding/OrientedBoundingBox.java b/jme3-core/src/main/java/com/jme3/bounding/OrientedBoundingBox.java index 1fe1624cb..b72bd5bbc 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/OrientedBoundingBox.java +++ b/jme3-core/src/main/java/com/jme3/bounding/OrientedBoundingBox.java @@ -506,7 +506,7 @@ package com.jme3.bounding; //// Vector3f max = _compVect2.set(new Vector3f(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY)); //// Vector3f point; //// for (int i = start; i < end; i++) { -//// mesh.getTriangle(indices[i], verts); +//// mesh.getTriangle(indices[i], verts); //// point = verts[0]; //// if (point.x < min.x) //// min.x = point.x; diff --git a/jme3-core/src/main/java/com/jme3/effect/influencers/DefaultParticleInfluencer.java b/jme3-core/src/main/java/com/jme3/effect/influencers/DefaultParticleInfluencer.java index efe26af49..52438de9b 100644 --- a/jme3-core/src/main/java/com/jme3/effect/influencers/DefaultParticleInfluencer.java +++ b/jme3-core/src/main/java/com/jme3/effect/influencers/DefaultParticleInfluencer.java @@ -72,7 +72,7 @@ public class DefaultParticleInfluencer implements ParticleInfluencer { * the particle to be affected */ protected void applyVelocityVariation(Particle particle) { - particle.velocity.set(initialVelocity); + particle.velocity.set(initialVelocity); temp.set(FastMath.nextRandomFloat(), FastMath.nextRandomFloat(), FastMath.nextRandomFloat()); temp.multLocal(2f); temp.subtractLocal(1f, 1f, 1f); diff --git a/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java b/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java index 8f7ad841c..96e100939 100644 --- a/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java +++ b/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java @@ -317,7 +317,7 @@ public class EnvMapUtils { } //compute vector depending on the face - // Code from Nvtt : http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/src/nvtt/CubeSurface.cpp + // Code from Nvtt : http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/src/nvtt/CubeSurface.cpp switch (face) { case 0: //store.set(1f, -v, -u, 0); @@ -360,7 +360,7 @@ public class EnvMapUtils { v *= bias; if (fixSeamsMethod == FixSeamsMethod.Stretch) { - /* Code from Nvtt : http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/src/nvtt/CubeSurface.cpp + /* Code from Nvtt : http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/src/nvtt/CubeSurface.cpp * transform from [0..res - 1] to [-1 .. 1], match up edges exactly. */ u = Math.round((u + 1.0f) * ((float) mapSize - 1.0f) * 0.5f); v = Math.round((v + 1.0f) * ((float) mapSize - 1.0f) * 0.5f); diff --git a/jme3-core/src/main/java/com/jme3/font/ColorTags.java b/jme3-core/src/main/java/com/jme3/font/ColorTags.java index 83f46b3d0..50f7077b2 100644 --- a/jme3-core/src/main/java/com/jme3/font/ColorTags.java +++ b/jme3-core/src/main/java/com/jme3/font/ColorTags.java @@ -46,7 +46,7 @@ import java.util.regex.Pattern; */ class ColorTags { private static final Pattern colorPattern = Pattern.compile("\\\\#([0-9a-fA-F]{8})#|\\\\#([0-9a-fA-F]{6})#|" + - "\\\\#([0-9a-fA-F]{4})#|\\\\#([0-9a-fA-F]{3})#"); + "\\\\#([0-9a-fA-F]{4})#|\\\\#([0-9a-fA-F]{3})#"); private LinkedList colors = new LinkedList(); private String text; private String original; diff --git a/jme3-core/src/main/java/com/jme3/math/Eigen3f.java b/jme3-core/src/main/java/com/jme3/math/Eigen3f.java index b43731bad..b39c4e232 100644 --- a/jme3-core/src/main/java/com/jme3/math/Eigen3f.java +++ b/jme3-core/src/main/java/com/jme3/math/Eigen3f.java @@ -49,15 +49,15 @@ public class Eigen3f implements java.io.Serializable { public Eigen3f() { - + } public Eigen3f(Matrix3f data) { calculateEigen(data); } - public void calculateEigen(Matrix3f data) { - // prep work... + public void calculateEigen(Matrix3f data) { + // prep work... eigenVectors[0] = new Vector3f(); eigenVectors[1] = new Vector3f(); eigenVectors[2] = new Vector3f(); @@ -134,7 +134,7 @@ public class Eigen3f implements java.io.Serializable { eigenValues[i] *= maxMagnitude; } } - } + } /** * Scale the matrix so its entries are in [-1,1]. The scaling is applied diff --git a/jme3-core/src/main/java/com/jme3/math/Vector3f.java b/jme3-core/src/main/java/com/jme3/math/Vector3f.java index 04638ef2b..082f2c39e 100644 --- a/jme3-core/src/main/java/com/jme3/math/Vector3f.java +++ b/jme3-core/src/main/java/com/jme3/math/Vector3f.java @@ -71,7 +71,7 @@ public final class Vector3f implements Savable, Cloneable, java.io.Serializable Float.NEGATIVE_INFINITY); - /** + /** * the x value of the vector. */ public float x; diff --git a/jme3-core/src/main/java/com/jme3/opencl/AbstractOpenCLObject.java b/jme3-core/src/main/java/com/jme3/opencl/AbstractOpenCLObject.java index 2bb80cff7..2f602f757 100644 --- a/jme3-core/src/main/java/com/jme3/opencl/AbstractOpenCLObject.java +++ b/jme3-core/src/main/java/com/jme3/opencl/AbstractOpenCLObject.java @@ -45,7 +45,7 @@ public abstract class AbstractOpenCLObject implements OpenCLObject { @Override public AbstractOpenCLObject register() { OpenCLObjectManager.getInstance().registerObject(this); - return this; + return this; } @Override public void release() { diff --git a/jme3-core/src/main/java/com/jme3/opencl/MappingAccess.java b/jme3-core/src/main/java/com/jme3/opencl/MappingAccess.java index 121c6c8cb..bbf7d4df6 100644 --- a/jme3-core/src/main/java/com/jme3/opencl/MappingAccess.java +++ b/jme3-core/src/main/java/com/jme3/opencl/MappingAccess.java @@ -41,18 +41,18 @@ public enum MappingAccess { /** * Only read access is allowed to the mapped memory. */ - MAP_READ_ONLY, + MAP_READ_ONLY, /** * Only write access is allowed to the mapped memory. */ - MAP_WRITE_ONLY, + MAP_WRITE_ONLY, /** * Both read and write access is allowed. */ - MAP_READ_WRITE, + MAP_READ_WRITE, /** * The old memory content is completely discarded and the buffer is filled * completely with new data. This might be faster than {@link #MAP_WRITE_ONLY} */ - MAP_WRITE_INVALIDATE + MAP_WRITE_INVALIDATE } diff --git a/jme3-core/src/main/java/com/jme3/opencl/MemoryAccess.java b/jme3-core/src/main/java/com/jme3/opencl/MemoryAccess.java index d5071665e..13193b400 100644 --- a/jme3-core/src/main/java/com/jme3/opencl/MemoryAccess.java +++ b/jme3-core/src/main/java/com/jme3/opencl/MemoryAccess.java @@ -40,13 +40,13 @@ public enum MemoryAccess { /** * A kernel can both read and write the buffer. */ - READ_WRITE, + READ_WRITE, /** * A kernel can only write this buffer. */ - WRITE_ONLY, + WRITE_ONLY, /** * A kernel can only read this buffer */ - READ_ONLY + READ_ONLY } diff --git a/jme3-core/src/main/java/com/jme3/opencl/OpenCLObject.java b/jme3-core/src/main/java/com/jme3/opencl/OpenCLObject.java index d2a45077d..3b2a8a521 100644 --- a/jme3-core/src/main/java/com/jme3/opencl/OpenCLObject.java +++ b/jme3-core/src/main/java/com/jme3/opencl/OpenCLObject.java @@ -61,7 +61,7 @@ public interface OpenCLObject { ObjectReleaser getReleaser(); /** * Releases this native object. - * + * * Should delegate to {@code getReleaser().release()}. */ void release(); @@ -71,10 +71,10 @@ public interface OpenCLObject { * {@link OpenCLObjectManager}, you have to release it manually * by calling {@link #release() }. * Without registering or releasing, a memory leak might occur. - *
- * Returns {@code this} to allow calls like - * {@code Buffer buffer = clContext.createBuffer(1024).register();}. - * @return {@code this} + *
+ * Returns {@code this} to allow calls like + * {@code Buffer buffer = clContext.createBuffer(1024).register();}. + * @return {@code this} */ OpenCLObject register(); } diff --git a/jme3-core/src/main/java/com/jme3/renderer/Camera.java b/jme3-core/src/main/java/com/jme3/renderer/Camera.java index 79dd24059..873b3bccd 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/Camera.java +++ b/jme3-core/src/main/java/com/jme3/renderer/Camera.java @@ -287,14 +287,14 @@ public class Camera implements Savable, Cloneable { } } - /** - * This method copies the settings of the given camera. - * - * @param cam - * the camera we copy the settings from - */ + /** + * This method copies the settings of the given camera. + * + * @param cam + * the camera we copy the settings from + */ public void copyFrom(Camera cam) { - location.set(cam.location); + location.set(cam.location); rotation.set(cam.rotation); frustumNear = cam.frustumNear; diff --git a/jme3-core/src/main/java/com/jme3/texture/Image.java b/jme3-core/src/main/java/com/jme3/texture/Image.java index f7cee1b55..9e21f135f 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Image.java +++ b/jme3-core/src/main/java/com/jme3/texture/Image.java @@ -266,7 +266,7 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ { * half-precision floating point red, green, and blue. * * Requires {@link Caps#FloatTexture}. - * May be supported for renderbuffers, but the OpenGL specification does not require it. + * May be supported for renderbuffers, but the OpenGL specification does not require it. */ RGB16F(48,true), @@ -281,7 +281,7 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ { * single-precision floating point red, green, and blue. * * Requires {@link Caps#FloatTexture}. - * May be supported for renderbuffers, but the OpenGL specification does not require it. + * May be supported for renderbuffers, but the OpenGL specification does not require it. */ RGB32F(96,true), @@ -466,8 +466,8 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ { * Requires {@link Caps#IntegerTexture}. */ RGBA32UI(128), - - /** + + /** * half-precision floating point red. * * Requires {@link Caps#FloatTexture}. diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/ShowNormals.j3md b/jme3-core/src/main/resources/Common/MatDefs/Misc/ShowNormals.j3md index a21ffb50b..8972d7d9c 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/ShowNormals.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/ShowNormals.j3md @@ -17,6 +17,6 @@ MaterialDef Debug Normals { Defines { INSTANCING : UseInstancing - } + } } } \ No newline at end of file diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md b/jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md index f7887a5a1..b4710db62 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md @@ -2,7 +2,7 @@ MaterialDef Sky Plane { MaterialParameters { TextureCubeMap Texture Boolean SphereMap - Boolean EquirectMap + Boolean EquirectMap Vector3 NormalScale } Technique { @@ -17,7 +17,7 @@ MaterialDef Sky Plane { Defines { SPHERE_MAP : SphereMap - EQUIRECT_MAP : EquirectMap + EQUIRECT_MAP : EquirectMap } RenderState { diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/SoftParticle.frag b/jme3-core/src/main/resources/Common/MatDefs/Misc/SoftParticle.frag index 0277727f6..d6bb401ea 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/SoftParticle.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/SoftParticle.frag @@ -42,7 +42,7 @@ void main(){ float depthv = fetchTextureSample(m_DepthTexture, vPos, 0).x * 2.0 - 1.0; // Scene depth depthv *= projPos.y; float particleDepth = projPos.x; - + float zdiff = depthv - particleDepth; if(zdiff <= 0.0){ discard; diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md index 4c609dca8..30e626f02 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md @@ -161,8 +161,8 @@ MaterialDef Unshaded { PSSM : Splits POINTLIGHT : LightViewProjectionMatrix5 NUM_BONES : NumberOfBones - INSTANCING : UseInstancing - BACKFACE_SHADOWS: BackfaceShadows + INSTANCING : UseInstancing + BACKFACE_SHADOWS: BackfaceShadows NUM_MORPH_TARGETS: NumberOfMorphTargets NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers } @@ -190,7 +190,7 @@ MaterialDef Unshaded { HAS_GLOWMAP : GlowMap HAS_GLOWCOLOR : GlowColor NUM_BONES : NumberOfBones - INSTANCING : UseInstancing + INSTANCING : UseInstancing HAS_POINTSIZE : PointSize NUM_MORPH_TARGETS: NumberOfMorphTargets NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers diff --git a/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Basic/Mat3Vec3Mult100.frag b/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Basic/Mat3Vec3Mult100.frag index f1a29fd2c..3029f1d5f 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Basic/Mat3Vec3Mult100.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Basic/Mat3Vec3Mult100.frag @@ -1,3 +1,3 @@ void main(){ - outVector3 = matrix3 * vector3; + outVector3 = matrix3 * vector3; } diff --git a/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Common/Billboard100.frag b/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Common/Billboard100.frag index d85880760..a7fec2404 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Common/Billboard100.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Common/Billboard100.frag @@ -1,14 +1,14 @@ void main(){ - // First colunm. + // First colunm. worldViewMatrix[0][0] = scale; worldViewMatrix[0][1] = 0.0; worldViewMatrix[0][2] = 0.0; - + // Second colunm. worldViewMatrix[1][0] = 0.0; worldViewMatrix[1][1] = scale; worldViewMatrix[1][2] = 0.0; - + // Thrid colunm. worldViewMatrix[2][0] = 0.0; worldViewMatrix[2][1] = 0.0; diff --git a/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Misc/Dashed100.frag b/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Misc/Dashed100.frag index 4fa7babec..6e34a4c9c 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Misc/Dashed100.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Misc/Dashed100.frag @@ -1,8 +1,8 @@ void main(){ - startPos.xy = (startPos * 0.5 + 0.5).xy * resolution; - float len = distance(gl_FragCoord.xy,startPos.xy); - outColor = inColor; - float factor = float(int(len * 0.25)); + startPos.xy = (startPos * 0.5 + 0.5).xy * resolution; + float len = distance(gl_FragCoord.xy,startPos.xy); + outColor = inColor; + float factor = float(int(len * 0.25)); if(mod(factor, 2.0) > 0.0){ discard; } diff --git a/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Misc/PerspectiveDivide100.frag b/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Misc/PerspectiveDivide100.frag index 0e4f1d5be..1394457e6 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Misc/PerspectiveDivide100.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/ShaderNodes/Misc/PerspectiveDivide100.frag @@ -1,3 +1,3 @@ void main(){ - outVec = vec4(inVec.xyz / inVec.w,1.0); + outVec = vec4(inVec.xyz / inVec.w,1.0); } diff --git a/jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.j3md b/jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.j3md index ce588b60a..c3d0c51af 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.j3md @@ -31,7 +31,7 @@ MaterialDef Post Shadow { Float ShadowMapSize Boolean BackfaceShadows: false - + } Technique { diff --git a/jme3-core/src/plugins/java/com/jme3/asset/plugins/HttpZipLocator.java b/jme3-core/src/plugins/java/com/jme3/asset/plugins/HttpZipLocator.java index 7edda53e4..2db8d7e80 100644 --- a/jme3-core/src/plugins/java/com/jme3/asset/plugins/HttpZipLocator.java +++ b/jme3-core/src/plugins/java/com/jme3/asset/plugins/HttpZipLocator.java @@ -107,12 +107,12 @@ public class HttpZipLocator implements AssetLocator { } private static int get16(byte[] b, int off) { - return (b[off++] & 0xff) | + return (b[off++] & 0xff) | ((b[off] & 0xff) << 8); } private static int get32(byte[] b, int off) { - return (b[off++] & 0xff) | + return (b[off++] & 0xff) | ((b[off++] & 0xff) << 8) | ((b[off++] & 0xff) << 16) | ((b[off] & 0xff) << 24); @@ -246,13 +246,13 @@ public class HttpZipLocator implements AssetLocator { private void fillByteArray(byte[] array, InputStream source) throws IOException{ int total = 0; int length = array.length; - while (total < length) { - int read = source.read(array, total, length - total); + while (total < length) { + int read = source.read(array, total, length - total); if (read < 0) throw new IOException("Failed to read entire array"); - total += read; - } + total += read; + } } private void readCentralDirectory() throws IOException{ diff --git a/jme3-core/src/plugins/java/com/jme3/texture/plugins/HDRLoader.java b/jme3-core/src/plugins/java/com/jme3/texture/plugins/HDRLoader.java index 50f7fe5c0..27f2a4144 100644 --- a/jme3-core/src/plugins/java/com/jme3/texture/plugins/HDRLoader.java +++ b/jme3-core/src/plugins/java/com/jme3/texture/plugins/HDRLoader.java @@ -149,7 +149,7 @@ public class HDRLoader implements AssetLoader { rleTempBuffer = BufferUtils.createByteBuffer(width * 4); } - // read each component separately + // read each component separately for (int i = 0; i < 4; i++) { // read WIDTH bytes for the channel for (int j = 0; j < width;) { @@ -161,7 +161,7 @@ public class HDRLoader implements AssetLoader { rleTempBuffer.put( (j++) * 4 + i , (byte)val); //scanline[j++][i] = val; } - } else { // non-run + } else { // non-run while ((code--) != 0) { int val = in.read(); rleTempBuffer.put( (j++) * 4 + i, (byte)val); diff --git a/jme3-core/src/test/java/com/jme3/math/FastMathTest.java b/jme3-core/src/test/java/com/jme3/math/FastMathTest.java index e4aa1750a..2abe14e02 100644 --- a/jme3-core/src/test/java/com/jme3/math/FastMathTest.java +++ b/jme3-core/src/test/java/com/jme3/math/FastMathTest.java @@ -570,9 +570,9 @@ public class FastMathTest { @Test public void testInterpolateLinear_float() { assertEquals(0.0f, FastMath.interpolateLinear(2.0f, 2.93874e-39f, 0.0f), 0.0f); - assertEquals(0.0f, FastMath.interpolateLinear(0.999999f, 1.4013e-45f, 0.0f), 0.0f); - assertEquals(-2.93874e-39f, FastMath.interpolateLinear(0.0f, -2.93874e-39f, -0.0f), 0.0f); - assertEquals(0.0f, FastMath.interpolateLinear(0.0f, 0.0f, 0.0f), 0.0f); + assertEquals(0.0f, FastMath.interpolateLinear(0.999999f, 1.4013e-45f, 0.0f), 0.0f); + assertEquals(-2.93874e-39f, FastMath.interpolateLinear(0.0f, -2.93874e-39f, -0.0f), 0.0f); + assertEquals(0.0f, FastMath.interpolateLinear(0.0f, 0.0f, 0.0f), 0.0f); } @Test diff --git a/jme3-core/src/test/resources/bad-booleans1.j3md b/jme3-core/src/test/resources/bad-booleans1.j3md index a5a7ddf7c..dc909e9cc 100644 --- a/jme3-core/src/test/resources/bad-booleans1.j3md +++ b/jme3-core/src/test/resources/bad-booleans1.j3md @@ -161,8 +161,8 @@ MaterialDef bad-booleans1 { PSSM : Splits POINTLIGHT : LightViewProjectionMatrix5 NUM_BONES : NumberOfBones - INSTANCING : UseInstancing - BACKFACE_SHADOWS: BackfaceShadows + INSTANCING : UseInstancing + BACKFACE_SHADOWS: BackfaceShadows NUM_MORPH_TARGETS: NumberOfMorphTargets NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers } @@ -190,7 +190,7 @@ MaterialDef bad-booleans1 { HAS_GLOWMAP : GlowMap HAS_GLOWCOLOR : GlowColor NUM_BONES : NumberOfBones - INSTANCING : UseInstancing + INSTANCING : UseInstancing HAS_POINTSIZE : PointSize NUM_MORPH_TARGETS: NumberOfMorphTargets NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers diff --git a/jme3-core/src/test/resources/bad-booleans2.j3md b/jme3-core/src/test/resources/bad-booleans2.j3md index 0732d3cc7..c36398f4c 100644 --- a/jme3-core/src/test/resources/bad-booleans2.j3md +++ b/jme3-core/src/test/resources/bad-booleans2.j3md @@ -161,8 +161,8 @@ MaterialDef bad-booleans2 { PSSM : Splits POINTLIGHT : LightViewProjectionMatrix5 NUM_BONES : NumberOfBones - INSTANCING : UseInstancing - BACKFACE_SHADOWS: BackfaceShadows + INSTANCING : UseInstancing + BACKFACE_SHADOWS: BackfaceShadows NUM_MORPH_TARGETS: NumberOfMorphTargets NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers } @@ -190,7 +190,7 @@ MaterialDef bad-booleans2 { HAS_GLOWMAP : GlowMap HAS_GLOWCOLOR : GlowColor NUM_BONES : NumberOfBones - INSTANCING : UseInstancing + INSTANCING : UseInstancing HAS_POINTSIZE : PointSize NUM_MORPH_TARGETS: NumberOfMorphTargets NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers diff --git a/jme3-core/src/test/resources/bad-booleans3.j3md b/jme3-core/src/test/resources/bad-booleans3.j3md index 8fda309da..0410e0320 100644 --- a/jme3-core/src/test/resources/bad-booleans3.j3md +++ b/jme3-core/src/test/resources/bad-booleans3.j3md @@ -162,8 +162,8 @@ MaterialDef bad-booleans3 { PSSM : Splits POINTLIGHT : LightViewProjectionMatrix5 NUM_BONES : NumberOfBones - INSTANCING : UseInstancing - BACKFACE_SHADOWS: BackfaceShadows + INSTANCING : UseInstancing + BACKFACE_SHADOWS: BackfaceShadows NUM_MORPH_TARGETS: NumberOfMorphTargets NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers } @@ -191,7 +191,7 @@ MaterialDef bad-booleans3 { HAS_GLOWMAP : GlowMap HAS_GLOWCOLOR : GlowColor NUM_BONES : NumberOfBones - INSTANCING : UseInstancing + INSTANCING : UseInstancing HAS_POINTSIZE : PointSize NUM_MORPH_TARGETS: NumberOfMorphTargets NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers diff --git a/jme3-core/src/tools/java/jme3tools/optimize/LodGenerator.java b/jme3-core/src/tools/java/jme3tools/optimize/LodGenerator.java index 5b2ee6fd8..cc01dd0f3 100644 --- a/jme3-core/src/tools/java/jme3tools/optimize/LodGenerator.java +++ b/jme3-core/src/tools/java/jme3tools/optimize/LodGenerator.java @@ -622,7 +622,7 @@ public class LodGenerator { VertexBuffer indexBuffer = mesh.getBuffer(VertexBuffer.Type.Index); boolean isShortBuffer = indexBuffer.getFormat() == VertexBuffer.Format.UnsignedShort; - // Create buffers. + // Create buffers. VertexBuffer lodBuffer = new VertexBuffer(VertexBuffer.Type.Index); int bufsize = indexCount == 0 ? 3 : indexCount; @@ -978,7 +978,7 @@ public class LodGenerator { } else { // TODO: Find out why is this needed. assertOutdatedCollapseCost() fails on some - // rare situations without this. For example goblin.mesh fails. + // rare situations without this. For example goblin.mesh fails. //Treeset to have an ordered list with unique values SortedSet updatable = new TreeSet(collapseComparator);