elimiate incidental hard tabs from jme3-core
This commit is contained in:
parent
b613be35fa
commit
51022fd521
@ -89,7 +89,7 @@ public final class BoneTrack implements JmeCloneable, Track {
|
|||||||
* @param scales the scale of the bone for each frame
|
* @param scales the scale of the bone for each frame
|
||||||
*/
|
*/
|
||||||
public BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) {
|
public BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) {
|
||||||
this.targetBoneIndex = targetBoneIndex;
|
this.targetBoneIndex = targetBoneIndex;
|
||||||
this.setKeyframes(times, translations, rotations, scales);
|
this.setKeyframes(times, translations, rotations, scales);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -726,7 +726,7 @@ public class LegacyApplication implements Application, SystemListener {
|
|||||||
* Runs tasks enqueued via {@link #enqueue(Callable)}
|
* Runs tasks enqueued via {@link #enqueue(Callable)}
|
||||||
*/
|
*/
|
||||||
protected void runQueuedTasks() {
|
protected void runQueuedTasks() {
|
||||||
AppTask<?> task;
|
AppTask<?> task;
|
||||||
while( (task = taskQueue.poll()) != null ) {
|
while( (task = taskQueue.poll()) != null ) {
|
||||||
if (!task.isCancelled()) {
|
if (!task.isCancelled()) {
|
||||||
task.invoke();
|
task.invoke();
|
||||||
|
@ -150,24 +150,24 @@ public class BoundingSphere extends BoundingVolume {
|
|||||||
// * <code>computeFromTris</code> creates a new Bounding Box from a given
|
// * <code>computeFromTris</code> creates a new Bounding Box from a given
|
||||||
// * set of triangles. It is used in OBBTree calculations.
|
// * set of triangles. It is used in OBBTree calculations.
|
||||||
// *
|
// *
|
||||||
// * @param indices
|
// * @param indices
|
||||||
// * @param mesh
|
// * @param mesh
|
||||||
// * @param start
|
// * @param start
|
||||||
// * @param end
|
// * @param end
|
||||||
// */
|
// */
|
||||||
// public void computeFromTris(int[] indices, Mesh mesh, int start, int end) {
|
// public void computeFromTris(int[] indices, Mesh mesh, int start, int end) {
|
||||||
// if (end - start <= 0) {
|
// if (end - start <= 0) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// Vector3f[] vertList = new Vector3f[(end - start) * 3];
|
// Vector3f[] vertList = new Vector3f[(end - start) * 3];
|
||||||
//
|
//
|
||||||
// int count = 0;
|
// int count = 0;
|
||||||
// for (int i = start; i < end; i++) {
|
// for (int i = start; i < end; i++) {
|
||||||
// mesh.getTriangle(indices[i], verts);
|
// mesh.getTriangle(indices[i], verts);
|
||||||
// vertList[count++] = new Vector3f(verts[0]);
|
// vertList[count++] = new Vector3f(verts[0]);
|
||||||
// vertList[count++] = new Vector3f(verts[1]);
|
// vertList[count++] = new Vector3f(verts[1]);
|
||||||
// vertList[count++] = new Vector3f(verts[2]);
|
// vertList[count++] = new Vector3f(verts[2]);
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// averagePoints(vertList);
|
// averagePoints(vertList);
|
||||||
@ -492,7 +492,7 @@ public class BoundingSphere extends BoundingVolume {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// case OBB: {
|
// case OBB: {
|
||||||
// OrientedBoundingBox box = (OrientedBoundingBox) volume;
|
// OrientedBoundingBox box = (OrientedBoundingBox) volume;
|
||||||
// BoundingSphere rVal = (BoundingSphere) this.clone(null);
|
// BoundingSphere rVal = (BoundingSphere) this.clone(null);
|
||||||
// return rVal.mergeOBB(box);
|
// return rVal.mergeOBB(box);
|
||||||
// }
|
// }
|
||||||
@ -539,7 +539,7 @@ public class BoundingSphere extends BoundingVolume {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// case OBB: {
|
// case OBB: {
|
||||||
// return mergeOBB((OrientedBoundingBox) volume);
|
// return mergeOBB((OrientedBoundingBox) volume);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -284,7 +284,7 @@ public abstract class BoundingVolume implements Savable, Cloneable, Collidable {
|
|||||||
* the bounding box to test against.
|
* the bounding box to test against.
|
||||||
* @return true if this volume intersects the given bounding box.
|
* @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.
|
* 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,
|
// private boolean axisTestX01(float a, float b, float fa, float fb,
|
||||||
// Vector3f center, Vector3f ext,
|
// Vector3f center, Vector3f ext,
|
||||||
// Vector3f v1, Vector3f v2, Vector3f v3){
|
// Vector3f v1, Vector3f v2, Vector3f v3){
|
||||||
// float p0 = a * v0.y - b * v0.z;
|
// float p0 = a * v0.y - b * v0.z;
|
||||||
// float p2 = a * v2.y - b * v2.z;
|
// float p2 = a * v2.y - b * v2.z;
|
||||||
// if(p0 < p2){
|
// if(p0 < p2){
|
||||||
// min = p0;
|
// min = p0;
|
||||||
// max = p2;
|
// max = p2;
|
||||||
@ -130,8 +130,8 @@ public final class Intersection {
|
|||||||
// min = p2;
|
// min = p2;
|
||||||
// max = p0;
|
// max = p0;
|
||||||
// }
|
// }
|
||||||
// float rad = fa * boxhalfsize.y + fb * boxhalfsize.z;
|
// float rad = fa * boxhalfsize.y + fb * boxhalfsize.z;
|
||||||
// if(min > rad || max < -rad)
|
// if(min > rad || max < -rad)
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
public static boolean intersect(BoundingBox bbox, Vector3f v1, Vector3f v2, Vector3f v3) {
|
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 max = _compVect2.set(new Vector3f(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY));
|
||||||
//// Vector3f point;
|
//// Vector3f point;
|
||||||
//// for (int i = start; i < end; i++) {
|
//// for (int i = start; i < end; i++) {
|
||||||
//// mesh.getTriangle(indices[i], verts);
|
//// mesh.getTriangle(indices[i], verts);
|
||||||
//// point = verts[0];
|
//// point = verts[0];
|
||||||
//// if (point.x < min.x)
|
//// if (point.x < min.x)
|
||||||
//// min.x = point.x;
|
//// min.x = point.x;
|
||||||
|
@ -72,7 +72,7 @@ public class DefaultParticleInfluencer implements ParticleInfluencer {
|
|||||||
* the particle to be affected
|
* the particle to be affected
|
||||||
*/
|
*/
|
||||||
protected void applyVelocityVariation(Particle particle) {
|
protected void applyVelocityVariation(Particle particle) {
|
||||||
particle.velocity.set(initialVelocity);
|
particle.velocity.set(initialVelocity);
|
||||||
temp.set(FastMath.nextRandomFloat(), FastMath.nextRandomFloat(), FastMath.nextRandomFloat());
|
temp.set(FastMath.nextRandomFloat(), FastMath.nextRandomFloat(), FastMath.nextRandomFloat());
|
||||||
temp.multLocal(2f);
|
temp.multLocal(2f);
|
||||||
temp.subtractLocal(1f, 1f, 1f);
|
temp.subtractLocal(1f, 1f, 1f);
|
||||||
|
@ -46,7 +46,7 @@ import java.util.regex.Pattern;
|
|||||||
*/
|
*/
|
||||||
class ColorTags {
|
class ColorTags {
|
||||||
private static final Pattern colorPattern = Pattern.compile("\\\\#([0-9a-fA-F]{8})#|\\\\#([0-9a-fA-F]{6})#|" +
|
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 LinkedList<Range> colors = new LinkedList<Range>();
|
||||||
private String text;
|
private String text;
|
||||||
private String original;
|
private String original;
|
||||||
|
@ -56,8 +56,8 @@ public class Eigen3f implements java.io.Serializable {
|
|||||||
calculateEigen(data);
|
calculateEigen(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void calculateEigen(Matrix3f data) {
|
public void calculateEigen(Matrix3f data) {
|
||||||
// prep work...
|
// prep work...
|
||||||
eigenVectors[0] = new Vector3f();
|
eigenVectors[0] = new Vector3f();
|
||||||
eigenVectors[1] = new Vector3f();
|
eigenVectors[1] = new Vector3f();
|
||||||
eigenVectors[2] = new Vector3f();
|
eigenVectors[2] = new Vector3f();
|
||||||
@ -134,7 +134,7 @@ public class Eigen3f implements java.io.Serializable {
|
|||||||
eigenValues[i] *= maxMagnitude;
|
eigenValues[i] *= maxMagnitude;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scale the matrix so its entries are in [-1,1]. The scaling is applied
|
* 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);
|
Float.NEGATIVE_INFINITY);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the x value of the vector.
|
* the x value of the vector.
|
||||||
*/
|
*/
|
||||||
public float x;
|
public float x;
|
||||||
|
@ -45,7 +45,7 @@ public abstract class AbstractOpenCLObject implements OpenCLObject {
|
|||||||
@Override
|
@Override
|
||||||
public AbstractOpenCLObject register() {
|
public AbstractOpenCLObject register() {
|
||||||
OpenCLObjectManager.getInstance().registerObject(this);
|
OpenCLObjectManager.getInstance().registerObject(this);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void release() {
|
public void release() {
|
||||||
|
@ -41,18 +41,18 @@ public enum MappingAccess {
|
|||||||
/**
|
/**
|
||||||
* Only read access is allowed to the mapped memory.
|
* Only read access is allowed to the mapped memory.
|
||||||
*/
|
*/
|
||||||
MAP_READ_ONLY,
|
MAP_READ_ONLY,
|
||||||
/**
|
/**
|
||||||
* Only write access is allowed to the mapped memory.
|
* Only write access is allowed to the mapped memory.
|
||||||
*/
|
*/
|
||||||
MAP_WRITE_ONLY,
|
MAP_WRITE_ONLY,
|
||||||
/**
|
/**
|
||||||
* Both read and write access is allowed.
|
* 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
|
* 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}
|
* 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.
|
* A kernel can both read and write the buffer.
|
||||||
*/
|
*/
|
||||||
READ_WRITE,
|
READ_WRITE,
|
||||||
/**
|
/**
|
||||||
* A kernel can only write this buffer.
|
* A kernel can only write this buffer.
|
||||||
*/
|
*/
|
||||||
WRITE_ONLY,
|
WRITE_ONLY,
|
||||||
/**
|
/**
|
||||||
* A kernel can only read this buffer
|
* A kernel can only read this buffer
|
||||||
*/
|
*/
|
||||||
READ_ONLY
|
READ_ONLY
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public interface OpenCLObject {
|
|||||||
ObjectReleaser getReleaser();
|
ObjectReleaser getReleaser();
|
||||||
/**
|
/**
|
||||||
* Releases this native object.
|
* Releases this native object.
|
||||||
*
|
*
|
||||||
* Should delegate to {@code getReleaser().release()}.
|
* Should delegate to {@code getReleaser().release()}.
|
||||||
*/
|
*/
|
||||||
void release();
|
void release();
|
||||||
@ -71,10 +71,10 @@ public interface OpenCLObject {
|
|||||||
* {@link OpenCLObjectManager}, you have to release it manually
|
* {@link OpenCLObjectManager}, you have to release it manually
|
||||||
* by calling {@link #release() }.
|
* by calling {@link #release() }.
|
||||||
* Without registering or releasing, a memory leak might occur.
|
* Without registering or releasing, a memory leak might occur.
|
||||||
* <br>
|
* <br>
|
||||||
* Returns {@code this} to allow calls like
|
* Returns {@code this} to allow calls like
|
||||||
* {@code Buffer buffer = clContext.createBuffer(1024).register();}.
|
* {@code Buffer buffer = clContext.createBuffer(1024).register();}.
|
||||||
* @return {@code this}
|
* @return {@code this}
|
||||||
*/
|
*/
|
||||||
OpenCLObject register();
|
OpenCLObject register();
|
||||||
}
|
}
|
||||||
|
@ -287,14 +287,14 @@ public class Camera implements Savable, Cloneable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method copies the settings of the given camera.
|
* This method copies the settings of the given camera.
|
||||||
*
|
*
|
||||||
* @param cam
|
* @param cam
|
||||||
* the camera we copy the settings from
|
* the camera we copy the settings from
|
||||||
*/
|
*/
|
||||||
public void copyFrom(Camera cam) {
|
public void copyFrom(Camera cam) {
|
||||||
location.set(cam.location);
|
location.set(cam.location);
|
||||||
rotation.set(cam.rotation);
|
rotation.set(cam.rotation);
|
||||||
|
|
||||||
frustumNear = cam.frustumNear;
|
frustumNear = cam.frustumNear;
|
||||||
|
@ -266,7 +266,7 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ {
|
|||||||
* half-precision floating point red, green, and blue.
|
* half-precision floating point red, green, and blue.
|
||||||
*
|
*
|
||||||
* Requires {@link Caps#FloatTexture}.
|
* 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),
|
RGB16F(48,true),
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ {
|
|||||||
* single-precision floating point red, green, and blue.
|
* single-precision floating point red, green, and blue.
|
||||||
*
|
*
|
||||||
* Requires {@link Caps#FloatTexture}.
|
* 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),
|
RGB32F(96,true),
|
||||||
|
|
||||||
@ -467,7 +467,7 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ {
|
|||||||
*/
|
*/
|
||||||
RGBA32UI(128),
|
RGBA32UI(128),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* half-precision floating point red.
|
* half-precision floating point red.
|
||||||
*
|
*
|
||||||
* Requires {@link Caps#FloatTexture}.
|
* Requires {@link Caps#FloatTexture}.
|
||||||
|
@ -17,6 +17,6 @@ MaterialDef Debug Normals {
|
|||||||
|
|
||||||
Defines {
|
Defines {
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,7 +2,7 @@ MaterialDef Sky Plane {
|
|||||||
MaterialParameters {
|
MaterialParameters {
|
||||||
TextureCubeMap Texture
|
TextureCubeMap Texture
|
||||||
Boolean SphereMap
|
Boolean SphereMap
|
||||||
Boolean EquirectMap
|
Boolean EquirectMap
|
||||||
Vector3 NormalScale
|
Vector3 NormalScale
|
||||||
}
|
}
|
||||||
Technique {
|
Technique {
|
||||||
@ -17,7 +17,7 @@ MaterialDef Sky Plane {
|
|||||||
|
|
||||||
Defines {
|
Defines {
|
||||||
SPHERE_MAP : SphereMap
|
SPHERE_MAP : SphereMap
|
||||||
EQUIRECT_MAP : EquirectMap
|
EQUIRECT_MAP : EquirectMap
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderState {
|
RenderState {
|
||||||
|
@ -161,8 +161,8 @@ MaterialDef Unshaded {
|
|||||||
PSSM : Splits
|
PSSM : Splits
|
||||||
POINTLIGHT : LightViewProjectionMatrix5
|
POINTLIGHT : LightViewProjectionMatrix5
|
||||||
NUM_BONES : NumberOfBones
|
NUM_BONES : NumberOfBones
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
BACKFACE_SHADOWS: BackfaceShadows
|
BACKFACE_SHADOWS: BackfaceShadows
|
||||||
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
||||||
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ MaterialDef Unshaded {
|
|||||||
HAS_GLOWMAP : GlowMap
|
HAS_GLOWMAP : GlowMap
|
||||||
HAS_GLOWCOLOR : GlowColor
|
HAS_GLOWCOLOR : GlowColor
|
||||||
NUM_BONES : NumberOfBones
|
NUM_BONES : NumberOfBones
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
HAS_POINTSIZE : PointSize
|
HAS_POINTSIZE : PointSize
|
||||||
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
||||||
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
void main(){
|
void main(){
|
||||||
outVector3 = matrix3 * vector3;
|
outVector3 = matrix3 * vector3;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
void main(){
|
void main(){
|
||||||
// First colunm.
|
// First colunm.
|
||||||
worldViewMatrix[0][0] = scale;
|
worldViewMatrix[0][0] = scale;
|
||||||
worldViewMatrix[0][1] = 0.0;
|
worldViewMatrix[0][1] = 0.0;
|
||||||
worldViewMatrix[0][2] = 0.0;
|
worldViewMatrix[0][2] = 0.0;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
void main(){
|
void main(){
|
||||||
startPos.xy = (startPos * 0.5 + 0.5).xy * resolution;
|
startPos.xy = (startPos * 0.5 + 0.5).xy * resolution;
|
||||||
float len = distance(gl_FragCoord.xy,startPos.xy);
|
float len = distance(gl_FragCoord.xy,startPos.xy);
|
||||||
outColor = inColor;
|
outColor = inColor;
|
||||||
float factor = float(int(len * 0.25));
|
float factor = float(int(len * 0.25));
|
||||||
if(mod(factor, 2.0) > 0.0){
|
if(mod(factor, 2.0) > 0.0){
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
void main(){
|
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) {
|
private static int get16(byte[] b, int off) {
|
||||||
return (b[off++] & 0xff) |
|
return (b[off++] & 0xff) |
|
||||||
((b[off] & 0xff) << 8);
|
((b[off] & 0xff) << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int get32(byte[] b, int off) {
|
private static int get32(byte[] b, int off) {
|
||||||
return (b[off++] & 0xff) |
|
return (b[off++] & 0xff) |
|
||||||
((b[off++] & 0xff) << 8) |
|
((b[off++] & 0xff) << 8) |
|
||||||
((b[off++] & 0xff) << 16) |
|
((b[off++] & 0xff) << 16) |
|
||||||
((b[off] & 0xff) << 24);
|
((b[off] & 0xff) << 24);
|
||||||
@ -246,13 +246,13 @@ public class HttpZipLocator implements AssetLocator {
|
|||||||
private void fillByteArray(byte[] array, InputStream source) throws IOException{
|
private void fillByteArray(byte[] array, InputStream source) throws IOException{
|
||||||
int total = 0;
|
int total = 0;
|
||||||
int length = array.length;
|
int length = array.length;
|
||||||
while (total < length) {
|
while (total < length) {
|
||||||
int read = source.read(array, total, length - total);
|
int read = source.read(array, total, length - total);
|
||||||
if (read < 0)
|
if (read < 0)
|
||||||
throw new IOException("Failed to read entire array");
|
throw new IOException("Failed to read entire array");
|
||||||
|
|
||||||
total += read;
|
total += read;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readCentralDirectory() throws IOException{
|
private void readCentralDirectory() throws IOException{
|
||||||
|
@ -149,7 +149,7 @@ public class HDRLoader implements AssetLoader {
|
|||||||
rleTempBuffer = BufferUtils.createByteBuffer(width * 4);
|
rleTempBuffer = BufferUtils.createByteBuffer(width * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
// read each component separately
|
// read each component separately
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
// read WIDTH bytes for the channel
|
// read WIDTH bytes for the channel
|
||||||
for (int j = 0; j < width;) {
|
for (int j = 0; j < width;) {
|
||||||
@ -161,7 +161,7 @@ public class HDRLoader implements AssetLoader {
|
|||||||
rleTempBuffer.put( (j++) * 4 + i , (byte)val);
|
rleTempBuffer.put( (j++) * 4 + i , (byte)val);
|
||||||
//scanline[j++][i] = val;
|
//scanline[j++][i] = val;
|
||||||
}
|
}
|
||||||
} else { // non-run
|
} else { // non-run
|
||||||
while ((code--) != 0) {
|
while ((code--) != 0) {
|
||||||
int val = in.read();
|
int val = in.read();
|
||||||
rleTempBuffer.put( (j++) * 4 + i, (byte)val);
|
rleTempBuffer.put( (j++) * 4 + i, (byte)val);
|
||||||
|
@ -570,9 +570,9 @@ public class FastMathTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testInterpolateLinear_float() {
|
public void testInterpolateLinear_float() {
|
||||||
assertEquals(0.0f, FastMath.interpolateLinear(2.0f, 2.93874e-39f, 0.0f), 0.0f);
|
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(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(-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.0f, 0.0f, 0.0f), 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -161,8 +161,8 @@ MaterialDef bad-booleans1 {
|
|||||||
PSSM : Splits
|
PSSM : Splits
|
||||||
POINTLIGHT : LightViewProjectionMatrix5
|
POINTLIGHT : LightViewProjectionMatrix5
|
||||||
NUM_BONES : NumberOfBones
|
NUM_BONES : NumberOfBones
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
BACKFACE_SHADOWS: BackfaceShadows
|
BACKFACE_SHADOWS: BackfaceShadows
|
||||||
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
||||||
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ MaterialDef bad-booleans1 {
|
|||||||
HAS_GLOWMAP : GlowMap
|
HAS_GLOWMAP : GlowMap
|
||||||
HAS_GLOWCOLOR : GlowColor
|
HAS_GLOWCOLOR : GlowColor
|
||||||
NUM_BONES : NumberOfBones
|
NUM_BONES : NumberOfBones
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
HAS_POINTSIZE : PointSize
|
HAS_POINTSIZE : PointSize
|
||||||
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
||||||
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
||||||
|
@ -161,8 +161,8 @@ MaterialDef bad-booleans2 {
|
|||||||
PSSM : Splits
|
PSSM : Splits
|
||||||
POINTLIGHT : LightViewProjectionMatrix5
|
POINTLIGHT : LightViewProjectionMatrix5
|
||||||
NUM_BONES : NumberOfBones
|
NUM_BONES : NumberOfBones
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
BACKFACE_SHADOWS: BackfaceShadows
|
BACKFACE_SHADOWS: BackfaceShadows
|
||||||
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
||||||
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ MaterialDef bad-booleans2 {
|
|||||||
HAS_GLOWMAP : GlowMap
|
HAS_GLOWMAP : GlowMap
|
||||||
HAS_GLOWCOLOR : GlowColor
|
HAS_GLOWCOLOR : GlowColor
|
||||||
NUM_BONES : NumberOfBones
|
NUM_BONES : NumberOfBones
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
HAS_POINTSIZE : PointSize
|
HAS_POINTSIZE : PointSize
|
||||||
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
||||||
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
||||||
|
@ -162,8 +162,8 @@ MaterialDef bad-booleans3 {
|
|||||||
PSSM : Splits
|
PSSM : Splits
|
||||||
POINTLIGHT : LightViewProjectionMatrix5
|
POINTLIGHT : LightViewProjectionMatrix5
|
||||||
NUM_BONES : NumberOfBones
|
NUM_BONES : NumberOfBones
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
BACKFACE_SHADOWS: BackfaceShadows
|
BACKFACE_SHADOWS: BackfaceShadows
|
||||||
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
||||||
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ MaterialDef bad-booleans3 {
|
|||||||
HAS_GLOWMAP : GlowMap
|
HAS_GLOWMAP : GlowMap
|
||||||
HAS_GLOWCOLOR : GlowColor
|
HAS_GLOWCOLOR : GlowColor
|
||||||
NUM_BONES : NumberOfBones
|
NUM_BONES : NumberOfBones
|
||||||
INSTANCING : UseInstancing
|
INSTANCING : UseInstancing
|
||||||
HAS_POINTSIZE : PointSize
|
HAS_POINTSIZE : PointSize
|
||||||
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
NUM_MORPH_TARGETS: NumberOfMorphTargets
|
||||||
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user