elimiate incidental hard tabs from jme3-core
This commit is contained in:
parent
1acd1d299a
commit
efc9c443de
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -148,24 +148,24 @@ public class BoundingSphere extends BoundingVolume {
|
||||
// * <code>computeFromTris</code> 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:
|
||||
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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<Range> colors = new LinkedList<Range>();
|
||||
private String text;
|
||||
private String original;
|
||||
|
@ -56,8 +56,8 @@ public class Eigen3f implements java.io.Serializable {
|
||||
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
|
||||
|
@ -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;
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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.
|
||||
* <br>
|
||||
* Returns {@code this} to allow calls like
|
||||
* {@code Buffer buffer = clContext.createBuffer(1024).register();}.
|
||||
* @return {@code this}
|
||||
* <br>
|
||||
* Returns {@code this} to allow calls like
|
||||
* {@code Buffer buffer = clContext.createBuffer(1024).register();}.
|
||||
* @return {@code this}
|
||||
*/
|
||||
OpenCLObject register();
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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),
|
||||
|
||||
@ -467,7 +467,7 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ {
|
||||
*/
|
||||
RGBA32UI(128),
|
||||
|
||||
/**
|
||||
/**
|
||||
* half-precision floating point red.
|
||||
*
|
||||
* Requires {@link Caps#FloatTexture}.
|
||||
|
@ -17,6 +17,6 @@ MaterialDef Debug Normals {
|
||||
|
||||
Defines {
|
||||
INSTANCING : UseInstancing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,3 @@
|
||||
void main(){
|
||||
outVector3 = matrix3 * vector3;
|
||||
outVector3 = matrix3 * vector3;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
void main(){
|
||||
// First colunm.
|
||||
// First colunm.
|
||||
worldViewMatrix[0][0] = scale;
|
||||
worldViewMatrix[0][1] = 0.0;
|
||||
worldViewMatrix[0][2] = 0.0;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
void main(){
|
||||
outVec = vec4(inVec.xyz / inVec.w,1.0);
|
||||
outVec = vec4(inVec.xyz / inVec.w,1.0);
|
||||
}
|
||||
|
@ -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{
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user