more comment corrections in jme3-core: mostly spelling and grammar
This commit is contained in:
parent
81ba0d7249
commit
739831142e
@ -15,7 +15,7 @@ import java.lang.annotation.Target;
|
|||||||
* annotations of the same name at a single location.
|
* annotations of the same name at a single location.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* <!-- is a hack that prevents @ from being the first charater on the line, which confuses Javadoc -->
|
* <!-- is a hack that prevents @ from being the first character on the line, which confuses Javadoc -->
|
||||||
* <code><pre>
|
* <code><pre>
|
||||||
* @DefaultQualifiers({
|
* @DefaultQualifiers({
|
||||||
* @DefaultQualifier("NonNull"),
|
* @DefaultQualifier("NonNull"),
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -186,7 +186,7 @@ public abstract class CompactArray<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retrun an array of indices for the given objects
|
* Return an array of indices for the given objects
|
||||||
* @param objArray
|
* @param objArray
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -52,8 +52,8 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* EffectTrack is a track to add to an existing animation, to emit particles
|
* EffectTrack is a track to add to an existing animation, to emit particles
|
||||||
* during animations for example : exhausts, dust raised by foot steps, shock
|
* during animations for example: exhaust, dust raised by footsteps, shock
|
||||||
* waves, lightnings etc...
|
* waves, lightning, etc...
|
||||||
*
|
*
|
||||||
* usage is
|
* usage is
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -62,9 +62,9 @@ import java.util.logging.Logger;
|
|||||||
* control.getAnim("TheAnim").addTrack(track);
|
* control.getAnim("TheAnim").addTrack(track);
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* if the emitter has emits 0 particles per seconds emmitAllPArticles will be
|
* if the emitter emits 0 particles per second, emitAllPArticles will be
|
||||||
* called on it at time 0 + startOffset. if it he it has more it will start
|
* called on it at time 0 + startOffset. if it has more it will start
|
||||||
* emit normally at time 0 + startOffset.
|
* emitting normally at time 0 + startOffset.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Nehon
|
* @author Nehon
|
||||||
@ -430,7 +430,7 @@ public class EffectTrack implements ClonableTrack {
|
|||||||
*/
|
*/
|
||||||
public void write(JmeExporter ex) throws IOException {
|
public void write(JmeExporter ex) throws IOException {
|
||||||
OutputCapsule out = ex.getCapsule(this);
|
OutputCapsule out = ex.getCapsule(this);
|
||||||
//reseting the particle emission rate on the emitter before saving.
|
//reset the particle emission rate on the emitter before saving.
|
||||||
emitter.setParticlesPerSec(particlesPerSeconds);
|
emitter.setParticlesPerSec(particlesPerSeconds);
|
||||||
out.write(emitter, "emitter", null);
|
out.write(emitter, "emitter", null);
|
||||||
out.write(particlesPerSeconds, "particlesPerSeconds", 0);
|
out.write(particlesPerSeconds, "particlesPerSeconds", 0);
|
||||||
|
@ -53,7 +53,7 @@ public final class Skeleton implements Savable, JmeCloneable {
|
|||||||
private Bone[] boneList;
|
private Bone[] boneList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains the skinning matrices, multiplying it by a vertex effected by a bone
|
* Contains the skinning matrices, multiplying it by a vertex affected by a bone
|
||||||
* will cause it to go to the animated position.
|
* will cause it to go to the animated position.
|
||||||
*/
|
*/
|
||||||
private transient Matrix4f[] skinningMatrixes;
|
private transient Matrix4f[] skinningMatrixes;
|
||||||
|
@ -331,7 +331,7 @@ public class SkeletonControl extends AbstractControl implements Cloneable, JmeCl
|
|||||||
bpb.clear();
|
bpb.clear();
|
||||||
bnb.clear();
|
bnb.clear();
|
||||||
|
|
||||||
//reseting bind tangents if there is a bind tangent buffer
|
//reset bind tangents if there is a bind tangent buffer
|
||||||
VertexBuffer bindTangents = mesh.getBuffer(Type.BindPoseTangent);
|
VertexBuffer bindTangents = mesh.getBuffer(Type.BindPoseTangent);
|
||||||
if (bindTangents != null) {
|
if (bindTangents != null) {
|
||||||
VertexBuffer tangents = mesh.getBuffer(Type.Tangent);
|
VertexBuffer tangents = mesh.getBuffer(Type.Tangent);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012, 2016 jMonkeyEngine
|
* Copyright (c) 2009-2012, 2016, 2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -221,7 +221,7 @@ public class AudioNode extends Node implements AudioSource {
|
|||||||
/**
|
/**
|
||||||
* Start playing an instance of this audio. This method can be used
|
* Start playing an instance of this audio. This method can be used
|
||||||
* to play the same <code>AudioNode</code> multiple times. Note
|
* to play the same <code>AudioNode</code> multiple times. Note
|
||||||
* that changes to the parameters of this AudioNode will not effect the
|
* that changes to the parameters of this AudioNode will not affect the
|
||||||
* instances already playing.
|
* instances already playing.
|
||||||
*/
|
*/
|
||||||
public void playInstance(){
|
public void playInstance(){
|
||||||
@ -692,7 +692,7 @@ public class AudioNode extends Node implements AudioSource {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the audio node as positional.
|
* Set the audio node as positional.
|
||||||
* The position, velocity, and distance parameters effect positional
|
* The position, velocity, and distance parameters affect positional
|
||||||
* audio nodes. Set to false if the audio node should play in "headspace".
|
* audio nodes. Set to false if the audio node should play in "headspace".
|
||||||
*
|
*
|
||||||
* @param positional True if the audio node should be positional, otherwise
|
* @param positional True if the audio node should be positional, otherwise
|
||||||
|
@ -79,7 +79,7 @@ public interface AL {
|
|||||||
/**
|
/**
|
||||||
* Indicate the gain (volume amplification) applied. Type: ALfloat. Range:
|
* Indicate the gain (volume amplification) applied. Type: ALfloat. Range:
|
||||||
* ]0.0- ] A value of 1.0 means un-attenuated/unchanged. Each division by 2
|
* ]0.0- ] A value of 1.0 means un-attenuated/unchanged. Each division by 2
|
||||||
* equals an attenuation of -6dB. Each multiplicaton with 2 equals an
|
* equals an attenuation of -6dB. Each multiplication by 2 equals an
|
||||||
* amplification of +6dB. A value of 0.0 is meaningless with respect to a
|
* amplification of +6dB. A value of 0.0 is meaningless with respect to a
|
||||||
* logarithmic scale; it is interpreted as zero volume - the channel is
|
* logarithmic scale; it is interpreted as zero volume - the channel is
|
||||||
* effectively disabled.
|
* effectively disabled.
|
||||||
@ -91,14 +91,14 @@ public interface AL {
|
|||||||
* Type: ALfloat
|
* Type: ALfloat
|
||||||
* Range: [0.0 - 1.0]
|
* Range: [0.0 - 1.0]
|
||||||
*
|
*
|
||||||
* Logarthmic
|
* Logarithmic
|
||||||
*/
|
*/
|
||||||
static final int AL_MIN_GAIN = 0x100D;
|
static final int AL_MIN_GAIN = 0x100D;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicate maximum source attenuation Type: ALfloat Range: [0.0 - 1.0]
|
* Indicate maximum source attenuation Type: ALfloat Range: [0.0 - 1.0]
|
||||||
*
|
*
|
||||||
* Logarthmic
|
* Logarithmic
|
||||||
*/
|
*/
|
||||||
static final int AL_MAX_GAIN = 0x100E;
|
static final int AL_MAX_GAIN = 0x100E;
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ public interface AL {
|
|||||||
static final int AL_NO_ERROR = 0;
|
static final int AL_NO_ERROR = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invalid Name paramater passed to AL call.
|
* Invalid Name parameter passed to AL call.
|
||||||
*/
|
*/
|
||||||
static final int AL_INVALID_NAME = 0xA001;
|
static final int AL_INVALID_NAME = 0xA001;
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ public interface AL {
|
|||||||
*
|
*
|
||||||
* used in conjunction with DistanceModel
|
* used in conjunction with DistanceModel
|
||||||
*
|
*
|
||||||
* implicit: NONE, which disances distance attenuation.
|
* implicit: NONE, which disables distance attenuation.
|
||||||
*/
|
*/
|
||||||
static final int AL_DISTANCE_MODEL = 0xD000;
|
static final int AL_DISTANCE_MODEL = 0xD000;
|
||||||
static final int AL_INVERSE_DISTANCE = 0xD001;
|
static final int AL_INVERSE_DISTANCE = 0xD001;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -202,7 +202,7 @@ public class MotionPath implements Savable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Addsa waypoint to the path
|
* Add a waypoint to the path
|
||||||
* @param wayPoint a position in world space
|
* @param wayPoint a position in world space
|
||||||
*/
|
*/
|
||||||
public void addWayPoint(Vector3f wayPoint) {
|
public void addWayPoint(Vector3f wayPoint) {
|
||||||
@ -210,7 +210,7 @@ public class MotionPath implements Savable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retruns the length of the path in world units
|
* Return the length of the path in world units
|
||||||
* @return the length
|
* @return the length
|
||||||
*/
|
*/
|
||||||
public float getLength() {
|
public float getLength() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -384,7 +384,7 @@ public class ParticleEmitter extends Geometry {
|
|||||||
* Set to true if particles should spawn in world space.
|
* Set to true if particles should spawn in world space.
|
||||||
*
|
*
|
||||||
* <p>If set to true and the particle emitter is moved in the scene,
|
* <p>If set to true and the particle emitter is moved in the scene,
|
||||||
* then particles that have already spawned won't be effected by this
|
* then particles that have already spawned won't be affected by this
|
||||||
* motion. If set to false, the particles will emit in local space
|
* motion. If set to false, the particles will emit in local space
|
||||||
* and when the emitter is moved, so are all the particles that
|
* and when the emitter is moved, so are all the particles that
|
||||||
* were emitted previously.
|
* were emitted previously.
|
||||||
@ -846,7 +846,7 @@ public class ParticleEmitter extends Geometry {
|
|||||||
* @param initialVelocity Set the initial velocity a particle is spawned with,
|
* @param initialVelocity Set the initial velocity a particle is spawned with,
|
||||||
* the initial velocity given in the parameter will be varied according
|
* the initial velocity given in the parameter will be varied according
|
||||||
* to the velocity variation set in {@link ParticleEmitter#setVelocityVariation(float) }.
|
* to the velocity variation set in {@link ParticleEmitter#setVelocityVariation(float) }.
|
||||||
* A particle will move toward its velocity unless it is effected by the
|
* The particle will move with this velocity unless it is affected by
|
||||||
* gravity.
|
* gravity.
|
||||||
*
|
*
|
||||||
* @deprecated
|
* @deprecated
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -64,7 +64,7 @@ public interface ParticleInfluencer extends Savable, Cloneable, JmeCloneable {
|
|||||||
* Set the initial velocity a particle is spawned with,
|
* Set the initial velocity a particle is spawned with,
|
||||||
* the initial velocity given in the parameter will be varied according
|
* the initial velocity given in the parameter will be varied according
|
||||||
* to the velocity variation set in {@link ParticleEmitter#setVelocityVariation(float) }.
|
* to the velocity variation set in {@link ParticleEmitter#setVelocityVariation(float) }.
|
||||||
* A particle will move toward its velocity unless it is effected by the
|
* The particle will move with this velocity unless it is affected by
|
||||||
* gravity.
|
* gravity.
|
||||||
*/
|
*/
|
||||||
void setInitialVelocity(Vector3f initialVelocity);
|
void setInitialVelocity(Vector3f initialVelocity);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -37,7 +37,7 @@ import com.jme3.scene.Mesh;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This emiter shape emits the particles from the given shape's interior constrained by its convex hull
|
* This emitter shape emits the particles from the given shape's interior constrained by its convex hull
|
||||||
* (a geometry that tightly wraps the mesh). So in case of multiple meshes some vertices may appear
|
* (a geometry that tightly wraps the mesh). So in case of multiple meshes some vertices may appear
|
||||||
* in a space between them.
|
* in a space between them.
|
||||||
* @author Marcin Roguski (Kaelthas)
|
* @author Marcin Roguski (Kaelthas)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -40,7 +40,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This emiter shape emits the particles from the given shape's faces.
|
* This emitter shape emits the particles from the given shape's faces.
|
||||||
* @author Marcin Roguski (Kaelthas)
|
* @author Marcin Roguski (Kaelthas)
|
||||||
*/
|
*/
|
||||||
public class EmitterMeshFaceShape extends EmitterMeshVertexShape {
|
public class EmitterMeshFaceShape extends EmitterMeshVertexShape {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -50,7 +50,7 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This emiter shape emits the particles from the given shape's vertices
|
* This emitter shape emits the particles from the given shape's vertices
|
||||||
* @author Marcin Roguski (Kaelthas)
|
* @author Marcin Roguski (Kaelthas)
|
||||||
*/
|
*/
|
||||||
public class EmitterMeshVertexShape implements EmitterShape {
|
public class EmitterMeshVertexShape implements EmitterShape {
|
||||||
@ -74,7 +74,7 @@ public class EmitterMeshVertexShape implements EmitterShape {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method sets the meshes that will form the emiter's shape.
|
* This method sets the meshes that will form the emitter's shape.
|
||||||
* @param meshes
|
* @param meshes
|
||||||
* a list of meshes that will form the emitter's shape
|
* a list of meshes that will form the emitter's shape
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2015 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -47,7 +47,7 @@ import java.util.concurrent.ScheduledThreadPoolExecutor;
|
|||||||
* Since the process can be long, you can provide a JobProgressListener that
|
* Since the process can be long, you can provide a JobProgressListener that
|
||||||
* will be notified of the ongoing generation process when calling the makeProbe method.
|
* will be notified of the ongoing generation process when calling the makeProbe method.
|
||||||
*
|
*
|
||||||
* The process is the folowing :
|
* The process is as follows:
|
||||||
* 1. Create an EnvironmentCamera
|
* 1. Create an EnvironmentCamera
|
||||||
* 2. give it a position in the scene
|
* 2. give it a position in the scene
|
||||||
* 3. call {@link LightProbeFactory#makeProbe(com.jme3.environment.EnvironmentCamera, com.jme3.scene.Node)}
|
* 3. call {@link LightProbeFactory#makeProbe(com.jme3.environment.EnvironmentCamera, com.jme3.scene.Node)}
|
||||||
@ -61,7 +61,7 @@ import java.util.concurrent.ScheduledThreadPoolExecutor;
|
|||||||
* This class is entirely thread safe and can be called from any thread.
|
* This class is entirely thread safe and can be called from any thread.
|
||||||
*
|
*
|
||||||
* Note that in case you are using a {@link JobProgressListener} all the its
|
* Note that in case you are using a {@link JobProgressListener} all the its
|
||||||
* method will be called inside and app.enqueu callable.
|
* method will be called inside and app.enqueue callable.
|
||||||
* This means that it's completely safe to modify the scenegraph within the
|
* This means that it's completely safe to modify the scenegraph within the
|
||||||
* Listener method, but also means that the even will be delayed until next update loop.
|
* Listener method, but also means that the even will be delayed until next update loop.
|
||||||
*
|
*
|
||||||
@ -73,7 +73,7 @@ public class LightProbeFactory {
|
|||||||
/**
|
/**
|
||||||
* Creates a LightProbe with the giver EnvironmentCamera in the given scene.
|
* Creates a LightProbe with the giver EnvironmentCamera in the given scene.
|
||||||
*
|
*
|
||||||
* Note that this is an assynchronous process that will run on multiple threads.
|
* Note that this is an asynchronous process that will run on multiple threads.
|
||||||
* The process is thread safe.
|
* The process is thread safe.
|
||||||
* The created lightProbe will only be marked as ready when the rendering process is done.
|
* The created lightProbe will only be marked as ready when the rendering process is done.
|
||||||
*
|
*
|
||||||
@ -94,7 +94,7 @@ public class LightProbeFactory {
|
|||||||
/**
|
/**
|
||||||
* Creates a LightProbe with the giver EnvironmentCamera in the given scene.
|
* Creates a LightProbe with the giver EnvironmentCamera in the given scene.
|
||||||
*
|
*
|
||||||
* Note that this is an assynchronous process that will run on multiple threads.
|
* Note that this is an asynchronous process that will run on multiple threads.
|
||||||
* The process is thread safe.
|
* The process is thread safe.
|
||||||
* The created lightProbe will only be marked as ready when the rendering process is done.
|
* The created lightProbe will only be marked as ready when the rendering process is done.
|
||||||
*
|
*
|
||||||
@ -108,7 +108,7 @@ public class LightProbeFactory {
|
|||||||
* @param envCam the EnvironmentCamera
|
* @param envCam the EnvironmentCamera
|
||||||
* @param scene the Scene
|
* @param scene the Scene
|
||||||
* @param genType Fast or HighQuality. Fast may be ok for many types of environment, but you may need high quality when an environment map has very high lighting values.
|
* @param genType Fast or HighQuality. Fast may be ok for many types of environment, but you may need high quality when an environment map has very high lighting values.
|
||||||
* @param listener the listener of the genration progress.
|
* @param listener the listener of the generation progress.
|
||||||
* @return the created LightProbe
|
* @return the created LightProbe
|
||||||
*/
|
*/
|
||||||
public static LightProbe makeProbe(final EnvironmentCamera envCam, Spatial scene, final EnvMapUtils.GenerationType genType, final JobProgressListener<LightProbe> listener) {
|
public static LightProbe makeProbe(final EnvironmentCamera envCam, Spatial scene, final EnvMapUtils.GenerationType genType, final JobProgressListener<LightProbe> listener) {
|
||||||
@ -132,7 +132,7 @@ public class LightProbeFactory {
|
|||||||
/**
|
/**
|
||||||
* Updates a LightProbe with the given EnvironmentCamera in the given scene.
|
* Updates a LightProbe with the given EnvironmentCamera in the given scene.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that this is an assynchronous process that will run on multiple threads.
|
* Note that this is an asynchronous process that will run on multiple threads.
|
||||||
* The process is thread safe.
|
* The process is thread safe.
|
||||||
* The created lightProbe will only be marked as ready when the rendering process is done.
|
* The created lightProbe will only be marked as ready when the rendering process is done.
|
||||||
* <p>
|
* <p>
|
||||||
@ -143,7 +143,7 @@ public class LightProbeFactory {
|
|||||||
* @param envCam the EnvironmentCamera
|
* @param envCam the EnvironmentCamera
|
||||||
* @param scene the Scene
|
* @param scene the Scene
|
||||||
* @param genType Fast or HighQuality. Fast may be ok for many types of environment, but you may need high quality when an environment map has very high lighting values.
|
* @param genType Fast or HighQuality. Fast may be ok for many types of environment, but you may need high quality when an environment map has very high lighting values.
|
||||||
* @param listener the listener of the genration progress.
|
* @param listener the listener of the generation progress.
|
||||||
* @return the created LightProbe
|
* @return the created LightProbe
|
||||||
* @see LightProbe
|
* @see LightProbe
|
||||||
* @see EnvironmentCamera
|
* @see EnvironmentCamera
|
||||||
@ -178,10 +178,10 @@ public class LightProbeFactory {
|
|||||||
/**
|
/**
|
||||||
* Internally called to generate the maps.
|
* Internally called to generate the maps.
|
||||||
* This method will spawn 7 thread (one for the Irradiance spherical harmonics generator, and one for each face of the prefiltered env map).
|
* This method will spawn 7 thread (one for the Irradiance spherical harmonics generator, and one for each face of the prefiltered env map).
|
||||||
* Those threads will be executed in a ScheduledThreadPoolExecutor that will be shutdown when the genration is done.
|
* Those threads will be executed in a ScheduledThreadPoolExecutor that will be shutdown when the generation is done.
|
||||||
*
|
*
|
||||||
* @param envMap the raw env map rendered by the env camera
|
* @param envMap the raw env map rendered by the env camera
|
||||||
* @param probe the LigthProbe to generate maps for
|
* @param probe the LightProbe to generate maps for
|
||||||
* @param app the Application
|
* @param app the Application
|
||||||
* @param listener a progress listener. (can be null if no progress reporting is needed)
|
* @param listener a progress listener. (can be null if no progress reporting is needed)
|
||||||
*/
|
*/
|
||||||
@ -237,7 +237,7 @@ public class LightProbeFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An inner JobProgressListener to controll the genration process and properly clean up when it's done
|
* An inner JobProgressListener to control the generation process and properly clean up when it's done
|
||||||
*/
|
*/
|
||||||
private static class JobListener extends JobProgressAdapter<Integer> {
|
private static class JobListener extends JobProgressAdapter<Integer> {
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2015 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -73,7 +73,7 @@ public class IrradianceSphericalHarmonicsGenerator extends RunnableWithProgress
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fills all the genration parameters
|
* Fills all the generation parameters
|
||||||
*
|
*
|
||||||
* @param sourceMap the source cube map
|
* @param sourceMap the source cube map
|
||||||
* {@link EnvMapUtils.FixSeamsMethod}
|
* {@link EnvMapUtils.FixSeamsMethod}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2015 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -45,8 +45,8 @@ import static com.jme3.math.FastMath.abs;
|
|||||||
import static com.jme3.math.FastMath.sqrt;
|
import static com.jme3.math.FastMath.sqrt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates one face of the prefiltered environnement map for PBR. This job can
|
* Generates one face of the prefiltered environment map for PBR. This job can
|
||||||
* be lauched from a separate thread.
|
* be launched from a separate thread.
|
||||||
* <p>
|
* <p>
|
||||||
* TODO there is a lot of duplicate code here with the EnvMapUtils.
|
* TODO there is a lot of duplicate code here with the EnvMapUtils.
|
||||||
*
|
*
|
||||||
@ -91,7 +91,7 @@ public class PrefilteredEnvMapFaceGenerator extends RunnableWithProgress {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fills all the genration parameters
|
* Fills all the generation parameters
|
||||||
*
|
*
|
||||||
* @param sourceMap the source cube map
|
* @param sourceMap the source cube map
|
||||||
* @param targetMapSize the size of the generated map (width or height in
|
* @param targetMapSize the size of the generated map (width or height in
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2015 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -61,7 +61,7 @@ public abstract class RunnableWithProgress implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return the curent progress of the process.
|
* return the current progress of the process.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -420,7 +420,7 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control, Jme
|
|||||||
|
|
||||||
//the user is rotating the cam by dragging the mouse
|
//the user is rotating the cam by dragging the mouse
|
||||||
if (canRotate) {
|
if (canRotate) {
|
||||||
//reseting the trailing lerp factor
|
//reset the trailing lerp factor
|
||||||
trailingLerpFactor = 0;
|
trailingLerpFactor = 0;
|
||||||
//stop trailing user has the control
|
//stop trailing user has the control
|
||||||
trailing = false;
|
trailing = false;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012, 2015-2016 jMonkeyEngine
|
* Copyright (c) 2009-2012, 2015-2016, 2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -54,7 +54,7 @@ import java.io.IOException;
|
|||||||
* <p>
|
* <p>
|
||||||
* In addition to a position, point lights also have a radius which
|
* In addition to a position, point lights also have a radius which
|
||||||
* can be used to attenuate the influence of the light depending on the
|
* can be used to attenuate the influence of the light depending on the
|
||||||
* distance between the light and the effected object.
|
* distance between the light and the affected object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PointLight extends Light {
|
public class PointLight extends Light {
|
||||||
@ -155,7 +155,7 @@ public class PointLight extends Light {
|
|||||||
* Setting a non-zero radius indicates the light should use attenuation.
|
* Setting a non-zero radius indicates the light should use attenuation.
|
||||||
* If a pixel's distance to this light's position
|
* If a pixel's distance to this light's position
|
||||||
* is greater than the light's radius, then the pixel will not be
|
* is greater than the light's radius, then the pixel will not be
|
||||||
* effected by this light, if the distance is less than the radius, then
|
* affected by this light, if the distance is less than the radius, then
|
||||||
* the magnitude of the influence is equal to distance / radius.
|
* the magnitude of the influence is equal to distance / radius.
|
||||||
*
|
*
|
||||||
* @param radius the radius of the light influence.
|
* @param radius the radius of the light influence.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012, 2015-2016 jMonkeyEngine
|
* Copyright (c) 2009-2012, 2015-2016, 2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -337,7 +337,7 @@ public class SpotLight extends Light {
|
|||||||
* Setting a non-zero range indicates the light should use attenuation.
|
* Setting a non-zero range indicates the light should use attenuation.
|
||||||
* If a pixel's distance to this light's position
|
* If a pixel's distance to this light's position
|
||||||
* is greater than the light's range, then the pixel will not be
|
* is greater than the light's range, then the pixel will not be
|
||||||
* effected by this light, if the distance is less than the range, then
|
* affected by this light, if the distance is less than the range, then
|
||||||
* the magnitude of the influence is equal to distance / range.
|
* the magnitude of the influence is equal to distance / range.
|
||||||
*
|
*
|
||||||
* @param spotRange the range of the light influence.
|
* @param spotRange the range of the light influence.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2015 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -116,7 +116,7 @@ public final class SinglePassAndImageBasedLightingLogic extends DefaultTechnique
|
|||||||
Uniform lightProbeData = shader.getUniform("g_LightProbeData");
|
Uniform lightProbeData = shader.getUniform("g_LightProbeData");
|
||||||
lightProbeData.setVector4Length(1);
|
lightProbeData.setVector4Length(1);
|
||||||
|
|
||||||
//TODO These 2 uniforms should be packed in an array, to ba able to have several probes and blend between them.
|
//TODO These 2 uniforms should be packed in an array, to be able to have several probes and blend between them.
|
||||||
Uniform shCoeffs = shader.getUniform("g_ShCoeffs");
|
Uniform shCoeffs = shader.getUniform("g_ShCoeffs");
|
||||||
Uniform lightProbePemMap = shader.getUniform("g_PrefEnvMap");
|
Uniform lightProbePemMap = shader.getUniform("g_PrefEnvMap");
|
||||||
|
|
||||||
|
@ -1343,7 +1343,7 @@ public final class Quaternion implements Savable, Cloneable, java.io.Serializabl
|
|||||||
* @param store
|
* @param store
|
||||||
* A Quaternion to store our result in. If null, a new one is
|
* A Quaternion to store our result in. If null, a new one is
|
||||||
* created.
|
* created.
|
||||||
* @return The store quaternion (or a new Quaterion, if store is null) that
|
* @return The store quaternion (or a new Quaternion, if store is null) that
|
||||||
* describes a rotation that would point you in the exact opposite
|
* describes a rotation that would point you in the exact opposite
|
||||||
* direction of this Quaternion.
|
* direction of this Quaternion.
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -53,7 +53,7 @@ public final class Ray implements Savable, Cloneable, Collidable, java.io.Serial
|
|||||||
static final long serialVersionUID = 1;
|
static final long serialVersionUID = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ray's begining point.
|
* The ray's beginning point.
|
||||||
*/
|
*/
|
||||||
public Vector3f origin = new Vector3f();
|
public Vector3f origin = new Vector3f();
|
||||||
|
|
||||||
@ -191,9 +191,9 @@ public final class Ray implements Savable, Cloneable, Collidable, java.io.Serial
|
|||||||
* @param v2
|
* @param v2
|
||||||
* third point of the triangle.
|
* third point of the triangle.
|
||||||
* @param store
|
* @param store
|
||||||
* storage vector - if null, no intersection is calc'd
|
* storage vector - if null, no intersection is calculated
|
||||||
* @param doPlanar
|
* @param doPlanar
|
||||||
* true if we are calcing planar results.
|
* true if we are calculating planar results.
|
||||||
* @param quad
|
* @param quad
|
||||||
* @return true if ray intersects triangle
|
* @return true if ray intersects triangle
|
||||||
*/
|
*/
|
||||||
|
@ -175,7 +175,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets this matrix to the interpolation between the first matrix and the second by delta amount.
|
* Sets this matrix to the interpolation between the first matrix and the second by delta amount.
|
||||||
* @param t1 The begining transform.
|
* @param t1 The beginning transform.
|
||||||
* @param t2 The ending transform.
|
* @param t2 The ending transform.
|
||||||
* @param delta An amount between 0 and 1 representing how far to interpolate from t1 to t2.
|
* @param delta An amount between 0 and 1 representing how far to interpolate from t1 to t2.
|
||||||
*/
|
*/
|
||||||
@ -245,7 +245,7 @@ public final class Transform implements Savable, Cloneable, java.io.Serializable
|
|||||||
store = new Vector3f();
|
store = new Vector3f();
|
||||||
|
|
||||||
// The author of this code should look above and take the inverse of that
|
// The author of this code should look above and take the inverse of that
|
||||||
// But for some reason, they didnt ..
|
// But for some reason, they didn't ..
|
||||||
// in.subtract(translation, store).divideLocal(scale);
|
// in.subtract(translation, store).divideLocal(scale);
|
||||||
// rot.inverse().mult(store, store);
|
// rot.inverse().mult(store, store);
|
||||||
|
|
||||||
|
@ -248,11 +248,11 @@ public final class Vector2f implements Savable, Cloneable, java.io.Serializable
|
|||||||
* finalVec this=(1-changeAmnt)*beginVec + changeAmnt * finalVec
|
* finalVec this=(1-changeAmnt)*beginVec + changeAmnt * finalVec
|
||||||
*
|
*
|
||||||
* @param beginVec
|
* @param beginVec
|
||||||
* The begining vector (delta=0)
|
* The beginning vector (delta=0)
|
||||||
* @param finalVec
|
* @param finalVec
|
||||||
* The final vector to interpolate towards (delta=1)
|
* The final vector to interpolate towards (delta=1)
|
||||||
* @param changeAmnt
|
* @param changeAmnt
|
||||||
* An amount between 0.0 - 1.0 representing a precentage change
|
* An amount between 0.0 - 1.0 representing a percentage change
|
||||||
* from beginVec towards finalVec
|
* from beginVec towards finalVec
|
||||||
*/
|
*/
|
||||||
public Vector2f interpolateLocal(Vector2f beginVec, Vector2f finalVec,
|
public Vector2f interpolateLocal(Vector2f beginVec, Vector2f finalVec,
|
||||||
@ -363,7 +363,7 @@ public final class Vector2f implements Savable, Cloneable, java.io.Serializable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>multLocal</code> multiplies a provided vector to this vector
|
* <code>multLocal</code> multiplies a provided vector by this vector
|
||||||
* internally, and returns a handle to this vector for easy chaining of
|
* internally, and returns a handle to this vector for easy chaining of
|
||||||
* calls. If the provided vector is null, null is returned.
|
* calls. If the provided vector is null, null is returned.
|
||||||
*
|
*
|
||||||
@ -579,7 +579,7 @@ public final class Vector2f implements Savable, Cloneable, java.io.Serializable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>angleBetween</code> returns (in radians) the angle required to
|
* <code>angleBetween</code> returns (in radians) the angle required to
|
||||||
* rotate a ray represented by this vector to lie colinear to a ray
|
* rotate a ray represented by this vector to be colinear with a ray
|
||||||
* described by the given vector. It is assumed that both this vector and
|
* described by the given vector. It is assumed that both this vector and
|
||||||
* the given vector are unit vectors (iow, normalized).
|
* the given vector are unit vectors (iow, normalized).
|
||||||
*
|
*
|
||||||
|
@ -851,7 +851,7 @@ public final class Vector3f implements Savable, Cloneable, java.io.Serializable
|
|||||||
* Sets this vector to the interpolation by changeAmnt from this to the finalVec
|
* Sets this vector to the interpolation by changeAmnt from this to the finalVec
|
||||||
* this=(1-changeAmnt)*this + changeAmnt * finalVec
|
* this=(1-changeAmnt)*this + changeAmnt * finalVec
|
||||||
* @param finalVec The final vector to interpolate towards
|
* @param finalVec The final vector to interpolate towards
|
||||||
* @param changeAmnt An amount between 0.0 - 1.0 representing a precentage
|
* @param changeAmnt An amount between 0.0 - 1.0 representing a percentage
|
||||||
* change from this towards finalVec
|
* change from this towards finalVec
|
||||||
*/
|
*/
|
||||||
public Vector3f interpolateLocal(Vector3f finalVec, float changeAmnt) {
|
public Vector3f interpolateLocal(Vector3f finalVec, float changeAmnt) {
|
||||||
@ -864,9 +864,9 @@ public final class Vector3f implements Savable, Cloneable, java.io.Serializable
|
|||||||
/**
|
/**
|
||||||
* Sets this vector to the interpolation by changeAmnt from beginVec to finalVec
|
* Sets this vector to the interpolation by changeAmnt from beginVec to finalVec
|
||||||
* this=(1-changeAmnt)*beginVec + changeAmnt * finalVec
|
* this=(1-changeAmnt)*beginVec + changeAmnt * finalVec
|
||||||
* @param beginVec the beging vector (changeAmnt=0)
|
* @param beginVec the beginning vector (changeAmnt=0)
|
||||||
* @param finalVec The final vector to interpolate towards
|
* @param finalVec The final vector to interpolate towards
|
||||||
* @param changeAmnt An amount between 0.0 - 1.0 representing a precentage
|
* @param changeAmnt An amount between 0.0 - 1.0 representing a percentage
|
||||||
* change from beginVec towards finalVec
|
* change from beginVec towards finalVec
|
||||||
*/
|
*/
|
||||||
public Vector3f interpolateLocal(Vector3f beginVec,Vector3f finalVec, float changeAmnt) {
|
public Vector3f interpolateLocal(Vector3f beginVec,Vector3f finalVec, float changeAmnt) {
|
||||||
|
@ -780,7 +780,7 @@ public final class Vector4f implements Savable, Cloneable, java.io.Serializable
|
|||||||
* Sets this vector to the interpolation by changeAmnt from this to the finalVec
|
* Sets this vector to the interpolation by changeAmnt from this to the finalVec
|
||||||
* this=(1-changeAmnt)*this + changeAmnt * finalVec
|
* this=(1-changeAmnt)*this + changeAmnt * finalVec
|
||||||
* @param finalVec The final vector to interpolate towards
|
* @param finalVec The final vector to interpolate towards
|
||||||
* @param changeAmnt An amount between 0.0 - 1.0 representing a precentage
|
* @param changeAmnt An amount between 0.0 - 1.0 representing a percentage
|
||||||
* change from this towards finalVec
|
* change from this towards finalVec
|
||||||
*/
|
*/
|
||||||
public Vector4f interpolateLocal(Vector4f finalVec, float changeAmnt) {
|
public Vector4f interpolateLocal(Vector4f finalVec, float changeAmnt) {
|
||||||
@ -794,9 +794,9 @@ public final class Vector4f implements Savable, Cloneable, java.io.Serializable
|
|||||||
/**
|
/**
|
||||||
* Sets this vector to the interpolation by changeAmnt from beginVec to finalVec
|
* Sets this vector to the interpolation by changeAmnt from beginVec to finalVec
|
||||||
* this=(1-changeAmnt)*beginVec + changeAmnt * finalVec
|
* this=(1-changeAmnt)*beginVec + changeAmnt * finalVec
|
||||||
* @param beginVec the beging vector (changeAmnt=0)
|
* @param beginVec the beginning vector (changeAmnt=0)
|
||||||
* @param finalVec The final vector to interpolate towards
|
* @param finalVec The final vector to interpolate towards
|
||||||
* @param changeAmnt An amount between 0.0 - 1.0 representing a precentage
|
* @param changeAmnt An amount between 0.0 - 1.0 representing a percentage
|
||||||
* change from beginVec towards finalVec
|
* change from beginVec towards finalVec
|
||||||
*/
|
*/
|
||||||
public Vector4f interpolateLocal(Vector4f beginVec,Vector4f finalVec, float changeAmnt) {
|
public Vector4f interpolateLocal(Vector4f beginVec,Vector4f finalVec, float changeAmnt) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2016 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -434,7 +434,7 @@ public abstract class Context extends AbstractOpenCLObject {
|
|||||||
* this method and {@code Program#build(..)} must be the same.
|
* this method and {@code Program#build(..)} must be the same.
|
||||||
*
|
*
|
||||||
* The binaries are used to build a program cache across multiple launches
|
* The binaries are used to build a program cache across multiple launches
|
||||||
* of the application. The programs build mach faster from binaries than
|
* of the application. The programs build much faster from binaries than
|
||||||
* from sources.
|
* from sources.
|
||||||
*
|
*
|
||||||
* @param binaries the binaries
|
* @param binaries the binaries
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2016 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -35,7 +35,7 @@ import java.util.Collection;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a hardware device actually running the OpenCL kernels.
|
* Represents a hardware device actually running the OpenCL kernels.
|
||||||
* A {@link Context} can be accociated with multiple {@code Devices}
|
* A {@link Context} can be associated with multiple {@code Devices}
|
||||||
* that all belong to the same {@link Platform}.
|
* that all belong to the same {@link Platform}.
|
||||||
* For execution, a single device must be chosen and passed to a command
|
* For execution, a single device must be chosen and passed to a command
|
||||||
* queue ({@link Context#createQueue(com.jme3.opencl.Device) }).
|
* queue ({@link Context#createQueue(com.jme3.opencl.Device) }).
|
||||||
@ -47,7 +47,7 @@ import java.util.Collection;
|
|||||||
public interface Device {
|
public interface Device {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the platform accociated with this device
|
* @return the platform associated with this device
|
||||||
*/
|
*/
|
||||||
Platform getPlatform();
|
Platform getPlatform();
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ public interface Device {
|
|||||||
*/
|
*/
|
||||||
boolean hasOpenGLInterop();
|
boolean hasOpenGLInterop();
|
||||||
/**
|
/**
|
||||||
* Explicetly tests for the availability of the specified extension
|
* Explictly tests for the availability of the specified extension
|
||||||
* @param extension the name of the extension
|
* @param extension the name of the extension
|
||||||
* @return {@code true} iff this extension is supported
|
* @return {@code true} iff this extension is supported
|
||||||
*/
|
*/
|
||||||
@ -138,7 +138,7 @@ public interface Device {
|
|||||||
* size specified as an unsigned integer value
|
* size specified as an unsigned integer value
|
||||||
* in bits. Currently supported values are 32
|
* in bits. Currently supported values are 32
|
||||||
* or 64 bits.
|
* or 64 bits.
|
||||||
* @return the size of an adress
|
* @return the size of an address
|
||||||
*/
|
*/
|
||||||
int getAddressBits();
|
int getAddressBits();
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2016 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -55,7 +55,7 @@ import java.util.Arrays;
|
|||||||
* Again, the threads inside the work group can be organized in a 1D, 2D or 3D
|
* Again, the threads inside the work group can be organized in a 1D, 2D or 3D
|
||||||
* grid, but this is also just a logical view (specifying how the threads are
|
* grid, but this is also just a logical view (specifying how the threads are
|
||||||
* indexed).
|
* indexed).
|
||||||
* The work group is imporatant for another concept: <i> shared memory</i>
|
* The work group is important for another concept: <i> shared memory</i>
|
||||||
* Unlike the normal global or constant memory (passing a {@link Buffer} object
|
* Unlike the normal global or constant memory (passing a {@link Buffer} object
|
||||||
* as argument), shared memory can't be set from outside. Shared memory is
|
* as argument), shared memory can't be set from outside. Shared memory is
|
||||||
* allocated by the kernel and is only valid within the kernel. It is used
|
* allocated by the kernel and is only valid within the kernel. It is used
|
||||||
@ -202,7 +202,7 @@ public abstract class Kernel extends AbstractOpenCLObject {
|
|||||||
* Use this if you do not rely on specific work group layouts, i.e.
|
* Use this if you do not rely on specific work group layouts, i.e.
|
||||||
* because shared memory is not used.
|
* because shared memory is not used.
|
||||||
* {@link #Run1(com.jme3.opencl.CommandQueue, com.jme3.opencl.Kernel.WorkSize, java.lang.Object...) }
|
* {@link #Run1(com.jme3.opencl.CommandQueue, com.jme3.opencl.Kernel.WorkSize, java.lang.Object...) }
|
||||||
* implicetly calls this mehtod.
|
* implicitly calls this method.
|
||||||
*/
|
*/
|
||||||
public void setWorkGroupSizeToNull() {
|
public void setWorkGroupSizeToNull() {
|
||||||
workGroupSize.set(1, 0, 0, 0);
|
workGroupSize.set(1, 0, 0, 0);
|
||||||
@ -494,7 +494,7 @@ public abstract class Kernel extends AbstractOpenCLObject {
|
|||||||
* Therefore, an instance of this class must be set as an argument AFTER
|
* Therefore, an instance of this class must be set as an argument AFTER
|
||||||
* the work group size has been specified. This is
|
* the work group size has been specified. This is
|
||||||
* ensured by {@link #Run2(com.jme3.opencl.CommandQueue, com.jme3.opencl.Kernel.WorkSize, com.jme3.opencl.Kernel.WorkSize, java.lang.Object...) }.
|
* ensured by {@link #Run2(com.jme3.opencl.CommandQueue, com.jme3.opencl.Kernel.WorkSize, com.jme3.opencl.Kernel.WorkSize, java.lang.Object...) }.
|
||||||
* This argument can't be used when no work group size was defined explicetly
|
* This argument can't be used when no work group size was defined explicitly
|
||||||
* (e.g. by {@link #setWorkGroupSizeToNull()} or {@link #Run1(com.jme3.opencl.CommandQueue, com.jme3.opencl.Kernel.WorkSize, java.lang.Object...) }.
|
* (e.g. by {@link #setWorkGroupSizeToNull()} or {@link #Run1(com.jme3.opencl.CommandQueue, com.jme3.opencl.Kernel.WorkSize, java.lang.Object...) }.
|
||||||
*/
|
*/
|
||||||
public static final class LocalMemPerElement {
|
public static final class LocalMemPerElement {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2016 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -98,7 +98,7 @@
|
|||||||
* need for intermediate events. (These intermediate events would be released
|
* need for intermediate events. (These intermediate events would be released
|
||||||
* immediately). Therefore, the no-event alternatives increase the performance
|
* immediately). Therefore, the no-event alternatives increase the performance
|
||||||
* because no additional event object has to be allocated and less system calls
|
* because no additional event object has to be allocated and less system calls
|
||||||
* are neccessary.
|
* are necessary.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Interoperability between OpenCL and jME3:</b><br>
|
* <b>Interoperability between OpenCL and jME3:</b><br>
|
||||||
@ -141,7 +141,7 @@
|
|||||||
* {@link com.jme3.opencl.Program}, {@link com.jme3.opencl.Kernel} and
|
* {@link com.jme3.opencl.Program}, {@link com.jme3.opencl.Kernel} and
|
||||||
* {@link com.jme3.opencl.Event})
|
* {@link com.jme3.opencl.Event})
|
||||||
* may throw the following exceptions in each method without being mentioned
|
* may throw the following exceptions in each method without being mentioned
|
||||||
* explicetly in the documentation:
|
* explicitly in the documentation:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@code NullPointerException}: one of the arguments is {@code null} and
|
* <li>{@code NullPointerException}: one of the arguments is {@code null} and
|
||||||
* {@code null} is not allowed</li>
|
* {@code null} is not allowed</li>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -410,7 +410,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
|
|||||||
|
|
||||||
public void cleanup() {
|
public void cleanup() {
|
||||||
if (viewPort != null) {
|
if (viewPort != null) {
|
||||||
//reseting the viewport camera viewport to its initial value
|
//reset the viewport camera viewport to its initial value
|
||||||
viewPort.getCamera().resize(originalWidth, originalHeight, true);
|
viewPort.getCamera().resize(originalWidth, originalHeight, true);
|
||||||
viewPort.getCamera().setViewPort(left, right, bottom, top);
|
viewPort.getCamera().setViewPort(left, right, bottom, top);
|
||||||
viewPort.setOutputFrameBuffer(outputBuffer);
|
viewPort.setOutputFrameBuffer(outputBuffer);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -1221,7 +1221,7 @@ public class Camera implements Savable, Cloneable {
|
|||||||
projectionMatrix.fromFrustum(frustumNear, frustumFar, frustumLeft, frustumRight, frustumTop, frustumBottom, parallelProjection);
|
projectionMatrix.fromFrustum(frustumNear, frustumFar, frustumLeft, frustumRight, frustumTop, frustumBottom, parallelProjection);
|
||||||
// projectionMatrix.transposeLocal();
|
// projectionMatrix.transposeLocal();
|
||||||
|
|
||||||
// The frame is effected by the frustum values
|
// The frame is affected by the frustum values
|
||||||
// update it as well
|
// update it as well
|
||||||
onFrameChange();
|
onFrameChange();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -151,7 +151,7 @@ public class Statistics {
|
|||||||
if( !enabled )
|
if( !enabled )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Reduces unneccessary hashmap lookups if
|
// Reduces unnecessary hashmap lookups if
|
||||||
// we already considered this shader.
|
// we already considered this shader.
|
||||||
if (lastShader != shader.getId()) {
|
if (lastShader != shader.getId()) {
|
||||||
lastShader = shader.getId();
|
lastShader = shader.getId();
|
||||||
|
@ -222,7 +222,7 @@ public final class GLRenderer implements Renderer {
|
|||||||
if (glslVer < 400) {
|
if (glslVer < 400) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// so that future OpenGL revisions wont break jme3
|
// so that future OpenGL revisions won't break jme3
|
||||||
// fall through intentional
|
// fall through intentional
|
||||||
case 450:
|
case 450:
|
||||||
caps.add(Caps.GLSL450);
|
caps.add(Caps.GLSL450);
|
||||||
@ -450,7 +450,7 @@ public final class GLRenderer implements Renderer {
|
|||||||
logger.log(Level.FINER, "Samples: {0}", samples);
|
logger.log(Level.FINER, "Samples: {0}", samples);
|
||||||
boolean enabled = gl.glIsEnabled(GLExt.GL_MULTISAMPLE_ARB);
|
boolean enabled = gl.glIsEnabled(GLExt.GL_MULTISAMPLE_ARB);
|
||||||
if (samples > 0 && available && !enabled) {
|
if (samples > 0 && available && !enabled) {
|
||||||
// Doesn't seem to be neccessary .. OGL spec says its always
|
// Doesn't seem to be necessary .. OGL spec says it's always
|
||||||
// set by default?
|
// set by default?
|
||||||
gl.glEnable(GLExt.GL_MULTISAMPLE_ARB);
|
gl.glEnable(GLExt.GL_MULTISAMPLE_ARB);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2014 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -266,7 +266,7 @@ final class TextureUtil {
|
|||||||
|
|
||||||
int[] mipSizes = image.getMipMapSizes();
|
int[] mipSizes = image.getMipMapSizes();
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
// TODO: Remove unneccessary allocation
|
// TODO: Remove unnecessary allocation
|
||||||
if (mipSizes == null) {
|
if (mipSizes == null) {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
mipSizes = new int[]{data.capacity()};
|
mipSizes = new int[]{data.capacity()};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -101,7 +101,7 @@ public class RenderQueue {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A special mode used for rendering transparent objects that
|
* A special mode used for rendering transparent objects that
|
||||||
* should not be effected by {@link SceneProcessor}.
|
* should not be affected by {@link SceneProcessor}.
|
||||||
* Generally this would contain translucent objects, and
|
* Generally this would contain translucent objects, and
|
||||||
* also objects that do not write to the depth buffer such as
|
* also objects that do not write to the depth buffer such as
|
||||||
* particle emitters.
|
* particle emitters.
|
||||||
@ -165,7 +165,7 @@ public class RenderQueue {
|
|||||||
*
|
*
|
||||||
* <p>The most significant comparator is the one for the transparent
|
* <p>The most significant comparator is the one for the transparent
|
||||||
* bucket since there is no correct way to sort the transparent bucket
|
* bucket since there is no correct way to sort the transparent bucket
|
||||||
* that will handle all geometry all the time. In certain cases, the
|
* that will handle all geometries all the time. In certain cases, the
|
||||||
* application may know the best way to sort and now has the option of
|
* application may know the best way to sort and now has the option of
|
||||||
* configuring a specific implementation.</p>
|
* configuring a specific implementation.</p>
|
||||||
*
|
*
|
||||||
|
@ -1494,7 +1494,7 @@ public class Mesh implements Savable, Cloneable, JmeCloneable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the amout of vertices used for each patch;
|
* Gets the amount of vertices used for each patch;
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int getPatchVertexCount() {
|
public int getPatchVertexCount() {
|
||||||
|
@ -433,7 +433,7 @@ public class Node extends Spatial {
|
|||||||
setBoundRefresh();
|
setBoundRefresh();
|
||||||
|
|
||||||
// our world transform no longer influences the child.
|
// our world transform no longer influences the child.
|
||||||
// XXX: Not neccessary? Since child will have transform updated
|
// XXX: Not necessary? Since child will have transform updated
|
||||||
// when attached anyway.
|
// when attached anyway.
|
||||||
child.setTransformRefresh();
|
child.setTransformRefresh();
|
||||||
// lights are also inherited from parent
|
// lights are also inherited from parent
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -47,7 +47,7 @@ import java.nio.FloatBuffer;
|
|||||||
import java.nio.ShortBuffer;
|
import java.nio.ShortBuffer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>Sphere</code> represents a 3D object with all points equidistance
|
* <code>Sphere</code> represents a 3D object with all points equidistant
|
||||||
* from a center point.
|
* from a center point.
|
||||||
*
|
*
|
||||||
* @author Joshua Slack
|
* @author Joshua Slack
|
||||||
@ -62,7 +62,7 @@ public class Sphere extends Mesh {
|
|||||||
*/
|
*/
|
||||||
Original,
|
Original,
|
||||||
/**
|
/**
|
||||||
* Wrap texure radially, but spherically project along z-axis
|
* Wrap texture radially, but spherically project along z-axis
|
||||||
*/
|
*/
|
||||||
Projected,
|
Projected,
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +81,7 @@ public class Glsl100ShaderGenerator extends ShaderGenerator {
|
|||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
* attributes are all declared, inPositon is declared even if it's not in
|
* attributes are all declared, inPosition is declared even if it's not in
|
||||||
* the list and its condition is nulled.
|
* the list and its condition is nulled.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -169,7 +169,7 @@ public class ShaderNodeDefinition implements Savable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retrun the path of this definition
|
* return the path of this definition
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getPath() {
|
public String getPath() {
|
||||||
|
@ -185,7 +185,7 @@ public class DirectionalLightShadowRenderer extends AbstractShadowRenderer {
|
|||||||
// update frustum points based on current camera and split
|
// update frustum points based on current camera and split
|
||||||
ShadowUtil.updateFrustumPoints(viewPort.getCamera(), splitsArray[shadowMapIndex], splitsArray[shadowMapIndex + 1], 1.0f, points);
|
ShadowUtil.updateFrustumPoints(viewPort.getCamera(), splitsArray[shadowMapIndex], splitsArray[shadowMapIndex + 1], 1.0f, points);
|
||||||
|
|
||||||
//Updating shadow cam with curent split frustra
|
//Updating shadow cam with current split frusta
|
||||||
if (lightReceivers.size()==0) {
|
if (lightReceivers.size()==0) {
|
||||||
for (Spatial scene : viewPort.getScenes()) {
|
for (Spatial scene : viewPort.getScenes()) {
|
||||||
ShadowUtil.getGeometriesInCamFrustum(scene, viewPort.getCamera(), RenderQueue.ShadowMode.Receive, lightReceivers);
|
ShadowUtil.getGeometriesInCamFrustum(scene, viewPort.getCamera(), RenderQueue.ShadowMode.Receive, lightReceivers);
|
||||||
|
@ -234,8 +234,8 @@ public class PssmShadowFilter extends Filter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this to false if you want to use several PssmRederers to have multiple shadows cast by multiple light sources.
|
* Set this to false if you want to use several PssmRenderers to have multiple shadows cast by multiple light sources.
|
||||||
* Make sure the last PssmRenderer in the stack DO flush the queues, but not the others
|
* Make sure the last PssmRenderer in the stack DOES flush the queues, but not the others
|
||||||
* @param flushQueues
|
* @param flushQueues
|
||||||
*/
|
*/
|
||||||
public void setFlushQueues(boolean flushQueues) {
|
public void setFlushQueues(boolean flushQueues) {
|
||||||
|
@ -430,7 +430,7 @@ public class PssmShadowRenderer implements SceneProcessor {
|
|||||||
// update frustum points based on current camera and split
|
// update frustum points based on current camera and split
|
||||||
ShadowUtil.updateFrustumPoints(viewCam, splitsArray[i], splitsArray[i + 1], 1.0f, points);
|
ShadowUtil.updateFrustumPoints(viewCam, splitsArray[i], splitsArray[i + 1], 1.0f, points);
|
||||||
|
|
||||||
//Updating shadow cam with curent split frustra
|
//Updating shadow cam with current split frusta
|
||||||
ShadowUtil.updateShadowCamera(viewPort, lightReceivers, shadowCam, points, splitOccluders, shadowMapSize);
|
ShadowUtil.updateShadowCamera(viewPort, lightReceivers, shadowCam, points, splitOccluders, shadowMapSize);
|
||||||
|
|
||||||
//saving light view projection matrix for this split
|
//saving light view projection matrix for this split
|
||||||
@ -695,9 +695,9 @@ public class PssmShadowRenderer implements SceneProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this to false if you want to use several PssmRederers to have
|
* Set this to false if you want to use several PssmRenderers to have
|
||||||
* multiple shadows cast by multiple light sources. Make sure the last
|
* multiple shadows cast by multiple light sources. Make sure the last
|
||||||
* PssmRenderer in the stack DO flush the queues, but not the others
|
* PssmRenderer in the stack DOES flush the queues, but not the others
|
||||||
*
|
*
|
||||||
* @param flushQueues
|
* @param flushQueues
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -593,9 +593,9 @@ public class ShadowUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Populates the outputGeometryList with the geometry of the
|
* Populates the outputGeometryList with the geometry of the
|
||||||
* inputGeomtryList that are in the frustum of the given camera
|
* inputGeometryList that are in the frustum of the given camera
|
||||||
*
|
*
|
||||||
* @param inputGeometryList The list containing all geometry to check
|
* @param inputGeometryList The list containing all geometries to check
|
||||||
* against the camera frustum
|
* against the camera frustum
|
||||||
* @param camera the camera to check geometries against
|
* @param camera the camera to check geometries against
|
||||||
* @param outputGeometryList the list of all geometries that are in the
|
* @param outputGeometryList the list of all geometries that are in the
|
||||||
@ -684,10 +684,10 @@ public class ShadowUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Populates the outputGeometryList with the geometry of the
|
* Populates the outputGeometryList with the geometry of the
|
||||||
* inputGeomtryList that are in the radius of a light.
|
* inputGeometryList that are in the radius of a light.
|
||||||
* The array of camera must be an array of 6 cameras initialized so they represent the light viewspace of a pointlight
|
* The array of camera must be an array of 6 cameras initialized so they represent the light viewspace of a pointlight
|
||||||
*
|
*
|
||||||
* @param inputGeometryList The list containing all geometry to check
|
* @param inputGeometryList The list containing all geometries to check
|
||||||
* against the camera frustum
|
* against the camera frustum
|
||||||
* @param cameras the camera array to check geometries against
|
* @param cameras the camera array to check geometries against
|
||||||
* @param outputGeometryList the list of all geometries that are in the
|
* @param outputGeometryList the list of all geometries that are in the
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -43,7 +43,7 @@ public class Annotations {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation used for math primitive fields, method parameters or method return values.
|
* Annotation used for math primitive fields, method parameters or method return values.
|
||||||
* Specifies that the primitve is read only and should not be changed.
|
* Specifies that the primitive is read only and should not be changed.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@ -379,7 +379,7 @@ public final class AppSettings extends HashMap<String, Object> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Use old method for compatibility with older preferences
|
// Use old method for compatibility with older preferences
|
||||||
// TODO: Remove when no longer neccessary
|
// TODO: Remove when no longer necessary
|
||||||
Object defaultValue = defaults.get(key);
|
Object defaultValue = defaults.get(key);
|
||||||
if (defaultValue instanceof Integer) {
|
if (defaultValue instanceof Integer) {
|
||||||
put(key, prefs.getInt(key, (Integer) defaultValue));
|
put(key, prefs.getInt(key, (Integer) defaultValue));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -525,7 +525,7 @@ public abstract class Texture implements CloneableSmartAsset, Savable, Cloneable
|
|||||||
final Texture other = (Texture) obj;
|
final Texture other = (Texture) obj;
|
||||||
|
|
||||||
// NOTE: Since images are generally considered unique assets in jME3,
|
// NOTE: Since images are generally considered unique assets in jME3,
|
||||||
// using the image's equals() implementation is not neccessary here
|
// using the image's equals() implementation is not necessary here
|
||||||
// (would be too slow)
|
// (would be too slow)
|
||||||
if (this.image != other.image) {
|
if (this.image != other.image) {
|
||||||
return false;
|
return false;
|
||||||
@ -549,7 +549,7 @@ public abstract class Texture implements CloneableSmartAsset, Savable, Cloneable
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 5;
|
int hash = 5;
|
||||||
// NOTE: Since images are generally considered unique assets in jME3,
|
// NOTE: Since images are generally considered unique assets in jME3,
|
||||||
// using the image's hashCode() implementation is not neccessary here
|
// using the image's hashCode() implementation is not necessary here
|
||||||
// (would be too slow)
|
// (would be too slow)
|
||||||
hash = 67 * hash + (this.image != null ? System.identityHashCode(this.image) : 0);
|
hash = 67 * hash + (this.image != null ? System.identityHashCode(this.image) : 0);
|
||||||
hash = 67 * hash + (this.minificationFilter != null ? this.minificationFilter.hashCode() : 0);
|
hash = 67 * hash + (this.minificationFilter != null ? this.minificationFilter.hashCode() : 0);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -35,7 +35,7 @@ import java.nio.Buffer;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class contains a primitve allocator with no special logic, should work
|
* This class contains a primitive allocator with no special logic, should work
|
||||||
* on any jvm
|
* on any jvm
|
||||||
*/
|
*/
|
||||||
public final class PrimitiveAllocator implements BufferAllocator {
|
public final class PrimitiveAllocator implements BufferAllocator {
|
||||||
@ -43,7 +43,7 @@ public final class PrimitiveAllocator implements BufferAllocator {
|
|||||||
@Override
|
@Override
|
||||||
public void destroyDirectBuffer(Buffer toBeDestroyed) {
|
public void destroyDirectBuffer(Buffer toBeDestroyed) {
|
||||||
// no exception by intent, as this way naivly written java7/8
|
// no exception by intent, as this way naivly written java7/8
|
||||||
// applications wont crash on 9 assuming they can dispose buffers
|
// applications won't crash on 9 assuming they can dispose buffers
|
||||||
System.err.println("Warning destroyBuffer not supported");
|
System.err.println("Warning destroyBuffer not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1080,7 +1080,7 @@ final class BinaryInputCapsule implements InputCapsule {
|
|||||||
// behaviour across platforms!
|
// behaviour across platforms!
|
||||||
// Developers that have previously saved their exports using the old exporter (wich uses native encoding), can temporarly
|
// Developers that have previously saved their exports using the old exporter (wich uses native encoding), can temporarly
|
||||||
// remove the ""ISO8859_1" parameter, and change the above if statement to "if (false)".
|
// remove the ""ISO8859_1" parameter, and change the above if statement to "if (false)".
|
||||||
// They should then import and re-export their models using the same enviroment they were orginally created in.
|
// They should then import and re-export their models using the same enviroment they were originally created in.
|
||||||
return new String(bytes, "ISO8859_1");
|
return new String(bytes, "ISO8859_1");
|
||||||
}
|
}
|
||||||
} catch (UnsupportedEncodingException uee) {
|
} catch (UnsupportedEncodingException uee) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -43,7 +43,7 @@ import java.io.InputStream;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ShaderNodeDefnition file loader (.j3sn)
|
* ShaderNodeDefinition file loader (.j3sn)
|
||||||
*
|
*
|
||||||
* a j3sn file is a block style file like j3md or j3m. It must contain one
|
* a j3sn file is a block style file like j3md or j3m. It must contain one
|
||||||
* ShaderNodeDefinition{} block that contains several ShaderNodeDefinition{}
|
* ShaderNodeDefinition{} block that contains several ShaderNodeDefinition{}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -101,7 +101,7 @@ public class PFMLoader implements AssetLoader {
|
|||||||
ByteOrder order = scale < 0 ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN;
|
ByteOrder order = scale < 0 ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN;
|
||||||
boolean needEndienFlip = order != ByteOrder.nativeOrder();
|
boolean needEndienFlip = order != ByteOrder.nativeOrder();
|
||||||
|
|
||||||
// make sure all unneccessary stuff gets deleted from heap
|
// make sure all unnecessary stuff gets deleted from heap
|
||||||
// before allocating large amount of memory
|
// before allocating large amount of memory
|
||||||
System.gc();
|
System.gc();
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2015 jMonkeyEngine
|
* Copyright (c) 2009-2018 jMonkeyEngine
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -231,21 +231,21 @@ public class LightFilterTest {
|
|||||||
geom.setLocalTranslation(Vector3f.ZERO);
|
geom.setLocalTranslation(Vector3f.ZERO);
|
||||||
geom.setModelBound(new BoundingSphere(1f, Vector3f.ZERO));
|
geom.setModelBound(new BoundingSphere(1f, Vector3f.ZERO));
|
||||||
|
|
||||||
// Infinit spot lights are only filtered
|
// Infinite spot lights are only filtered
|
||||||
// if the geometry is outside the infinite cone.
|
// if the geometry is outside the infinite cone.
|
||||||
sl.setSpotRange(0);
|
sl.setSpotRange(0);
|
||||||
checkFilteredLights(1);
|
checkFilteredLights(1);
|
||||||
|
|
||||||
//the geommetry is outside the infinit cone (cone direction going away from the geom)
|
//the geommetry is outside the infinite cone (cone direction going away from the geom)
|
||||||
sl.setPosition(Vector3f.UNIT_Z.mult(1+FastMath.ZERO_TOLERANCE));
|
sl.setPosition(Vector3f.UNIT_Z.mult(1+FastMath.ZERO_TOLERANCE));
|
||||||
checkFilteredLights(0);
|
checkFilteredLights(0);
|
||||||
|
|
||||||
//place the spote ligth in the corner of the box geom, (in order to test bounding sphere)
|
//place the spot light in the corner of the box geom, (in order to test bounding sphere)
|
||||||
sl.setDirection(new Vector3f(1, 1, 0).normalizeLocal());
|
sl.setDirection(new Vector3f(1, 1, 0).normalizeLocal());
|
||||||
geom.setLocalTranslation(0, 0, 10);
|
geom.setLocalTranslation(0, 0, 10);
|
||||||
sl.setPosition(sl.getDirection().mult(-2f).add(geom.getLocalTranslation()));
|
sl.setPosition(sl.getDirection().mult(-2f).add(geom.getLocalTranslation()));
|
||||||
|
|
||||||
// make it barely reach the sphere, incorect with a box
|
// make it barely reach the sphere, incorrect with a box
|
||||||
sl.setSpotRange(1f - FastMath.ZERO_TOLERANCE);
|
sl.setSpotRange(1f - FastMath.ZERO_TOLERANCE);
|
||||||
checkFilteredLights(0);
|
checkFilteredLights(0);
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ public class LightFilterTest {
|
|||||||
sl.setSpotRange(1f + FastMath.ZERO_TOLERANCE);
|
sl.setSpotRange(1f + FastMath.ZERO_TOLERANCE);
|
||||||
checkFilteredLights(1);
|
checkFilteredLights(1);
|
||||||
|
|
||||||
// extent the range
|
// extend the range
|
||||||
sl.setPosition(Vector3f.ZERO);
|
sl.setPosition(Vector3f.ZERO);
|
||||||
sl.setDirection(Vector3f.UNIT_Z);
|
sl.setDirection(Vector3f.UNIT_Z);
|
||||||
sl.setSpotRange(20);
|
sl.setSpotRange(20);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user