diff --git a/jme3-core/build.gradle b/jme3-core/build.gradle index aa830eec35..162a2852b9 100644 --- a/jme3-core/build.gradle +++ b/jme3-core/build.gradle @@ -21,13 +21,6 @@ dependencies { testCompile project(':jme3-testdata') } -javadoc { - // Disable doclint for JDK8+. - if (JavaVersion.current().isJava8Compatible()){ - options.addStringOption('Xdoclint:none', '-quiet') - } -} - task updateVersionPropertiesFile { def versionFile = file('src/main/resources/com/jme3/system/version.properties') def versionFileText = "# THIS IS AN AUTO-GENERATED FILE..\n" + diff --git a/jme3-core/src/main/java/checkers/quals/DefaultQualifier.java b/jme3-core/src/main/java/checkers/quals/DefaultQualifier.java index 5caf5dabbd..b1b821ed06 100644 --- a/jme3-core/src/main/java/checkers/quals/DefaultQualifier.java +++ b/jme3-core/src/main/java/checkers/quals/DefaultQualifier.java @@ -36,6 +36,8 @@ * To prevent affecting other type systems, always specify an annotation * in your own type hierarchy. (For example, do not set * "checkers.quals.Unqualified" as the default.) + * + * @return the name of the default annotation */ String value(); diff --git a/jme3-core/src/main/java/checkers/quals/DefaultQualifiers.java b/jme3-core/src/main/java/checkers/quals/DefaultQualifiers.java index 41b11799f4..c2b9bef9c6 100644 --- a/jme3-core/src/main/java/checkers/quals/DefaultQualifiers.java +++ b/jme3-core/src/main/java/checkers/quals/DefaultQualifiers.java @@ -30,6 +30,6 @@ @Retention(RetentionPolicy.RUNTIME) @Target({CONSTRUCTOR, METHOD, FIELD, LOCAL_VARIABLE, PARAMETER, TYPE}) public @interface DefaultQualifiers { - /** The default qualifier settings */ + /** @return the default qualifier settings */ DefaultQualifier[] value() default { }; } diff --git a/jme3-core/src/main/java/checkers/quals/Dependent.java b/jme3-core/src/main/java/checkers/quals/Dependent.java index 88d3b39d18..1ee853cf6c 100644 --- a/jme3-core/src/main/java/checkers/quals/Dependent.java +++ b/jme3-core/src/main/java/checkers/quals/Dependent.java @@ -26,12 +26,12 @@ public @interface Dependent { /** - * The class of the refined qualifier to be applied. + * @return the class of the refined qualifier to be applied. */ Class result(); /** - * The qualifier class of the receiver that causes the {@code result} + * @return the qualifier class of the receiver that causes the {@code result} * qualifier to be applied. */ Class when(); diff --git a/jme3-core/src/main/java/checkers/quals/SubtypeOf.java b/jme3-core/src/main/java/checkers/quals/SubtypeOf.java index 189969c050..4ac0c4ea88 100644 --- a/jme3-core/src/main/java/checkers/quals/SubtypeOf.java +++ b/jme3-core/src/main/java/checkers/quals/SubtypeOf.java @@ -54,6 +54,6 @@ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.ANNOTATION_TYPE) public @interface SubtypeOf { - /** An array of the supertype qualifiers of the annotated qualifier **/ + /** @return supertype qualifiers of the annotated qualifier **/ Class[] value(); } diff --git a/jme3-core/src/main/java/checkers/quals/Unused.java b/jme3-core/src/main/java/checkers/quals/Unused.java index 17a9c8039e..54cdb5f531 100644 --- a/jme3-core/src/main/java/checkers/quals/Unused.java +++ b/jme3-core/src/main/java/checkers/quals/Unused.java @@ -38,6 +38,8 @@ /** * The field that is annotated with @Unused may not be accessed via a * receiver that is annotated with the "when" annotation. + * + * @return the annotation class */ Class when(); } diff --git a/jme3-core/src/main/java/com/jme3/anim/AnimComposer.java b/jme3-core/src/main/java/com/jme3/anim/AnimComposer.java index 52b830bb79..7c404e535b 100644 --- a/jme3-core/src/main/java/com/jme3/anim/AnimComposer.java +++ b/jme3-core/src/main/java/com/jme3/anim/AnimComposer.java @@ -202,6 +202,7 @@ public double getTime() { * Returns current time of the specified layer. * * @param layerName The layer from which to get the time. + * @return the time (in seconds) */ public double getTime(String layerName) { Layer l = layers.get(layerName); @@ -213,6 +214,8 @@ public double getTime(String layerName) { /** * Sets current time on the default layer. + * + * @param time the desired time (in seconds) */ public void setTime(double time) { setTime(DEFAULT_LAYER, time); @@ -220,6 +223,9 @@ public void setTime(double time) { /** * Sets current time on the specified layer. + * + * @param layerName the name of the Layer to modify + * @param time the desired time (in seconds) */ public void setTime(String layerName, double time) { Layer l = layers.get(layerName); @@ -326,6 +332,10 @@ public void removeLayer(String name) { /** * Creates an action that will interpolate over an entire sequence * of tweens in order. + * + * @param name a name for the new Action + * @param tweens the desired sequence of tweens + * @return a new instance */ public BaseAction actionSequence(String name, Tween... tweens) { BaseAction action = new BaseAction(Tweens.sequence(tweens)); @@ -336,6 +346,11 @@ public BaseAction actionSequence(String name, Tween... tweens) { /** * Creates an action that blends the named clips using the given blend * space. + * + * @param name a name for the new Action + * @param blendSpace how to blend the clips (not null, alias created) + * @param clips the names of the clips to be used (not null) + * @return a new instance */ public BlendAction actionBlended(String name, BlendSpace blendSpace, String... clips) { BlendableAction[] acts = new BlendableAction[clips.length]; diff --git a/jme3-core/src/main/java/com/jme3/anim/Armature.java b/jme3-core/src/main/java/com/jme3/anim/Armature.java index 43a90ea223..8ae16cf485 100644 --- a/jme3-core/src/main/java/com/jme3/anim/Armature.java +++ b/jme3-core/src/main/java/com/jme3/anim/Armature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -113,7 +113,7 @@ private void createSkinningMatrices() { * Sets the JointModelTransform implementation * Default is {@link MatrixJointModelTransform} * - * @param modelTransformClass + * @param modelTransformClass which implementation to use * @see JointModelTransform * @see MatrixJointModelTransform * @see SeparateJointModelTransform @@ -152,7 +152,7 @@ public List getJointList() { /** * return a joint for the given index * - * @param index + * @param index a zero-based joint index (≥0) * @return the pre-existing instance */ public Joint getJoint(int index) { @@ -162,7 +162,7 @@ public Joint getJoint(int index) { /** * returns the joint with the given name * - * @param name + * @param name the name to search for * @return the pre-existing instance or null if not found */ public Joint getJoint(String name) { @@ -177,7 +177,7 @@ public Joint getJoint(String name) { /** * returns the bone index of the given bone * - * @param joint + * @param joint the Joint to search for * @return the index (≥0) or -1 if not found */ public int getJointIndex(Joint joint) { @@ -193,7 +193,7 @@ public int getJointIndex(Joint joint) { /** * returns the joint index of the joint that has the given name * - * @param name + * @param name the name to search for * @return the index (≥0) or -1 if not found */ public int getJointIndex(String name) { diff --git a/jme3-core/src/main/java/com/jme3/anim/ArmatureMask.java b/jme3-core/src/main/java/com/jme3/anim/ArmatureMask.java index 04386f9c03..f1701d6325 100644 --- a/jme3-core/src/main/java/com/jme3/anim/ArmatureMask.java +++ b/jme3-core/src/main/java/com/jme3/anim/ArmatureMask.java @@ -28,6 +28,9 @@ public static ArmatureMask createMask(Armature armature, String... joints) { /** * Add joints to be influenced by this animation mask. + * + * @param armature the Armature containing the joints + * @param jointNames the names of the joints to be influenced */ public void addBones(Armature armature, String... jointNames) { for (String jointName : jointNames) { @@ -46,6 +49,9 @@ private Joint findJoint(Armature armature, String jointName) { /** * Add a joint and all its sub armature joints to be influenced by this animation mask. + * + * @param armature the Armature containing the ancestor joint + * @param jointName the names of the ancestor joint */ public void addFromJoint(Armature armature, String jointName) { Joint joint = findJoint(armature, jointName); diff --git a/jme3-core/src/main/java/com/jme3/anim/MorphTrack.java b/jme3-core/src/main/java/com/jme3/anim/MorphTrack.java index ae3a6bf713..0cbeed7deb 100644 --- a/jme3-core/src/main/java/com/jme3/anim/MorphTrack.java +++ b/jme3-core/src/main/java/com/jme3/anim/MorphTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,10 +65,13 @@ protected MorphTrack() { /** * Creates a morph track with the given Geometry as a target * + * @param target the desired target (alias created) * @param times a float array with the time of each frame (alias created * -- do not modify after passing it to this constructor) * @param weights the morphs for each frames (alias created -- do not * modify after passing it to this constructor) + * @param nbMorphTargets + * the desired number of morph targets */ public MorphTrack(Geometry target, float[] times, float[] weights, int nbMorphTargets) { this.target = target; diff --git a/jme3-core/src/main/java/com/jme3/anim/SkinningControl.java b/jme3-core/src/main/java/com/jme3/anim/SkinningControl.java index 1542213610..fd312a5d8f 100644 --- a/jme3-core/src/main/java/com/jme3/anim/SkinningControl.java +++ b/jme3-core/src/main/java/com/jme3/anim/SkinningControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -185,7 +185,8 @@ private boolean testHardwareSupported(RenderManager rm) { * supported by GPU, it shall be enabled, if its not preferred, or not * supported by GPU, then it shall be disabled. * - * @param preferred + * @param preferred true to prefer hardware skinning, false to prefer + * software skinning (default=true) * @see #isHardwareSkinningUsed() */ public void setHardwareSkinningPreferred(boolean preferred) { diff --git a/jme3-core/src/main/java/com/jme3/anim/TransformTrack.java b/jme3-core/src/main/java/com/jme3/anim/TransformTrack.java index f5c16d67d5..c9830ef6b5 100644 --- a/jme3-core/src/main/java/com/jme3/anim/TransformTrack.java +++ b/jme3-core/src/main/java/com/jme3/anim/TransformTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,6 +69,7 @@ public TransformTrack() { /** * Creates a transform track for the given bone index * + * @param target the target Joint or Spatial of the new track * @param times a float array with the time of each frame * @param translations the translation of the bone for each frame * @param rotations the rotation of the bone for each frame diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/Tween.java b/jme3-core/src/main/java/com/jme3/anim/tween/Tween.java index 08ab3aca29..6912d20361 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/Tween.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/Tween.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020 jMonkeyEngine + * Copyright (c) 2015-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,6 +46,8 @@ public interface Tween extends Cloneable { * will run. Note: all of the caveats are because tweens may be * externally scaled in such a way that 't' no longer represents * actual time. + * + * @return the duration (in de-scaled seconds) */ public double getLength(); @@ -56,6 +58,9 @@ public interface Tween extends Cloneable { * then it is internally clamped and the method returns false. * If 't' is still in the tween's range then this method returns * true. + * + * @param t animation time (in de-scaled seconds) + * @return true if t>length(), otherwise false */ public boolean interpolate(double t); diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java b/jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java index 32421428ff..c4c823ec71 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java @@ -61,6 +61,9 @@ private Tweens() { /** * Creates a tween that will interpolate over an entire sequence * of tweens in order. + * + * @param delegates the desired sequence of tweens + * @return a new instance */ public static Tween sequence(Tween... delegates) { return new Sequence(delegates); @@ -70,6 +73,9 @@ public static Tween sequence(Tween... delegates) { * Creates a tween that will interpolate over an entire list * of tweens in parallel, ie: all tweens will be run at the same * time. + * + * @param delegates the tweens to be interpolated + * @return a new instance */ public static Tween parallel(Tween... delegates) { return new Parallel(delegates); @@ -78,6 +84,9 @@ public static Tween parallel(Tween... delegates) { /** * Creates a tween that will perform a no-op until the length * has expired. + * + * @param length the desired duration (in seconds) + * @return a new instance */ public static Tween delay(double length) { return new Delay(length); @@ -87,6 +96,10 @@ public static Tween delay(double length) { * Creates a tween that scales the specified delegate tween or tweens * to the desired length. If more than one tween is specified then they * are wrapped in a sequence using the sequence() method. + * + * @param desiredLength the desired duration (in seconds) + * @param delegates the desired sequence of tweens + * @return a new instance */ public static Tween stretch(double desiredLength, Tween... delegates) { if (delegates.length == 1) { @@ -99,6 +112,9 @@ public static Tween stretch(double desiredLength, Tween... delegates) { * Creates a tween that uses a sine function to smooth step the time value * for the specified delegate tween or tweens. These 'curved' wrappers * can be used to smooth the interpolation of another tween. + * + * @param delegates the desired sequence of tweens + * @return a new instance */ public static Tween sineStep(Tween... delegates) { if (delegates.length == 1) { @@ -112,6 +128,9 @@ public static Tween sineStep(Tween... delegates) { * for the specified delegate tween or tweens. This is similar to GLSL's * smoothstep(). These 'curved' wrappers can be used to smooth the interpolation * of another tween. + * + * @param delegates the desired sequence of tweens + * @return a new instance */ public static Tween smoothStep(Tween... delegates) { if (delegates.length == 1) { @@ -124,6 +143,11 @@ public static Tween smoothStep(Tween... delegates) { * Creates a Tween that will call the specified method and optional arguments * whenever supplied a time value greater than or equal to 0. This creates * an "instant" tween of length 0. + * + * @param target object on which the method is to be invoked + * @param method name of the method to be invoked + * @param args arguments to be passed to the method + * @return a new instance */ public static Tween callMethod(Object target, String method, Object... args) { return new CallMethod(target, method, args); @@ -134,7 +158,7 @@ public static Tween callMethod(Object target, String method, Object... args) { * including the time value scaled between 0 and 1. The method must take * a float or double value as its first or last argument, in addition to whatever * optional arguments are specified. - *

+ * *

For example:

*
Tweens.callTweenMethod(1, myObject, "foo", "bar")
*

Would work for any of the following method signatures:

@@ -144,6 +168,12 @@ public static Tween callMethod(Object target, String method, Object... args) { * void foo( String arg, float t ) * void foo( String arg, double t ) * + * + * @param length the desired duration (in seconds) + * @param target object on which the method is to be invoked + * @param method name of the method to be invoked + * @param args additional arguments to be passed to the method + * @return a new instance */ public static Tween callTweenMethod(double length, Object target, String method, Object... args) { return new CallTweenMethod(length, target, method, args); diff --git a/jme3-core/src/main/java/com/jme3/anim/util/Primitives.java b/jme3-core/src/main/java/com/jme3/anim/util/Primitives.java index 1ba97d7293..56fbbf4788 100644 --- a/jme3-core/src/main/java/com/jme3/anim/util/Primitives.java +++ b/jme3-core/src/main/java/com/jme3/anim/util/Primitives.java @@ -42,12 +42,16 @@ private Primitives() { /** * Returns the corresponding wrapper type of {@code type} if it is a primitive type; otherwise * returns {@code type} itself. Idempotent. - *

+ * *

      *     wrap(int.class) == Integer.class
      *     wrap(Integer.class) == Integer.class
      *     wrap(String.class) == String.class
      * 
+ * + * @param type + * @param type the type to be boxed (not null) + * @return the boxed type */ public static Class wrap(Class type) { if (type == null) { diff --git a/jme3-core/src/main/java/com/jme3/animation/AnimChannel.java b/jme3-core/src/main/java/com/jme3/animation/AnimChannel.java index 04c8c2f49a..4fccf64b3c 100644 --- a/jme3-core/src/main/java/com/jme3/animation/AnimChannel.java +++ b/jme3-core/src/main/java/com/jme3/animation/AnimChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -244,6 +244,8 @@ public void addAllBones() { /** * Add a single bone to be influenced by this animation channel. + * + * @param name the name of the Bone to be influenced */ public void addBone(String name) { addBone(control.getSkeleton().getBone(name)); @@ -251,6 +253,8 @@ public void addBone(String name) { /** * Add a single bone to be influenced by this animation channel. + * + * @param bone the Bone to be influenced */ public void addBone(Bone bone) { int boneIndex = control.getSkeleton().getBoneIndex(bone); @@ -263,6 +267,8 @@ public void addBone(Bone bone) { /** * Add bones to be influenced by this animation channel starting from the * given bone name and going toward the root bone. + * + * @param name the name of the Bone to use as a starting point */ public void addToRootBone(String name) { addToRootBone(control.getSkeleton().getBone(name)); @@ -271,6 +277,8 @@ public void addToRootBone(String name) { /** * Add bones to be influenced by this animation channel starting from the * given bone and going toward the root bone. + * + * @param bone the Bone to use as a starting point */ public void addToRootBone(Bone bone) { addBone(bone); @@ -283,6 +291,8 @@ public void addToRootBone(Bone bone) { /** * Add bones to be influenced by this animation channel, starting * from the given named bone and going toward its children. + * + * @param name the name of the Bone to use as a starting point */ public void addFromRootBone(String name) { addFromRootBone(control.getSkeleton().getBone(name)); @@ -291,6 +301,8 @@ public void addFromRootBone(String name) { /** * Add bones to be influenced by this animation channel, starting * from the given bone and going toward its children. + * + * @param bone the Bone to use as a starting point */ public void addFromRootBone(Bone bone) { addBone(bone); diff --git a/jme3-core/src/main/java/com/jme3/animation/AnimControl.java b/jme3-core/src/main/java/com/jme3/animation/AnimControl.java index 7718fb3463..f98e0fd743 100644 --- a/jme3-core/src/main/java/com/jme3/animation/AnimControl.java +++ b/jme3-core/src/main/java/com/jme3/animation/AnimControl.java @@ -251,7 +251,7 @@ public void addListener(AnimEventListener listener) { /** * Removes the given listener from listening to events. * - * @param listener + * @param listener the listener to remove * @see AnimControl#addListener(com.jme3.animation.AnimEventListener) */ public void removeListener(AnimEventListener listener) { diff --git a/jme3-core/src/main/java/com/jme3/animation/Animation.java b/jme3-core/src/main/java/com/jme3/animation/Animation.java index 0d146b8d1d..5b43475c01 100644 --- a/jme3-core/src/main/java/com/jme3/animation/Animation.java +++ b/jme3-core/src/main/java/com/jme3/animation/Animation.java @@ -99,7 +99,7 @@ public float getLength() { /** * Set the length of the animation * - * @param length + * @param length the desired duration (in seconds) */ public void setLength(float length) { this.length = length; @@ -108,7 +108,7 @@ public void setLength(float length) { /** * Sets the name of the animation * - * @param name + * @param name the desired name */ public void setName(String name) { this.name = name; @@ -193,7 +193,7 @@ public Animation clone() { /** * - * @param spat + * @param spat the Spatial to clone for * @return a new instance */ public Animation cloneForSpatial(Spatial spat) { diff --git a/jme3-core/src/main/java/com/jme3/animation/AnimationUtils.java b/jme3-core/src/main/java/com/jme3/animation/AnimationUtils.java index 8521da4c8d..4092821952 100644 --- a/jme3-core/src/main/java/com/jme3/animation/AnimationUtils.java +++ b/jme3-core/src/main/java/com/jme3/animation/AnimationUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,9 +42,10 @@ private AnimationUtils(){ } /** * Clamps the time according to duration and loopMode - * @param time - * @param duration - * @param loopMode + * + * @param time the unclamped time value (in seconds) + * @param duration the animation's duration (in seconds) + * @param loopMode the animation's looping behavior (not null) * @return the clamped time (in seconds) */ public static float clampWrapTime(float time, float duration, LoopMode loopMode){ diff --git a/jme3-core/src/main/java/com/jme3/animation/AudioTrack.java b/jme3-core/src/main/java/com/jme3/animation/AudioTrack.java index 41e7a151a5..9f6b1ded30 100644 --- a/jme3-core/src/main/java/com/jme3/animation/AudioTrack.java +++ b/jme3-core/src/main/java/com/jme3/animation/AudioTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -279,7 +279,7 @@ public AudioNode getAudio() { /** * sets the audio node to be used for this track * - * @param audio + * @param audio the desired AudioNode (alias created) */ public void setAudio(AudioNode audio) { if (this.audio != null) { @@ -301,7 +301,7 @@ public float getStartOffset() { /** * set the start offset of the track * - * @param startOffset + * @param startOffset the desired start offset */ public void setStartOffset(float startOffset) { this.startOffset = startOffset; diff --git a/jme3-core/src/main/java/com/jme3/animation/Bone.java b/jme3-core/src/main/java/com/jme3/animation/Bone.java index 14a8da319c..0cddbe5aef 100644 --- a/jme3-core/src/main/java/com/jme3/animation/Bone.java +++ b/jme3-core/src/main/java/com/jme3/animation/Bone.java @@ -297,7 +297,8 @@ public Vector3f getModelSpaceScale() { return modelScale; } - /** + /** + * @return the pre-existing vector * @deprecated use {@link #getModelBindInversePosition()} */ @Deprecated @@ -317,7 +318,8 @@ public Vector3f getModelBindInversePosition() { return modelBindInversePos; } - /** + /** + * @return the pre-existing Quaternion * @deprecated use {@link #getModelBindInverseRotation()} */ @Deprecated @@ -338,7 +340,8 @@ public Quaternion getModelBindInverseRotation() { } - /** + /** + * @return the pre-existing vector * @deprecated use {@link #getModelBindInverseScale()} */ @Deprecated @@ -378,7 +381,8 @@ public Transform getBindInverseTransform() { return t.invert(); } - /** + /** + * @return the pre-existing vector * @deprecated use {@link #getBindPosition()} */ @Deprecated @@ -398,7 +402,8 @@ public Vector3f getBindPosition() { return bindPos; } - /** + /** + * @return the pre-existing Quaternion * @deprecated use {@link #getBindRotation() } */ @Deprecated @@ -419,6 +424,7 @@ public Quaternion getBindRotation() { } /** + * @return the pre-existing vector * @deprecated use {@link #getBindScale() } */ @Deprecated @@ -441,6 +447,8 @@ public Vector3f getBindScale() { /** * If enabled, user can control bone transform with setUserTransforms. * Animation transforms are not applied to this bone when enabled. + * + * @param enable true for direct control, false for canned animations */ public void setUserControl(boolean enable) { userControl = enable; @@ -700,6 +708,7 @@ public void setUserTransformsInModelSpace(Vector3f translation, Quaternion rotat * Returns the local transform of this bone combined with the given position and rotation * @param position a position * @param rotation a rotation + * @return the resulting Transform (in reusable temporary storage!) */ public Transform getCombinedTransform(Vector3f position, Quaternion rotation) { if(tmpTransform == null){ @@ -840,6 +849,10 @@ void blendAnimTransforms(Vector3f translation, Quaternion rotation, Vector3f sca /** * Sets local bind transform for bone. * Call setBindingPose() after all of the skeleton bones' bind transforms are set to save them. + * + * @param translation the desired bind translation (not null, unaffected) + * @param rotation the desired bind rotation (not null, unaffected) + * @param scale the desired bind scale (unaffected) or null for no scaling */ public void setBindTransforms(Vector3f translation, Quaternion rotation, Vector3f scale) { bindPos.set(translation); @@ -925,7 +938,8 @@ public void write(JmeExporter ex) throws IOException { /** * Sets the rotation of the bone in object space. * Warning: you need to call {@link #setUserControl(boolean)} with true to be able to do that operation - * @param rot + * + * @param rot the desired rotation (not null, unaffected) */ public void setLocalRotation(Quaternion rot){ if (!userControl) { @@ -937,7 +951,8 @@ public void setLocalRotation(Quaternion rot){ /** * Sets the position of the bone in object space. * Warning: you need to call {@link #setUserControl(boolean)} with true to be able to do that operation - * @param pos + * + * @param pos the desired translation (not null, unaffected) */ public void setLocalTranslation(Vector3f pos){ if (!userControl) { diff --git a/jme3-core/src/main/java/com/jme3/animation/BoneTrack.java b/jme3-core/src/main/java/com/jme3/animation/BoneTrack.java index 373aa6ecfb..e3272413fe 100644 --- a/jme3-core/src/main/java/com/jme3/animation/BoneTrack.java +++ b/jme3-core/src/main/java/com/jme3/animation/BoneTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -198,9 +198,9 @@ public void setKeyframes(float[] times, Vector3f[] translations, Quaternion[] ro * * @param time the current time of the animation * @param weight the weight of the animation - * @param control - * @param channel - * @param vars + * @param control to access the Skeleton + * @param channel which bones can be affected + * @param vars storage for temporary values */ @Override public void setTime(float time, float weight, AnimControl control, AnimChannel channel, TempVars vars) { diff --git a/jme3-core/src/main/java/com/jme3/animation/CompactArray.java b/jme3-core/src/main/java/com/jme3/animation/CompactArray.java index b853bf355a..182e42c9ef 100644 --- a/jme3-core/src/main/java/com/jme3/animation/CompactArray.java +++ b/jme3-core/src/main/java/com/jme3/animation/CompactArray.java @@ -40,7 +40,8 @@ /** * Object is indexed and stored in primitive float[] * @author Lim, YongHoon - * @param + * + * @param the type of object (i.e. Vector3f) */ public abstract class CompactArray implements JmeCloneable { @@ -57,8 +58,9 @@ public CompactArray() { /** * create array using serialized data - * @param compressedArray - * @param index + * + * @param compressedArray storage for float data + * @param index storage for indices */ public CompactArray(float[] compressedArray, int[] index) { this.array = compressedArray; @@ -68,7 +70,8 @@ public CompactArray(float[] compressedArray, int[] index) { /** * Add objects. * They are serialized automatically when get() method is called. - * @param objArray + * + * @param objArray the objects to be added (may be null) */ @SuppressWarnings("unchecked") public void add(T... objArray) { @@ -119,8 +122,8 @@ protected void setInvalid(boolean invalid) { } /** - * @param index - * @param value + * @param index zero-origin index of the element to be altered + * @param value the desired value */ public final void set(int index, T value) { int j = getCompactIndex(index); @@ -194,7 +197,8 @@ protected float[] ensureCapacity(float[] arr, int size) { /** * Return an array of indices for the given objects - * @param objArray + * + * @param objArray the input objects * @return a new array */ @SuppressWarnings("unchecked") @@ -209,7 +213,8 @@ public final int[] getIndex(T... objArray) { /** * returns the corresponding index in the compact array - * @param objIndex + * + * @param objIndex the input index * @return object index in the compacted object array */ public int getCompactIndex(int objIndex) { @@ -260,7 +265,7 @@ public final T[] toObjectArray() { * Create a deep clone of this array. * * @return a new array - * @throws java.lang.CloneNotSupportedException + * @throws CloneNotSupportedException never */ @Override public Object clone() throws CloneNotSupportedException { @@ -300,19 +305,22 @@ public void cloneFields(Cloner cloner, Object original) { /** * serialize object * @param compactIndex compacted object index - * @param store + * @param store the value to be serialized (not null, unaffected) */ protected abstract void serialize(int compactIndex, T store); /** * deserialize object * @param compactIndex compacted object index - * @param store + * @param store storage for the result + * @return the deserialized value */ protected abstract T deserialize(int compactIndex, T store); /** * serialized size of one object element + * + * @return the number of primitive components (floats) per object */ protected abstract int getTupleSize(); diff --git a/jme3-core/src/main/java/com/jme3/animation/EffectTrack.java b/jme3-core/src/main/java/com/jme3/animation/EffectTrack.java index fc152c7b5e..dc112f1b98 100644 --- a/jme3-core/src/main/java/com/jme3/animation/EffectTrack.java +++ b/jme3-core/src/main/java/com/jme3/animation/EffectTrack.java @@ -347,7 +347,7 @@ public ParticleEmitter getEmitter() { /** * Sets the Emitter to use in this track * - * @param emitter + * @param emitter the emitter to be controlled (alias created) */ public void setEmitter(ParticleEmitter emitter) { if (this.emitter != null) { @@ -373,7 +373,7 @@ public float getStartOffset() { /** * set the start offset of the track * - * @param startOffset + * @param startOffset the start offset (in seconds) */ public void setStartOffset(float startOffset) { this.startOffset = startOffset; diff --git a/jme3-core/src/main/java/com/jme3/animation/Skeleton.java b/jme3-core/src/main/java/com/jme3/animation/Skeleton.java index 33c81e8f03..39a3e41e98 100644 --- a/jme3-core/src/main/java/com/jme3/animation/Skeleton.java +++ b/jme3-core/src/main/java/com/jme3/animation/Skeleton.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -211,7 +211,8 @@ public Bone[] getRoots() { /** * return a bone for the given index - * @param index + * + * @param index the (zero-based) bone index (≥0) * @return the pre-existing instance */ public Bone getBone(int index) { @@ -220,7 +221,8 @@ public Bone getBone(int index) { /** * returns the bone with the given name - * @param name + * + * @param name the name to search for * @return the pre-existing instance, or null if not found */ public Bone getBone(String name) { @@ -234,7 +236,8 @@ public Bone getBone(String name) { /** * returns the bone index of the given bone - * @param bone + * + * @param bone the Bone to search for (unaffected) * @return the index (≥0) or -1 if not found */ public int getBoneIndex(Bone bone) { @@ -249,7 +252,8 @@ public int getBoneIndex(Bone bone) { /** * returns the bone index of the bone that has the given name - * @param name + * + * @param name the name to search for * @return the index (≥0) or -1 if not found */ public int getBoneIndex(String name) { diff --git a/jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java b/jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java index adf4a5e0dc..a6b1992eb8 100644 --- a/jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java +++ b/jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java @@ -167,7 +167,8 @@ private boolean testHardwareSupported(RenderManager rm) { * supported by GPU, it shall be enabled, if it's not preferred, or not * supported by GPU, then it shall be disabled. * - * @param preferred + * @param preferred true to prefer hardware skinning, false to prefer + * software skinning (default=true) * @see #isHardwareSkinningUsed() */ public void setHardwareSkinningPreferred(boolean preferred) { diff --git a/jme3-core/src/main/java/com/jme3/animation/Track.java b/jme3-core/src/main/java/com/jme3/animation/Track.java index 7777e88948..a9d753cd18 100644 --- a/jme3-core/src/main/java/com/jme3/animation/Track.java +++ b/jme3-core/src/main/java/com/jme3/animation/Track.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2018 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,7 @@ public interface Track extends Savable, Cloneable { * @param weight The weight from 0 to 1 on how much to apply the track * @param control The control which the track should affect * @param channel The channel which the track should affect + * @param vars temporary storage */ public void setTime(float time, float weight, AnimControl control, AnimChannel channel, TempVars vars); diff --git a/jme3-core/src/main/java/com/jme3/app/Application.java b/jme3-core/src/main/java/com/jme3/app/Application.java index 5a3e506dd3..42805192e7 100644 --- a/jme3-core/src/main/java/com/jme3/app/Application.java +++ b/jme3-core/src/main/java/com/jme3/app/Application.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -115,6 +115,8 @@ public interface Application { * Sets the Timer implementation that will be used for calculating * frame times. By default, Application will use the Timer as returned * by the current JmeContext implementation. + * + * @param timer the desired timer (alias created) */ public void setTimer(Timer timer); @@ -174,6 +176,9 @@ public interface Application { /** * Starts the application. * A bug occuring when using LWJGL3 prevents this method from returning until after the application is stopped. + * + * @param waitFor true→wait for the context to be initialized, + * false→don't wait */ public void start(boolean waitFor); @@ -181,11 +186,16 @@ public interface Application { * Sets an AppProfiler hook that will be called back for * specific steps within a single update frame. Value defaults * to null. + * + * @param prof the profiler to use (alias created) or null for none + * (default=null) */ public void setAppProfiler(AppProfiler prof); /** * Returns the current AppProfiler hook, or null if none is set. + * + * @return the pre-existing instance, or null if none */ public AppProfiler getAppProfiler(); @@ -212,6 +222,9 @@ public interface Application { * Requests the context to close, shutting down the main loop * and making necessary cleanup operations. * After the application has stopped, it cannot be used anymore. + * + @param waitFor true→wait for the context to be fully destroyed, + * true→don't wait */ public void stop(boolean waitFor); @@ -223,7 +236,9 @@ public interface Application { * They are executed even if the application is currently paused * or out of focus. * + * @param type of result returned by the Callable * @param callable The callable to run in the main jME3 thread + * @return a new instance */ public Future enqueue(Callable callable); diff --git a/jme3-core/src/main/java/com/jme3/app/BasicProfiler.java b/jme3-core/src/main/java/com/jme3/app/BasicProfiler.java index fd880122cd..44d2f2427d 100644 --- a/jme3-core/src/main/java/com/jme3/app/BasicProfiler.java +++ b/jme3-core/src/main/java/com/jme3/app/BasicProfiler.java @@ -83,6 +83,8 @@ public BasicProfiler( int size ) { /** * Sets the number of frames to display and track. By default * this is 1280. + * + * @param size the desired number of frames (≥0, default=1280) */ public final void setFrameCount( int size ) { if( this.size == size ) { @@ -106,6 +108,8 @@ public int getFrameCount() { /** * Sets the number of nanoseconds to wait before updating the * mesh. By default this is once a millisecond, ie: 1000000 nanoseconds. + * + * @param nanos the desired update interval (in nanoseconds, default=1e6) */ public void setUpdateInterval( long nanos ) { this.updateInterval = nanos; @@ -118,6 +122,8 @@ public long getUpdateInterval() { /** * Returns the mesh that contains the bar chart of tracked frame * timings. + * + * @return the pre-existing Mesh */ public Mesh getMesh() { return mesh; diff --git a/jme3-core/src/main/java/com/jme3/app/ChaseCameraAppState.java b/jme3-core/src/main/java/com/jme3/app/ChaseCameraAppState.java index da62e6ad7f..e75795f63c 100644 --- a/jme3-core/src/main/java/com/jme3/app/ChaseCameraAppState.java +++ b/jme3-core/src/main/java/com/jme3/app/ChaseCameraAppState.java @@ -194,6 +194,8 @@ protected void rotateCamera() { /** * move the camera toward or away the target + * + * @param value the distance to move */ protected void zoomCamera(float value) { distance = FastMath.clamp(distance + value, minDistance, maxDistance); @@ -221,7 +223,7 @@ public void update(float tpf) { * new MouseButtonTrigger(MouseInput.BUTTON_LEFT) left mouse button new * MouseButtonTrigger(MouseInput.BUTTON_RIGHT) right mouse button * - * @param triggers + * @param triggers the desired triggers */ public void setToggleRotationTrigger(Trigger... triggers) { toggleRotateTrigger = triggers; @@ -236,7 +238,7 @@ public void setToggleRotationTrigger(Trigger... triggers) { * Sets custom triggers for zooming in the cam default is new * MouseAxisTrigger(MouseInput.AXIS_WHEEL, true) mouse wheel up * - * @param triggers + * @param triggers the desired triggers */ public void setZoomInTrigger(Trigger... triggers) { zoomInTrigger = triggers; @@ -251,7 +253,7 @@ public void setZoomInTrigger(Trigger... triggers) { * Sets custom triggers for zooming out the cam default is new * MouseAxisTrigger(MouseInput.AXIS_WHEEL, false) mouse wheel down * - * @param triggers + * @param triggers the desired triggers */ public void setZoomOutTrigger(Trigger... triggers) { zoomOutTrigger = triggers; @@ -274,7 +276,8 @@ public float getMaxDistance() { /** * Sets the max zoom distance of the camera (default is 40) * - * @param maxDistance + * @param maxDistance the desired maximum distance (in world units, + * default=40) */ public void setMaxDistance(float maxDistance) { this.maxDistance = maxDistance; @@ -286,7 +289,7 @@ public void setMaxDistance(float maxDistance) { /** * Returns the min zoom distance of the camera (default is 1) * - * @return minDistance + * @return the minimum distance (in world units) */ public float getMinDistance() { return minDistance; @@ -295,7 +298,8 @@ public float getMinDistance() { /** * Sets the min zoom distance of the camera (default is 1) * - * @param minDistance + * @param minDistance the desired minimum distance (in world units, + * default=1) */ public void setMinDistance(float minDistance) { this.minDistance = minDistance; @@ -316,7 +320,8 @@ public float getMaxVerticalRotation() { * Sets the maximal vertical rotation angle in radian of the camera around * the target. Default is Pi/2; * - * @param maxVerticalRotation + * @param maxVerticalRotation the desired maximum angle (in radians, + * default=Pi/2) */ public void setMaxVerticalRotation(float maxVerticalRotation) { this.maxVerticalRotation = maxVerticalRotation; @@ -338,7 +343,7 @@ public float getMinVerticalRotation() { * Sets the minimal vertical rotation angle in radian of the camera around * the target default is 0; * - * @param minHeight + * @param minHeight the desired minimum angle (in radians, default=0) */ public void setMinVerticalRotation(float minHeight) { this.minVerticalRotation = minHeight; @@ -388,7 +393,7 @@ public void setRotationSpeed(float rotationSpeed) { /** * Sets the default distance at start of application * - * @param defaultDistance + * @param defaultDistance the desired distance (in world units, default=20) */ public void setDefaultDistance(float defaultDistance) { distance = defaultDistance; @@ -398,7 +403,7 @@ public void setDefaultDistance(float defaultDistance) { * sets the default horizontal rotation in radian of the camera at start of * the application * - * @param angleInRad + * @param angleInRad the desired rotation (in radians, default=0) */ public void setDefaultHorizontalRotation(float angleInRad) { horizontalRotation = angleInRad; @@ -408,7 +413,7 @@ public void setDefaultHorizontalRotation(float angleInRad) { * sets the default vertical rotation in radian of the camera at start of * the application * - * @param angleInRad + * @param angleInRad the desired rotation (in radians, default=0) */ public void setDefaultVerticalRotation(float angleInRad) { verticalRotation = angleInRad; @@ -441,7 +446,7 @@ public void setDragToRotate(boolean dragToRotate) { /** * invert the vertical axis movement of the mouse * - * @param invertYaxis + * @param invertYaxis true→inverted, false→not inverted */ public void setInvertVerticalAxis(boolean invertYaxis) { this.invertYaxis = invertYaxis; @@ -456,7 +461,7 @@ public void setInvertVerticalAxis(boolean invertYaxis) { /** * invert the Horizontal axis movement of the mouse * - * @param invertXaxis + * @param invertXaxis true→inverted, false→not inverted */ public void setInvertHorizontalAxis(boolean invertXaxis) { this.invertXaxis = invertXaxis; diff --git a/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java b/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java index f8f52cab94..8158cf721d 100644 --- a/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java +++ b/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java @@ -108,6 +108,8 @@ public LegacyApplication() { /** * Create a new instance of LegacyApplication, preinitialized * with the specified set of app states. + * + * @param initialStates app states to pre-attach, or null for none */ public LegacyApplication( AppState... initialStates ) { initStateManager(); @@ -444,6 +446,8 @@ public void start(){ /** * Starts the application in {@link Type#Display display} mode. * + * @param waitFor true→wait for the context to be initialized, + * false→don't wait * @see #start(com.jme3.system.JmeContext.Type) */ @Override @@ -455,6 +459,8 @@ public void start(boolean waitFor){ * Starts the application. * Creating a rendering context and executing * the main loop in a separate thread. + * + * @param contextType the type of context to create */ public void start(JmeContext.Type contextType) { start(contextType, false); @@ -464,6 +470,10 @@ public void start(JmeContext.Type contextType) { * Starts the application. * Creating a rendering context and executing * the main loop in a separate thread. + * + * @param contextType the type of context to create + * @param waitFor true→wait for the context to be initialized, + * false→don't wait */ public void start(JmeContext.Type contextType, boolean waitFor){ if (context != null && context.isCreated()){ @@ -485,6 +495,8 @@ public void start(JmeContext.Type contextType, boolean waitFor){ * Sets an AppProfiler hook that will be called back for * specific steps within a single update frame. Value defaults * to null. + * + * @param prof the profiler to use (alias created) or null for none */ @Override public void setAppProfiler(AppProfiler prof) { @@ -595,6 +607,9 @@ public void stop(){ * Requests the context to close, shutting down the main loop * and making necessary cleanup operations. * After the application has stopped, it cannot be used anymore. + * + * @param waitFor true→wait for the context to be fully destroyed, + * true→don't wait */ @Override public void stop(boolean waitFor){ @@ -698,7 +713,9 @@ public void requestClose(boolean esc){ * They are executed even if the application is currently paused * or out of focus. * + * @param type of result returned by the Callable * @param callable The callable to run in the main jME3 thread + * @return a new instance */ @Override public Future enqueue(Callable callable) { diff --git a/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java b/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java index b322a0820e..629778ee0d 100644 --- a/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java +++ b/jme3-core/src/main/java/com/jme3/app/SimpleApplication.java @@ -186,6 +186,8 @@ public void setShowSettings(boolean showSettings) { /** * Creates the font that will be set to the guiFont field * and subsequently set as the font for the stats text. + * + * @return the loaded BitmapFont */ protected BitmapFont loadGuiFont() { return assetManager.loadFont("Interface/Fonts/Default.fnt"); diff --git a/jme3-core/src/main/java/com/jme3/app/StatsAppState.java b/jme3-core/src/main/java/com/jme3/app/StatsAppState.java index d5ffde097b..1e2b627726 100644 --- a/jme3-core/src/main/java/com/jme3/app/StatsAppState.java +++ b/jme3-core/src/main/java/com/jme3/app/StatsAppState.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -80,6 +80,8 @@ public StatsAppState( Node guiNode, BitmapFont guiFont ) { * so that the fpsText can be created before init. This * is because several applications expect to directly access * fpsText... unfortunately. + * + * @param guiFont the desired font (not null, alias created) */ public void setFont( BitmapFont guiFont ) { this.guiFont = guiFont; diff --git a/jme3-core/src/main/java/com/jme3/app/state/AbstractAppState.java b/jme3-core/src/main/java/com/jme3/app/state/AbstractAppState.java index 96b7e6b6c0..4f4b4a2bfe 100644 --- a/jme3-core/src/main/java/com/jme3/app/state/AbstractAppState.java +++ b/jme3-core/src/main/java/com/jme3/app/state/AbstractAppState.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,6 +73,8 @@ public boolean isInitialized() { * Sets the unique ID of this app state. Note: that setting * this while an app state is attached to the state manager will * have no effect on ID-based lookups. + * + * @param id the desired ID */ protected void setId( String id ) { this.id = id; diff --git a/jme3-core/src/main/java/com/jme3/app/state/AppState.java b/jme3-core/src/main/java/com/jme3/app/state/AppState.java index fe68b63ee1..55a2f066d3 100644 --- a/jme3-core/src/main/java/com/jme3/app/state/AppState.java +++ b/jme3-core/src/main/java/com/jme3/app/state/AppState.java @@ -93,6 +93,8 @@ public interface AppState { /** * Returns the unique ID for this AppState or null if it has no * unique ID. + * + * @return the ID, or null if none */ public String getId(); diff --git a/jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java b/jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java index 52722351e8..bd1bc067d2 100644 --- a/jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java +++ b/jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java @@ -103,6 +103,8 @@ public AppStateManager(Application app){ /** * Returns the Application to which this AppStateManager belongs. + * + * @return the pre-existing instance */ public Application getApplication() { return app; @@ -224,8 +226,9 @@ public boolean hasState(AppState state){ /** * Returns the first state that is an instance of subclass of the specified class. - * @param - * @param stateClass + * + * @param the desired type of AppState + * @param stateClass the desired type of AppState * @return First attached state that is an instance of stateClass */ public T getState(Class stateClass){ @@ -234,9 +237,10 @@ public T getState(Class stateClass){ /** * Returns the first state that is an instance of subclass of the specified class. - * @param - * @param stateClass - * @param failOnMiss + * + * @param the desired type of AppState + * @param stateClass the desired type of AppState + * @param failOnMiss true to thrown an exception, false to return null * @return First attached state that is an instance of stateClass. If failOnMiss is true * then an IllegalArgumentException is thrown if the state is not attached. */ @@ -271,6 +275,11 @@ public T getState(Class stateClass, boolean failOnMiss){ /** * Returns the state associated with the specified ID at the time it was * attached or null if not state was attached with that ID. + * + * @param the desired type of AppState + * @param id the AppState ID + * @param stateClass the desired type of AppState + * @return the pre-existing instance, or null if not found */ public T getState( String id, Class stateClass ) { return stateClass.cast(stateIndex.get(id)); @@ -279,6 +288,9 @@ public T getState( String id, Class stateClass ) { /** * Returns true if there is currently a state associated with the specified * ID. + * + * @param id the AppState ID + * @return true if found, otherwise false */ public boolean hasState( String id ) { return stateIndex.containsKey(id); @@ -288,6 +300,11 @@ public boolean hasState( String id ) { * Returns the state associated with the specified ID at the time it * was attached or throws an IllegalArgumentException if the ID was * not found. + * + * @param the desired type of AppState + * @param id the AppState ID + * @param stateClass the desired type of AppState + * @return the pre-existing instance (not null) */ public T stateForId( String id, Class stateClass ) { T result = getState(id, stateClass); diff --git a/jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java b/jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java index 957557869d..faf7ae3136 100644 --- a/jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java +++ b/jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 jMonkeyEngine + * Copyright (c) 2014-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -145,6 +145,8 @@ public final boolean isInitialized() { * Sets the unique ID of this app state. Note: that setting * this while an app state is attached to the state manager will * have no effect on ID-based lookups. + * + * @param id the desired ID */ protected void setId( String id ) { this.id = id; diff --git a/jme3-core/src/main/java/com/jme3/app/state/ConstantVerifierState.java b/jme3-core/src/main/java/com/jme3/app/state/ConstantVerifierState.java index e248e50e48..06f3f689b8 100644 --- a/jme3-core/src/main/java/com/jme3/app/state/ConstantVerifierState.java +++ b/jme3-core/src/main/java/com/jme3/app/state/ConstantVerifierState.java @@ -102,6 +102,8 @@ public ConstantVerifierState() { /** * Creates a verifier app state that will check all of the default * constant checks using the specified error reporting mechanism. + * + * @param errorType the mechanism to use */ public ConstantVerifierState( ErrorType errorType ) { this(errorType, DEFAULT_CHECKS); @@ -110,6 +112,9 @@ public ConstantVerifierState( ErrorType errorType ) { /** * Creates a verifier app state that will check all of the specified * checks and report errors using the specified error type. + * + * @param errorType the mechanism to use + * @param checkers which checks to perform */ public ConstantVerifierState( ErrorType errorType, Checker... checkers ) { this.errorType = errorType; diff --git a/jme3-core/src/main/java/com/jme3/app/state/RootNodeAppState.java b/jme3-core/src/main/java/com/jme3/app/state/RootNodeAppState.java index f7406ba55a..4b0e6e42de 100644 --- a/jme3-core/src/main/java/com/jme3/app/state/RootNodeAppState.java +++ b/jme3-core/src/main/java/com/jme3/app/state/RootNodeAppState.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -88,6 +88,8 @@ public RootNodeAppState(ViewPort viewPort, Node rootNode) { /** * Creates the AppState with the given unique ID, ViewPort, and root Node, attaches * the root Node to the ViewPort and updates it. + * + * @param id the desired AppState ID * @param viewPort An existing ViewPort * @param rootNode An existing root Node */ diff --git a/jme3-core/src/main/java/com/jme3/app/state/ScreenshotAppState.java b/jme3-core/src/main/java/com/jme3/app/state/ScreenshotAppState.java index 5757107b3f..7964493b38 100644 --- a/jme3-core/src/main/java/com/jme3/app/state/ScreenshotAppState.java +++ b/jme3-core/src/main/java/com/jme3/app/state/ScreenshotAppState.java @@ -161,6 +161,8 @@ public void setFileName(String fileName) { /** * Sets the base index that will used for subsequent screen shots. + * + * @param index the desired base index */ public void setShotIndex(long index) { this.shotIndex = index; @@ -315,6 +317,9 @@ public void setProfiler(AppProfiler profiler) { /** * Called by postFrame() once the screen has been captured to outBuf. + * + * @param file the output file + * @throws IOException if an I/O error occurs */ protected void writeImageFile( File file ) throws IOException { OutputStream outStream = new FileOutputStream(file); diff --git a/jme3-core/src/main/java/com/jme3/asset/AssetEventListener.java b/jme3-core/src/main/java/com/jme3/asset/AssetEventListener.java index c581335349..2156859a4c 100644 --- a/jme3-core/src/main/java/com/jme3/asset/AssetEventListener.java +++ b/jme3-core/src/main/java/com/jme3/asset/AssetEventListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,7 +56,7 @@ public interface AssetEventListener { * In contrast to the assetLoaded() method, this one will be called even * if the asset has failed to load, or if it was retrieved from the cache. * - * @param key + * @param key the key of the requested asset */ public void assetRequested(AssetKey key); diff --git a/jme3-core/src/main/java/com/jme3/asset/AssetLoader.java b/jme3-core/src/main/java/com/jme3/asset/AssetLoader.java index dde7476c22..2d29d99eee 100644 --- a/jme3-core/src/main/java/com/jme3/asset/AssetLoader.java +++ b/jme3-core/src/main/java/com/jme3/asset/AssetLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,6 +46,7 @@ public interface AssetLoader { * Loads asset from the given input stream, parsing it into * an application-usable object. * + * @param assetInfo the located asset * @return An object representing the resource. * @throws java.io.IOException If an I/O error occurs while loading */ diff --git a/jme3-core/src/main/java/com/jme3/asset/AssetLocator.java b/jme3-core/src/main/java/com/jme3/asset/AssetLocator.java index caa28524b4..7f545bec58 100644 --- a/jme3-core/src/main/java/com/jme3/asset/AssetLocator.java +++ b/jme3-core/src/main/java/com/jme3/asset/AssetLocator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,8 +51,8 @@ public interface AssetLocator { * The {@link AssetInfo} implementation provided should have a proper * return value for its {@link AssetInfo#openStream() } method. * - * @param manager - * @param key + * @param manager for managing assets + * @param key identifies the asset to be located * @return The {@link AssetInfo} that was located, or null if not found. */ public AssetInfo locate(AssetManager manager, AssetKey key); diff --git a/jme3-core/src/main/java/com/jme3/asset/AssetManager.java b/jme3-core/src/main/java/com/jme3/asset/AssetManager.java index 0f6836e6d2..cde85ecec1 100644 --- a/jme3-core/src/main/java/com/jme3/asset/AssetManager.java +++ b/jme3-core/src/main/java/com/jme3/asset/AssetManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2018 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,12 +99,16 @@ public interface AssetManager { /** * Remove a {@link ClassLoader} from the list of registered ClassLoaders + * + * @param loader the ClassLoader to be removed */ public void removeClassLoader(ClassLoader loader); /** * Retrieve the list of registered ClassLoaders that are used for loading * {@link Class classes} from asset files. + * + * @return an unmodifiable list */ public List getClassLoaders(); @@ -355,6 +359,8 @@ public interface AssetManager { /** * Returns the shaderGenerator responsible for generating the shaders + * + * @param caps a set of required capabilities * @return the shaderGenerator */ public ShaderGenerator getShaderGenerator(EnumSet caps); diff --git a/jme3-core/src/main/java/com/jme3/asset/AssetProcessor.java b/jme3-core/src/main/java/com/jme3/asset/AssetProcessor.java index e8e3728b3b..c002b39b31 100644 --- a/jme3-core/src/main/java/com/jme3/asset/AssetProcessor.java +++ b/jme3-core/src/main/java/com/jme3/asset/AssetProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,7 +48,8 @@ public interface AssetProcessor { * Applies post processing to an asset. * The method may return an object that is not the same * instance as the parameter object, and it could be from a different class. - * + * + * @param key the key used to load the asset * @param obj The asset that was loaded from an {@link AssetLoader}. * @return Either the same object with processing applied, or an instance * of a new object. diff --git a/jme3-core/src/main/java/com/jme3/asset/cache/AssetCache.java b/jme3-core/src/main/java/com/jme3/asset/cache/AssetCache.java index 929c254a43..8481a02978 100644 --- a/jme3-core/src/main/java/com/jme3/asset/cache/AssetCache.java +++ b/jme3-core/src/main/java/com/jme3/asset/cache/AssetCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,7 +59,7 @@ public interface AssetCache { * However the caching criteria may at some point choose that the asset * should be removed from the cache to save memory, in that case, * {@link #getFromCache(com.jme3.asset.AssetKey) } will return null. - *

Thread-Safe + *

Thread-Safe

* * @param The type of the asset to cache. * @param key The asset key that can be used to look up the asset. @@ -71,7 +71,7 @@ public interface AssetCache { * This should be called by the asset manager when it has successfully * acquired a cached asset (with {@link #getFromCache(com.jme3.asset.AssetKey) }) * and cloned it for use. - *

Thread-Safe + *

Thread-Safe

* * @param The type of the asset to register. * @param key The asset key of the loaded asset (used to retrieve from cache) @@ -95,7 +95,7 @@ public interface AssetCache { * {@link #addToCache(com.jme3.asset.AssetKey, java.lang.Object) }. * The asset may be removed from the cache automatically even if * it was added previously, in that case, this method will return null. - *

Thread-Safe + *

Thread-Safe

* * @param The type of the asset to retrieve * @param key The key used to lookup the asset. @@ -105,7 +105,7 @@ public interface AssetCache { /** * Deletes an asset from the cache. - *

Thread-Safe + *

Thread-Safe

* * @param key The asset key to find the asset to delete. * @return True if the asset was successfully found in the cache @@ -115,7 +115,7 @@ public interface AssetCache { /** * Deletes all assets from the cache. - *

Thread-Safe + *

Thread-Safe

*/ public void clearCache(); } diff --git a/jme3-core/src/main/java/com/jme3/audio/AudioBuffer.java b/jme3-core/src/main/java/com/jme3/audio/AudioBuffer.java index e6d6fc6895..df4f213f36 100644 --- a/jme3-core/src/main/java/com/jme3/audio/AudioBuffer.java +++ b/jme3-core/src/main/java/com/jme3/audio/AudioBuffer.java @@ -86,7 +86,8 @@ public String toString(){ /** * Update the data in the buffer with new data. - * @param data + * + * @param data the audio data provided (not null, direct, alias created) * @throws IllegalArgumentException if the provided buffer is not a direct buffer */ public void updateData(ByteBuffer data){ diff --git a/jme3-core/src/main/java/com/jme3/audio/AudioKey.java b/jme3-core/src/main/java/com/jme3/audio/AudioKey.java index de937eb69d..8923fca3fe 100644 --- a/jme3-core/src/main/java/com/jme3/audio/AudioKey.java +++ b/jme3-core/src/main/java/com/jme3/audio/AudioKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -110,6 +110,8 @@ public boolean isStream() { * When enabled, the audio stream will * be read entirely but not decoded, allowing features such as * seeking, looping and determining duration. + * + * @return true if stream cache is in use, otherwise false */ public boolean useStreamCache(){ return streamCache; diff --git a/jme3-core/src/main/java/com/jme3/audio/AudioNode.java b/jme3-core/src/main/java/com/jme3/audio/AudioNode.java index 1918ccd658..3f6b855d38 100644 --- a/jme3-core/src/main/java/com/jme3/audio/AudioNode.java +++ b/jme3-core/src/main/java/com/jme3/audio/AudioNode.java @@ -335,6 +335,8 @@ public AudioSource.Status getStatus() { /** * Do not use. + * + * @param status the desired status */ @Override public final void setStatus(AudioSource.Status status) { @@ -652,7 +654,7 @@ public Vector3f getDirection() { * Set the direction of this audio node. * Does nothing if the audio node is not directional. * - * @param direction + * @param direction a direction vector (alias created) * @see AudioNode#setDirectional(boolean) */ public void setDirection(Vector3f direction) { diff --git a/jme3-core/src/main/java/com/jme3/audio/AudioSource.java b/jme3-core/src/main/java/com/jme3/audio/AudioSource.java index bd58321498..eb62c0b221 100644 --- a/jme3-core/src/main/java/com/jme3/audio/AudioSource.java +++ b/jme3-core/src/main/java/com/jme3/audio/AudioSource.java @@ -64,11 +64,15 @@ public enum Status { /** * Do not use. + * + * @param channel the desired channel index, or -1 if stopped */ public void setChannel(int channel); /** * Do not use. + * + * @return the channel index, or -1 if stopped */ public int getChannel(); @@ -87,6 +91,8 @@ public enum Status { /** * Do not use. + * + * @param status the desired Status */ public void setStatus(Status status); diff --git a/jme3-core/src/main/java/com/jme3/audio/openal/AL.java b/jme3-core/src/main/java/com/jme3/audio/openal/AL.java index 33e5bb9046..03fb05e11c 100644 --- a/jme3-core/src/main/java/com/jme3/audio/openal/AL.java +++ b/jme3-core/src/main/java/com/jme3/audio/openal/AL.java @@ -285,14 +285,16 @@ public interface AL { /** * Obtains error information. - *

+ * *

Each detectable error is assigned a numeric code. When an error is detected by AL, a flag is set and the error code is recorded. Further errors, if they * occur, do not affect this recorded code. When alGetError is called, the code is returned and the flag is cleared, so that a further error will again * record its code. If a call to alGetError returns AL_NO_ERROR then there has been no detectable error since the last call to alGetError (or since the AL * was initialized).

- *

+ * *

Error codes can be mapped to strings. The alGetString function returns a pointer to a constant (literal) string that is identical to the identifier used * for the enumeration value, as defined in the specification.

+ * + * @return the error code, or AL_NO_ERROR if none */ public int alGetError(); @@ -322,7 +324,7 @@ public interface AL { /** * Sets the source state to AL_STOPPED. - *

+ * *

alSourceStop applied to an AL_INITIAL source is a legal NOP. alSourceStop applied to a AL_PLAYING source will change its state to AL_STOPPED. The source * is exempt from processing, its current state is preserved. alSourceStop applied to a AL_PAUSED source will change its state to AL_STOPPED, with the same * consequences as on a AL_PLAYING source. alSourceStop applied to a AL_STOPPED source is a legal NOP.

@@ -342,17 +344,17 @@ public interface AL { /** * Sets the sample data of the specified buffer. - *

+ * *

The data specified is copied to an internal software, or if possible, hardware buffer. The implementation is free to apply decompression, conversion, * resampling, and filtering as needed.

- *

+ * *

8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.

- *

+ * *

16-bit data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Byte order for 16-bit values is * determined by the native format of the CPU.

- *

+ * *

Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.

- *

+ * *

Buffers containing audio data with more than one channel will be played without 3D spatialization features – these formats are normally used for * background music.

* @@ -363,13 +365,14 @@ public interface AL { * {@link #AL_FORMAT_STEREO8 FORMAT_STEREO8} * {@link #AL_FORMAT_STEREO16 FORMAT_STEREO16} * @param data the sample data. + * @param size the length of the data (in bytes, ≥0) * @param frequency the data frequency. */ public void alBufferData(int buffer, int format, ByteBuffer data, int size, int frequency); /** * Sets the source state to AL_PLAYING. - *

+ * *

alSourcePlay applied to an AL_INITIAL source will promote the source to AL_PLAYING, thus the data found in the buffer will be fed into the processing, * starting at the beginning. alSourcePlay applied to a AL_PLAYING source will restart the source from the beginning. It will not affect the configuration, * and will leave the source in AL_PLAYING state, but reset the sampling offset to the beginning. alSourcePlay applied to a AL_PAUSED source will resume @@ -382,7 +385,7 @@ public interface AL { /** * Sets the source state to AL_PAUSED. - *

+ * *

alSourcePause applied to an AL_INITIAL source is a legal NOP. alSourcePause applied to a AL_PLAYING source will change its state to AL_PAUSED. The * source is exempt from processing, its current state is preserved. alSourcePause applied to a AL_PAUSED source is a legal NOP. alSourcePause applied to a * AL_STOPPED source is a legal NOP.

@@ -461,12 +464,13 @@ public interface AL { * {@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE} * {@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR} * {@link #AL_MAX_DISTANCE MAX_DISTANCE} + * @return the parameter value */ public int alGetSourcei(int source, int param); /** * Removes a number of buffer entries that have finished processing, in the order of apperance, from the queue of the specified source. - *

+ * *

Once a queue entry for a buffer has been appended to a queue and is pending processing, it should not be changed. Removal of a given queue entry is not * possible unless either the source is stopped (in which case then entire queue is considered processed), or if the queue entry has already been processed * (AL_PLAYING or AL_PAUSED source). A playing source will enter the AL_STOPPED state if it completes playback of the last buffer in its queue (the same @@ -480,7 +484,7 @@ public interface AL { /** * Queues up one or multiple buffer names to the specified source. - *

+ * *

The buffers will be queued in the sequence in which they appear in the array. This command is legal on a source in any playback state (to allow for * streaming, queuing has to be possible on a AL_PLAYING source). All buffers in a queue must have the same format and attributes, with the exception of * the {@code NULL} buffer (i.e., 0) which can always be queued.

diff --git a/jme3-core/src/main/java/com/jme3/audio/openal/ALC.java b/jme3-core/src/main/java/com/jme3/audio/openal/ALC.java index ac7582ed2d..f5772a2729 100644 --- a/jme3-core/src/main/java/com/jme3/audio/openal/ALC.java +++ b/jme3-core/src/main/java/com/jme3/audio/openal/ALC.java @@ -88,16 +88,18 @@ public interface ALC { * {@link #ALC_EXTENSIONS EXTENSIONS} * {@link #ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER CAPTURE_DEFAULT_DEVICE_SPECIFIER} * {@link #ALC_CAPTURE_DEVICE_SPECIFIER CAPTURE_DEVICE_SPECIFIER} + * @return the parameter value */ public String alcGetString(int parameter); /** * Verifies that a given extension is available for the current context and the device it is associated with. - *

+ * *

Invalid and unsupported string tokens return ALC_FALSE. A {@code NULL} deviceHandle is acceptable. {@code extName} is not case sensitive – the implementation * will convert the name to all upper-case internally (and will express extension names in upper-case).

* * @param extension the extension name. + * @return true if the extension is available, otherwise false */ public boolean alcIsExtensionPresent(String extension); @@ -117,7 +119,7 @@ public interface ALC { /** * Pauses a playback device. - *

+ * *

When paused, no contexts associated with the device will be processed or updated. Playing sources will not produce sound, have their offsets * incremented, or process any more buffers, until the device is resumed. Pausing a device that is already paused is a legal no-op.

*/ @@ -125,10 +127,10 @@ public interface ALC { /** * Resumes playback of a paused device. - *

+ * *

This will restart processing on the device -- sources will resume playing sound as normal. Resuming playback on a device that is not paused is a legal * no-op.

- *

+ * *

These functions are not reference counted. alcDeviceResumeSOFT only needs to be called once to resume playback, regardless of how many times * {@link #alcDevicePauseSOFT DevicePauseSOFT} was called.

*/ diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java index 6e89ab8620..65601ba490 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java +++ b/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java @@ -127,9 +127,9 @@ public void computeFromPoints(FloatBuffer points) { * computeFromTris creates a new Bounding Box from a given * set of triangles. It is used in OBBTree calculations. * - * @param tris - * @param start - * @param end + * @param tris triangle data (unaffected) + * @param start the index of the first triangle to be used + * @param end the index of the triangle after the last one to be used */ public void computeFromTris(Triangle[] tris, int start, int end) { if (end - start <= 0) { diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java index 3bf6c13047..8b7d66c1ac 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java +++ b/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java @@ -126,9 +126,9 @@ public void computeFromPoints(FloatBuffer points) { * computeFromTris creates a new Bounding Box from a given * set of triangles. It is used in OBBTree calculations. * - * @param tris - * @param start - * @param end + * @param tris triangle data (unaffected) + * @param start the index of the first triangle to be used + * @param end the index of the triangle after the last one to be used */ public void computeFromTris(Triangle[] tris, int start, int end) { if (end - start <= 0) { diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingVolume.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingVolume.java index c5dc9b75b3..9f30a926b0 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingVolume.java +++ b/jme3-core/src/main/java/com/jme3/bounding/BoundingVolume.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -79,6 +79,8 @@ public BoundingVolume(Vector3f center) { /** * Grabs the checkplane we should check first. + * + * @return the index of the plane to be checked first */ public int getCheckPlane() { return checkPlane; @@ -87,7 +89,7 @@ public int getCheckPlane() { /** * Sets the index of the plane that should be first checked during rendering. * - * @param value + * @param value the index of the plane to be checked first */ public final void setCheckPlane(int value) { checkPlane = value; @@ -95,6 +97,8 @@ public final void setCheckPlane(int value) { /** * getType returns the type of bounding volume this is. + * + * @return an enum value */ public abstract Type getType(); diff --git a/jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java b/jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java index 82626cf73c..4744eddf53 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java @@ -214,8 +214,8 @@ public void onPause() { /** * used internally for serialization * - * @param ex - * @throws IOException + * @param ex the exporter (not null) + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { @@ -230,8 +230,8 @@ public void write(JmeExporter ex) throws IOException { /** * used internally for serialization * - * @param im - * @throws IOException + * @param im the importer (not null) + * @throws IOException from the importer */ @Override @SuppressWarnings("unchecked") @@ -299,6 +299,8 @@ public boolean isInitialized() { * Sets the unique ID of this app state. Note: that setting * this while an app state is attached to the state manager will * have no effect on ID-based lookups. + * + * @param id the desired ID */ protected void setId( String id ) { this.id = id; @@ -355,7 +357,7 @@ public void stateDetached(AppStateManager stateManager) { /** * called internally don't call it directly. * - * @param tpf + * @param tpf time per frame (in seconds) */ @Override public void update(float tpf) { @@ -367,7 +369,7 @@ public void update(float tpf) { /** * used internally, don't call this directly. * - * @param tpf + * @param tpf time per frame (in seconds) */ @Override public void onUpdate(float tpf) { diff --git a/jme3-core/src/main/java/com/jme3/cinematic/MotionPath.java b/jme3-core/src/main/java/com/jme3/cinematic/MotionPath.java index 1e6155d185..253123edd6 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/MotionPath.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/MotionPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,6 +73,8 @@ public MotionPath() { * this methods sets the new localTranslation to the spatial of the MotionEvent control. * @param time the time since the animation started * @param control the control over the moving spatial + * @param tpf time per frame (in seconds) + * @return the distance travelled (in world units) */ public float interpolatePath(float time, MotionEvent control, float tpf) { @@ -180,6 +182,7 @@ public void read(JmeImporter im) throws IOException { * compute the index of the waypoint and the interpolation value according to a distance * returns a vector 2 containing the index in the x field and the interpolation value in the y field * @param distance the distance traveled on this path + * @param store storage for the result (not null, modified) * @return the waypoint index and the interpolation value in a vector2 */ public Vector2f getWayPointIndexForDistance(float distance, Vector2f store) { @@ -260,7 +263,7 @@ public SplineType getPathSplineType() { /** * sets the type of spline used for the path interpolation for this path - * @param pathSplineType + * @param pathSplineType the desired type */ public void setPathSplineType(SplineType pathSplineType) { spline.setType(pathSplineType); @@ -342,7 +345,8 @@ public float getCurveTension() { /** * sets the tension of the curve (only for catmull rom) 0.0 will give a linear curve, 1.0 a round curve - * @param curveTension + * + * @param curveTension the desired value */ public void setCurveTension(float curveTension) { spline.setCurveTension(curveTension); @@ -361,7 +365,8 @@ public void clearWayPoints() { /** * Sets the path to be a cycle - * @param cycle + * + * @param cycle true for a cycle, false for a non-cycle */ public void setCycle(boolean cycle) { diff --git a/jme3-core/src/main/java/com/jme3/cinematic/events/AbstractCinematicEvent.java b/jme3-core/src/main/java/com/jme3/cinematic/events/AbstractCinematicEvent.java index a65a078827..887b669e8b 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/events/AbstractCinematicEvent.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/events/AbstractCinematicEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,7 +74,8 @@ public AbstractCinematicEvent() { /** * Construct a cinematic event with the given initial duration. - * @param initialDuration + * + * @param initialDuration the desired duration (in seconds, default=10) */ public AbstractCinematicEvent(float initialDuration) { this.initialDuration = initialDuration; @@ -82,7 +83,8 @@ public AbstractCinematicEvent(float initialDuration) { /** * Construct a cinematic event with the given loopMode. - * @param loopMode + * + * @param loopMode the desired mode (Loop/DontLoop/Cycle) */ public AbstractCinematicEvent(LoopMode loopMode) { this.loopMode = loopMode; @@ -216,7 +218,7 @@ public float getDuration() { * Sets the speed of the animation. * At speed = 1, the animation will last initialDuration seconds, * At speed = 2, the animation will last initialDuration/2... - * @param speed + * @param speed the desired speedup factor (default=1) */ @Override public void setSpeed(float speed) { @@ -252,7 +254,7 @@ public float getInitialDuration() { /** * Sets the duration of the animation at speed = 1 in seconds. - * @param initialDuration + * @param initialDuration the desired duration (in de-scaled seconds) */ @Override public void setInitialDuration(float initialDuration) { @@ -272,7 +274,7 @@ public LoopMode getLoopMode() { /** * Sets the loopMode of the animation. * @see LoopMode - * @param loopMode + * @param loopMode the desired mode (default=DontLoop) */ @Override public void setLoopMode(LoopMode loopMode) { @@ -282,7 +284,7 @@ public void setLoopMode(LoopMode loopMode) { /** * Used for serialization only. * @param ex exporter - * @throws IOException + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { @@ -296,7 +298,7 @@ public void write(JmeExporter ex) throws IOException { /** * Used for serialization only. * @param im importer - * @throws IOException + * @throws IOException from the importer */ @Override public void read(JmeImporter im) throws IOException { @@ -309,8 +311,9 @@ public void read(JmeImporter im) throws IOException { /** * Initialize this event (called internally only). - * @param app - * @param cinematic + * + * @param app ignored + * @param cinematic ignored */ @Override public void initEvent(Application app, Cinematic cinematic) { diff --git a/jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java b/jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java index b561368934..6844f10c5f 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -233,6 +233,7 @@ public AnimationEvent(Spatial model, String animationName, int channelIndex) { * * @param model the model on which the animation will be played * @param animationName the name of the animation to play + * @param loopMode the desired mode (Loop/DontLoop/Cycle) * @param channelIndex the index of the channel default is 0. Events on the * @param blendTime the time during the animation are gonna be blended * same channelIndex will use the same channel. diff --git a/jme3-core/src/main/java/com/jme3/cinematic/events/CameraEvent.java b/jme3-core/src/main/java/com/jme3/cinematic/events/CameraEvent.java index 8d2b708942..9a9478490d 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/events/CameraEvent.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/events/CameraEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2017 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -116,8 +116,8 @@ public void setCinematic(Cinematic cinematic) { /** * used internally for serialization * - * @param ex - * @throws IOException + * @param ex the exporter (not null) + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { @@ -130,8 +130,8 @@ public void write(JmeExporter ex) throws IOException { /** * used internally for serialization * - * @param im - * @throws IOException + * @param im the importer (not null) + * @throws IOException from the importer */ @Override public void read(JmeImporter im) throws IOException { diff --git a/jme3-core/src/main/java/com/jme3/cinematic/events/CinematicEvent.java b/jme3-core/src/main/java/com/jme3/cinematic/events/CinematicEvent.java index d5355c9c15..28e00e0eac 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/events/CinematicEvent.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/events/CinematicEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,7 +74,8 @@ public interface CinematicEvent extends Savable { /** * Sets the speed of the animation (1 is normal speed, 2 is twice faster) - * @param speed + * + * @param speed the desired speed (default=1) */ public void setSpeed(float speed); @@ -117,8 +118,9 @@ public interface CinematicEvent extends Savable { public float getInitialDuration(); /** - * Sets the duration of the antionamtion at speed = 1 in seconds - * @param initialDuration + * Sets the duration of the animation at speed = 1 in seconds + * + * @param initialDuration the desired duration (in de-scaled seconds) */ public void setInitialDuration(float initialDuration); diff --git a/jme3-core/src/main/java/com/jme3/cinematic/events/MotionEvent.java b/jme3-core/src/main/java/com/jme3/cinematic/events/MotionEvent.java index 89b4541a7e..7f36178d87 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/events/MotionEvent.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/events/MotionEvent.java @@ -114,8 +114,9 @@ public MotionEvent() { /** * Creates a MotionPath for the given spatial on the given motion path. - * @param spatial - * @param path + * + * @param spatial the Spatial to move (not null) + * @param path the path to be taken (alias created) */ public MotionEvent(Spatial spatial, MotionPath path) { super(); @@ -125,8 +126,10 @@ public MotionEvent(Spatial spatial, MotionPath path) { /** * Creates a MotionPath for the given spatial on the given motion path. - * @param spatial - * @param path + * + * @param spatial the Spatial to move (not null) + * @param path the path to be taken (alias created) + * @param initialDuration the desired duration (in seconds, default=10) */ public MotionEvent(Spatial spatial, MotionPath path, float initialDuration) { super(initialDuration); @@ -136,8 +139,10 @@ public MotionEvent(Spatial spatial, MotionPath path, float initialDuration) { /** * Creates a MotionPath for the given spatial on the given motion path. - * @param spatial - * @param path + * + * @param spatial the Spatial to move (not null) + * @param path the path to be taken (alias created) + * @param loopMode (default=DontLoop) */ public MotionEvent(Spatial spatial, MotionPath path, LoopMode loopMode) { super(); @@ -148,8 +153,11 @@ public MotionEvent(Spatial spatial, MotionPath path, LoopMode loopMode) { /** * Creates a MotionPath for the given spatial on the given motion path. - * @param spatial - * @param path + * + * @param spatial the Spatial to move (not null) + * @param path the path to be taken (alias created) + * @param initialDuration the desired duration (in seconds, default=10) + * @param loopMode (default=DontLoop) */ public MotionEvent(Spatial spatial, MotionPath path, float initialDuration, LoopMode loopMode) { super(initialDuration); @@ -272,7 +280,8 @@ private void computeTargetDirection() { /** * Clone this control for the given spatial. - * @param spatial + * + * @param spatial ignored * @return never */ @Deprecated @@ -331,6 +340,7 @@ public float getCurrentValue() { /** * This method is meant to be called by the motion path only. * + * @param currentValue the desired value */ public void setCurrentValue(float currentValue) { this.currentValue = currentValue; @@ -347,6 +357,7 @@ public int getCurrentWayPoint() { /** * This method is meant to be called by the motion path only. * + * @param currentWayPoint the desired waypoint index */ public void setCurrentWayPoint(int currentWayPoint) { this.currentWayPoint = currentWayPoint; @@ -365,7 +376,8 @@ public Vector3f getDirection() { * Use MotionEvent#setDirection((Vector3f direction,Vector3f upVector) if * you want a custom up vector. * This method is used by the motion path. - * @param direction + * + * @param direction the desired forward direction (not null, unaffected) */ public void setDirection(Vector3f direction) { setDirection(direction, Vector3f.UNIT_Y); @@ -374,7 +386,8 @@ public void setDirection(Vector3f direction) { /** * Sets the direction of the spatial with the given up vector. * This method is used by the motion path. - * @param direction + * + * @param direction the desired forward direction (not null, unaffected) * @param upVector the up vector to consider for this direction. */ public void setDirection(Vector3f direction,Vector3f upVector) { @@ -440,7 +453,8 @@ public MotionPath getPath() { /** * Sets the motion path to follow. - * @param path + * + * @param path the desired path (alias created) */ public void setPath(MotionPath path) { this.path = path; diff --git a/jme3-core/src/main/java/com/jme3/cinematic/events/MotionTrack.java b/jme3-core/src/main/java/com/jme3/cinematic/events/MotionTrack.java index 2958241bbe..eda7f9c709 100644 --- a/jme3-core/src/main/java/com/jme3/cinematic/events/MotionTrack.java +++ b/jme3-core/src/main/java/com/jme3/cinematic/events/MotionTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,8 +53,9 @@ public MotionTrack() { /** * Creates a MotionPath for the given spatial on the given motion path - * @param spatial - * @param path + * + * @param spatial the Spatial to move (not null) + * @param path the path to be taken (alias created) */ public MotionTrack(Spatial spatial, MotionPath path) { super(spatial, path); @@ -62,8 +63,10 @@ public MotionTrack(Spatial spatial, MotionPath path) { /** * Creates a MotionPath for the given spatial on the given motion path - * @param spatial - * @param path + * + * @param spatial the Spatial to move (not null) + * @param path the path to be taken (alias created) + * @param initialDuration the desired duration (in seconds, default=10) */ public MotionTrack(Spatial spatial, MotionPath path, float initialDuration) { super(spatial, path, initialDuration); @@ -71,8 +74,10 @@ public MotionTrack(Spatial spatial, MotionPath path, float initialDuration) { /** * Creates a MotionPath for the given spatial on the given motion path - * @param spatial - * @param path + * + * @param spatial the Spatial to move (not null) + * @param path the path to be taken (alias created) + * @param loopMode (default=DontLoop) */ public MotionTrack(Spatial spatial, MotionPath path, LoopMode loopMode) { super(spatial, path, loopMode); @@ -81,8 +86,11 @@ public MotionTrack(Spatial spatial, MotionPath path, LoopMode loopMode) { /** * Creates a MotionPath for the given spatial on the given motion path - * @param spatial - * @param path + * + * @param spatial the Spatial to move (not null) + * @param path the path to be taken (alias created) + * @param initialDuration the desired duration (in seconds, default=10) + * @param loopMode (default=DontLoop) */ public MotionTrack(Spatial spatial, MotionPath path, float initialDuration, LoopMode loopMode) { super(spatial, path, initialDuration, loopMode); diff --git a/jme3-core/src/main/java/com/jme3/collision/CollisionResults.java b/jme3-core/src/main/java/com/jme3/collision/CollisionResults.java index 8728106c2c..185519a9fe 100644 --- a/jme3-core/src/main/java/com/jme3/collision/CollisionResults.java +++ b/jme3-core/src/main/java/com/jme3/collision/CollisionResults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -130,7 +130,8 @@ public CollisionResult getCollision(int index){ /** * Internal use only. - * @param index + * + * @param index the zero-based index of the desired result * @return the pre-existing instance */ public CollisionResult getCollisionDirect(int index){ diff --git a/jme3-core/src/main/java/com/jme3/collision/MotionAllowedListener.java b/jme3-core/src/main/java/com/jme3/collision/MotionAllowedListener.java index fa4dda3394..6e057336da 100644 --- a/jme3-core/src/main/java/com/jme3/collision/MotionAllowedListener.java +++ b/jme3-core/src/main/java/com/jme3/collision/MotionAllowedListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,8 +40,8 @@ public interface MotionAllowedListener { * Check if motion allowed. Modify position and velocity vectors * appropriately if not allowed.. * - * @param position - * @param velocity + * @param position the position vector (modified) + * @param velocity the velocity vector (modified) */ public void checkMotionAllowed(Vector3f position, Vector3f velocity); diff --git a/jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java b/jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java index 367cab86b8..86892eb2cd 100644 --- a/jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java +++ b/jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -842,6 +842,8 @@ public void setStartSize(float startSize) { /** * @deprecated Use ParticleEmitter.getParticleInfluencer().getInitialVelocity() instead. + * + * @return the pre-existing velocity vector */ @Deprecated public Vector3f getInitialVelocity() { @@ -868,6 +870,7 @@ public void setInitialVelocity(Vector3f initialVelocity) { } /** + * @return the velocity variation * @deprecated * This method is deprecated. * Use ParticleEmitter.getParticleInfluencer().getVelocityVariation(); instead. @@ -944,6 +947,8 @@ public void emitAllParticles() { /** * Instantly emits available particles, up to num. + * + * @param num the maximum number of particles to emit */ public void emitParticles(int num) { // Force world transform to update @@ -1143,7 +1148,8 @@ public boolean isEnabled() { /** * Callback from Control.update(), do not use. - * @param tpf + * + * @param tpf time per frame (in seconds) */ public void updateFromControl(float tpf) { if (enabled) { @@ -1154,8 +1160,8 @@ public void updateFromControl(float tpf) { /** * Callback from Control.render(), do not use. * - * @param rm - * @param vp + * @param rm the RenderManager rendering this Emitter (not null) + * @param vp the ViewPort being rendered (not null) */ private void renderFromControl(RenderManager rm, ViewPort vp) { Camera cam = vp.getCamera(); diff --git a/jme3-core/src/main/java/com/jme3/effect/ParticleMesh.java b/jme3-core/src/main/java/com/jme3/effect/ParticleMesh.java index 11e05555d9..861b35573a 100644 --- a/jme3-core/src/main/java/com/jme3/effect/ParticleMesh.java +++ b/jme3-core/src/main/java/com/jme3/effect/ParticleMesh.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -79,6 +79,10 @@ public enum Type { /** * Update the particle visual data. Typically called every frame. + * + * @param particles the particles to update + * @param cam the camera to use for billboarding + * @param inverseRotation the inverse rotation matrix */ public abstract void updateParticleData(Particle[] particles, Camera cam, Matrix3f inverseRotation); diff --git a/jme3-core/src/main/java/com/jme3/effect/influencers/RadialParticleInfluencer.java b/jme3-core/src/main/java/com/jme3/effect/influencers/RadialParticleInfluencer.java index 567763c9fa..342ca2b8a1 100644 --- a/jme3-core/src/main/java/com/jme3/effect/influencers/RadialParticleInfluencer.java +++ b/jme3-core/src/main/java/com/jme3/effect/influencers/RadialParticleInfluencer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,7 +82,8 @@ public Vector3f getOrigin() { /** * the origin used for computing the radial velocity direction - * @param origin + * + * @param origin the desired origin location (alias created) */ public void setOrigin(Vector3f origin) { this.origin = origin; @@ -98,7 +99,7 @@ public float getRadialVelocity() { /** * the radial velocity - * @param radialVelocity + * @param radialVelocity the desired speed */ public void setRadialVelocity(float radialVelocity) { this.radialVelocity = radialVelocity; @@ -114,7 +115,7 @@ public boolean isHorizontal() { /** * nullify y component of particle velocity to make the effect expand only on x and z axis - * @param horizontal + * @param horizontal true to zero the Y component, false to preserve it */ public void setHorizontal(boolean horizontal) { this.horizontal = horizontal; diff --git a/jme3-core/src/main/java/com/jme3/environment/EnvironmentCamera.java b/jme3-core/src/main/java/com/jme3/environment/EnvironmentCamera.java index f66c2b49ad..45eadb8a78 100644 --- a/jme3-core/src/main/java/com/jme3/environment/EnvironmentCamera.java +++ b/jme3-core/src/main/java/com/jme3/environment/EnvironmentCamera.java @@ -365,8 +365,8 @@ protected Camera createOffCamera(final int mapSize, final Vector3f worldPos, fin /** * creates an offsceen VP * - * @param name - * @param offCamera + * @param name the desired name for the offscreen viewport + * @param offCamera the Camera to be used (alias created) * @return a new instance */ protected ViewPort createOffViewPort(final String name, final Camera offCamera) { @@ -379,8 +379,8 @@ protected ViewPort createOffViewPort(final String name, final Camera offCamera) /** * create an offscreen frame buffer. * - * @param mapSize - * @param offView + * @param mapSize the desired size (pixels per side) + * @param offView the off-screen viewport to be used (alias created) * @return a new instance */ protected FrameBuffer createOffScreenFrameBuffer(int mapSize, ViewPort offView) { diff --git a/jme3-core/src/main/java/com/jme3/environment/LightProbeFactory.java b/jme3-core/src/main/java/com/jme3/environment/LightProbeFactory.java index e4c9bdf0e2..2b27c9c9d6 100644 --- a/jme3-core/src/main/java/com/jme3/environment/LightProbeFactory.java +++ b/jme3-core/src/main/java/com/jme3/environment/LightProbeFactory.java @@ -218,6 +218,7 @@ private static void generatePbrMaps(TextureCubeMap envMap, final LightProbe prob * Will return a Node meant to be added to a GUI presenting the 2 cube maps in a cross pattern with all the mip maps. * * @param manager the asset manager + * @param probe the LightProbe to be debugged (not null) * @return a debug node */ public static Node getDebugGui(AssetManager manager, LightProbe probe) { diff --git a/jme3-core/src/main/java/com/jme3/environment/generation/IrradianceSphericalHarmonicsGenerator.java b/jme3-core/src/main/java/com/jme3/environment/generation/IrradianceSphericalHarmonicsGenerator.java index 91ab48db26..227f7c3b52 100644 --- a/jme3-core/src/main/java/com/jme3/environment/generation/IrradianceSphericalHarmonicsGenerator.java +++ b/jme3-core/src/main/java/com/jme3/environment/generation/IrradianceSphericalHarmonicsGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,7 +59,7 @@ public class IrradianceSphericalHarmonicsGenerator extends RunnableWithProgress * process is thread safe. * * @param app the Application - * @param listener + * @param listener to monitor progress (alias created) */ public IrradianceSphericalHarmonicsGenerator(Application app, JobProgressListener listener) { super(listener); diff --git a/jme3-core/src/main/java/com/jme3/environment/generation/JobProgressAdapter.java b/jme3-core/src/main/java/com/jme3/environment/generation/JobProgressAdapter.java index 6b19d6b706..b99774ab1b 100644 --- a/jme3-core/src/main/java/com/jme3/environment/generation/JobProgressAdapter.java +++ b/jme3-core/src/main/java/com/jme3/environment/generation/JobProgressAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2015 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +37,7 @@ * only a subset of method implemented. * * @author nehon - * @param + * @param the type of result */ public abstract class JobProgressAdapter implements JobProgressListener{ diff --git a/jme3-core/src/main/java/com/jme3/environment/generation/PrefilteredEnvMapFaceGenerator.java b/jme3-core/src/main/java/com/jme3/environment/generation/PrefilteredEnvMapFaceGenerator.java index 51a401e662..b5d32fc3ef 100644 --- a/jme3-core/src/main/java/com/jme3/environment/generation/PrefilteredEnvMapFaceGenerator.java +++ b/jme3-core/src/main/java/com/jme3/environment/generation/PrefilteredEnvMapFaceGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -81,7 +81,7 @@ public class PrefilteredEnvMapFaceGenerator extends RunnableWithProgress { * * @param app the Application * @param face the face to generate - * @param listener + * @param listener to monitor progress (alias created) */ public PrefilteredEnvMapFaceGenerator(Application app, int face, JobProgressListener listener) { super(listener); @@ -98,7 +98,7 @@ public PrefilteredEnvMapFaceGenerator(Application app, int face, JobProgressList * pixel) * @param fixSeamsMethod the method used to fix seams as described in * {@link com.jme3.environment.util.EnvMapUtils.FixSeamsMethod} - * @param genType + * @param genType select Fast or HighQuality * @param store The cube map to store the result in. */ public void setGenerationParam(TextureCubeMap sourceMap, int targetMapSize, EnvMapUtils.FixSeamsMethod fixSeamsMethod, EnvMapUtils.GenerationType genType, TextureCubeMap store) { @@ -331,8 +331,8 @@ private Vector3f rotateDirection(float angle, Vector3f l, Vector3f store) { /** * Computes GGX half vector in local space * - * @param xi - * @param a2 + * @param xi (not null) + * @param a2 fourth power of roughness * @param store caller-provided storage * @return either store or a new vector (not null) */ diff --git a/jme3-core/src/main/java/com/jme3/environment/generation/RunnableWithProgress.java b/jme3-core/src/main/java/com/jme3/environment/generation/RunnableWithProgress.java index f47887e0ea..5a11ef6fcc 100644 --- a/jme3-core/src/main/java/com/jme3/environment/generation/RunnableWithProgress.java +++ b/jme3-core/src/main/java/com/jme3/environment/generation/RunnableWithProgress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,7 +54,7 @@ public RunnableWithProgress(JobProgressListener listener) { /** * set the end step value of the process. * - * @param end + * @param end the desired end value (default=0) */ protected void setEnd(int end) { this.end = end; diff --git a/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java b/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java index 7f00ba09df..cc780f1a51 100644 --- a/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java +++ b/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java @@ -147,7 +147,7 @@ public static TextureCubeMap makeCubeMap(Image rightImg, Image leftImg, Image up * the same area of the buffer. The position, limit and mark are not an * issue. * - * @param sourceMap + * @param sourceMap the map to be copied (not null, unaffected) * @return a new instance */ public static TextureCubeMap duplicateCubeMap(TextureCubeMap sourceMap) { @@ -485,8 +485,8 @@ public static Vector3f[] getSphericalHarmonicsCoefficents(TextureCubeMap cubeMap * Computes SH coefficient for a given textel dir The method used is the one * from this article : http://graphics.stanford.edu/papers/envmap/envmap.pdf * - * @param texelVect - * @param shDir + * @param texelVect the input texel (not null, unaffected) + * @param shDir storage for the results */ public static void evalShBasis(Vector3f texelVect, float[] shDir) { diff --git a/jme3-core/src/main/java/com/jme3/environment/util/LightsDebugState.java b/jme3-core/src/main/java/com/jme3/environment/util/LightsDebugState.java index 835d470599..aa63d767f9 100644 --- a/jme3-core/src/main/java/com/jme3/environment/util/LightsDebugState.java +++ b/jme3-core/src/main/java/com/jme3/environment/util/LightsDebugState.java @@ -125,7 +125,8 @@ public void updateLights(Spatial scene) { /** * Set the scenes for which to render light gizmos. - * @param scene + * + * @param scene the root of the desired scene (alias created) */ public void setScene(Spatial scene) { this.scene = scene; @@ -165,7 +166,8 @@ public float getProbeScale() { /** * sets the scale of the probe's debug sphere - * @param probeScale + * + * @param probeScale the scale factor (default=1) */ public void setProbeScale(float probeScale) { this.probeScale = probeScale; diff --git a/jme3-core/src/main/java/com/jme3/export/SavableClassUtil.java b/jme3-core/src/main/java/com/jme3/export/SavableClassUtil.java index 4a44555db9..2ba21e9e55 100644 --- a/jme3-core/src/main/java/com/jme3/export/SavableClassUtil.java +++ b/jme3-core/src/main/java/com/jme3/export/SavableClassUtil.java @@ -175,7 +175,7 @@ public static int getSavedSavableVersion(Object savable, ClassThis should only be called internally in {@link Application}. * - * @param mouse - * @param keys - * @param joystick - * @param touch + * @param mouse (not null, alias created) + * @param keys (not null, alias created) + * @param joystick (may be null, alias created) + * @param touch (may be null, alias created) * @throws IllegalArgumentException If either mouseInput or keyInput are null. */ public InputManager(MouseInput mouse, KeyInput keys, JoyInput joystick, TouchInput touch) { @@ -594,7 +594,7 @@ public void addMapping(String mappingName, Trigger... triggers) { * for the given mappingName. * * @param mappingName The mapping name to check. - * + * @return true if the mapping is registered, otherwise false * @see InputManager#addMapping(java.lang.String, com.jme3.input.controls.Trigger[]) * @see InputManager#deleteMapping(java.lang.String) */ @@ -774,6 +774,7 @@ public void setSimulateMouse(boolean value) { * @deprecated Use isSimulateMouse * Returns state of simulation of mouse events. Used for touchscreen input only. * + * @return true if a mouse is simulated, otherwise false */ @Deprecated public boolean getSimulateMouse() { @@ -787,6 +788,7 @@ public boolean getSimulateMouse() { /** * Returns state of simulation of mouse events. Used for touchscreen input only. * + * @return true if a mouse is simulated, otherwise false */ public boolean isSimulateMouse() { if (touch != null) { @@ -810,6 +812,7 @@ public void setSimulateKeyboard(boolean value) { /** * Returns state of simulation of key events. Used for touchscreen input only. * + * @return true if a keyboard is simulated, otherwise false */ public boolean isSimulateKeyboard() { if (touch != null) { @@ -960,7 +963,7 @@ public void onTouchEvent(TouchEvent evt) { * Re-sets the joystick list when a joystick is added or removed. * This should only be called internally. * - * @param joysticks + * @param joysticks (alias created) */ public void setJoysticks(Joystick[] joysticks) { this.joysticks = joysticks; @@ -970,6 +973,7 @@ public void setJoysticks(Joystick[] joysticks) { * Add a listener that reports when a joystick has been added or removed. * Currently only implemented in LWJGL3 * @param listener the listener + * @return true */ public boolean addJoystickConnectionListener(JoystickConnectionListener listener) { return joystickConnectionListeners.add(listener); diff --git a/jme3-core/src/main/java/com/jme3/input/Joystick.java b/jme3-core/src/main/java/com/jme3/input/Joystick.java index e172224c2f..967422fc6f 100644 --- a/jme3-core/src/main/java/com/jme3/input/Joystick.java +++ b/jme3-core/src/main/java/com/jme3/input/Joystick.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2018 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -77,11 +77,13 @@ public interface Joystick { * Returns the JoystickAxis with the specified logical ID. * * @param logicalId The id of the axis to search for as returned by JoystickAxis.getLogicalId(). + * @return the pre-existing instance, or null if not found */ public JoystickAxis getAxis(String logicalId); /** * Returns a read-only list of all joystick axes for this Joystick. + * @return an unmodifiable list of pre-existing instances */ public List getAxes(); @@ -89,11 +91,13 @@ public interface Joystick { * Returns the JoystickButton with the specified logical ID. * * @param logicalId The id of the axis to search for as returned by JoystickButton.getLogicalId(). + * @return the pre-existing instance, or null if not found */ public JoystickButton getButton(String logicalId); /** * Returns a read-only list of all joystick buttons for this Joystick. + * @return an unmodifiable list of pre-existing instances */ public List getButtons(); @@ -102,6 +106,7 @@ public interface Joystick { * *

E.g. for most gamepads, the left control stick X axis will be returned. * + * @return the pre-existing instance * @see JoystickAxis#assignAxis(java.lang.String, java.lang.String) */ public JoystickAxis getXAxis(); @@ -111,6 +116,7 @@ public interface Joystick { * *

E.g. for most gamepads, the left control stick Y axis will be returned. * + * @return the pre-existing instance * @see JoystickAxis#assignAxis(java.lang.String, java.lang.String) */ public JoystickAxis getYAxis(); @@ -119,6 +125,7 @@ public interface Joystick { * Returns the POV X axis for this joystick. This is a convenience axis * providing an x-axis subview of the HAT axis. * + * @return the pre-existing instance * @see JoystickAxis#assignAxis(java.lang.String, java.lang.String) */ public JoystickAxis getPovXAxis(); @@ -127,6 +134,7 @@ public interface Joystick { * Returns the POV Y axis for this joystick. This is a convenience axis * providing a y-axis subview of the HAT axis. * + * @return the pre-existing instance * @see JoystickAxis#assignAxis(java.lang.String, java.lang.String) */ public JoystickAxis getPovYAxis(); diff --git a/jme3-core/src/main/java/com/jme3/input/JoystickAxis.java b/jme3-core/src/main/java/com/jme3/input/JoystickAxis.java index 45a0733115..fbbddb9f06 100644 --- a/jme3-core/src/main/java/com/jme3/input/JoystickAxis.java +++ b/jme3-core/src/main/java/com/jme3/input/JoystickAxis.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -79,6 +79,8 @@ public interface JoystickAxis { /** * Returns the joystick to which this axis object belongs. + * + * @return the pre-existing instance */ public Joystick getJoystick(); @@ -107,17 +109,23 @@ public interface JoystickAxis { /** * Returns true if this is an analog axis, meaning the values * are a continuous range instead of 1, 0, and -1. + * + * @return true if analog, otherwise false */ public boolean isAnalog(); /** * Returns true if this axis presents relative values. + * + * @return true if relative, otherwise false */ public boolean isRelative(); /** * Returns the suggested dead zone for this axis. Values less than this * can be safely ignored. + * + * @return the radius of the dead zone */ public float getDeadZone(); } diff --git a/jme3-core/src/main/java/com/jme3/input/JoystickButton.java b/jme3-core/src/main/java/com/jme3/input/JoystickButton.java index 5e7d3706a4..d8d2543ba0 100644 --- a/jme3-core/src/main/java/com/jme3/input/JoystickButton.java +++ b/jme3-core/src/main/java/com/jme3/input/JoystickButton.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,6 +61,8 @@ public interface JoystickButton { /** * Returns the joystick to which this axis object belongs. + * + * @return the pre-existing instance */ public Joystick getJoystick(); diff --git a/jme3-core/src/main/java/com/jme3/input/JoystickCompatibilityMappings.java b/jme3-core/src/main/java/com/jme3/input/JoystickCompatibilityMappings.java index 6529847820..4e1190e478 100644 --- a/jme3-core/src/main/java/com/jme3/input/JoystickCompatibilityMappings.java +++ b/jme3-core/src/main/java/com/jme3/input/JoystickCompatibilityMappings.java @@ -269,6 +269,10 @@ public static String remapButton(String joystickName, String componentId) { /** * Returns the remapped version of the axis/button name if there * is a mapping for it otherwise it returns the original name. + * + * @param joystickName which joystick (not null) + * @param componentId the unmapped axis/button name + * @return the resulting axis/button name */ public static String remapComponent(String joystickName, String componentId) { logger.log(Level.FINE, "remapComponent(" + joystickName + ", " + componentId + ")"); @@ -301,6 +305,8 @@ public static String remapComponent(String joystickName, String componentId) { * Returns a set of Joystick axis name remappings if they exist otherwise * it returns an empty map. * + * @param joystickName which joystick (not null) + * @return an unmodifiable map * @author Markil3 */ public static Map getJoystickAxisMappings(String joystickName) { @@ -314,6 +320,8 @@ public static Map getJoystickAxisMappings(String joystickName) * Returns a set of Joystick button name remappings if they exist otherwise * it returns an empty map. * + * @param joystickName which joystick (not null) + * @return an unmodifiable map * @author Markil3 */ public static Map getJoystickButtonMappings(String joystickName) { @@ -326,6 +334,9 @@ public static Map getJoystickButtonMappings(String joystickName) /** * Returns a set of Joystick axis/button name remappings if they exist otherwise * it returns an empty map. + * + * @param joystickName which joystick (not null) + * @return an unmodifiable map */ public static Map getJoystickMappings(String joystickName) { Map result = getMappings(joystickName.trim(), false); @@ -339,6 +350,9 @@ public static Map getJoystickMappings(String joystickName) { * joystick's name and axis/button name. The "remap" value will be * used instead. * + * @param stickName which joystick (not null) + * @param sourceComponentId the name to be remapped + * @param remapId the remapped name * @author Markil3 */ public static void addAxisMapping(String stickName, String sourceComponentId, String remapId) { @@ -351,6 +365,10 @@ public static void addAxisMapping(String stickName, String sourceComponentId, St * joystick's name and axis/button name. The "remap" value will be * used instead. * + * @param stickName which joystick (not null) + * @param sourceComponentId the name to be remapped + * @param remapId the remapped name + * @param range the desired range (not null, exactly 2 elements) * @author Markil3 */ public static void addAxisMapping(String stickName, String sourceComponentId, String remapId, float[] range) { @@ -366,6 +384,9 @@ public static void addAxisMapping(String stickName, String sourceComponentId, St * joystick's name and axis/button name. The "remap" value will be * used instead. * + * @param stickName which joystick (not null) + * @param sourceComponentId the name to be remapped + * @param remapId the remapped name * @author Markil3 */ public static void addButtonMapping(String stickName, String sourceComponentId, String remapId) { @@ -377,6 +398,10 @@ public static void addButtonMapping(String stickName, String sourceComponentId, * Adds a single Joystick axis or button remapping based on the * joystick's name and axis/button name. The "remap" value will be * used instead. + * + * @param stickName which joystick (not null) + * @param sourceComponentId the name to be remapped + * @param remapId the remapped name */ public static void addMapping(String stickName, String sourceComponentId, String remapId) { logger.log(Level.FINE, "addMapping(" + stickName + ", " + sourceComponentId + ", " + remapId + ")"); @@ -391,6 +416,7 @@ public static void addMapping(String stickName, String sourceComponentId, String * addMapping(stickName, sourceComponent, remap) for every property * that it is able to parse. * + * @param p (not null) * @author Paul Speed * @author Markil 3 */ @@ -471,6 +497,9 @@ public static void addMappings(Properties p) { /** * Maps a regular expression to a normalized name for that joystick. + * + * @param regex the regular expression to be matched + * @param name the remapped name */ public static void addJoystickNameRegex(String regex, String name) { logger.log(Level.FINE, "addJoystickNameRegex(" + regex + ", " + name + ")"); @@ -496,6 +525,9 @@ protected static String getNormalizedName(String name) { /** * Loads a set of compatibility mappings from the property file * specified by the given URL. + * + * @param u the URL of the properties file (not null) + * @throws IOException if an I/O exception occurs */ public static void loadMappingProperties(URL u) throws IOException { logger.log(Level.FINE, "Loading mapping properties:{0}", u); diff --git a/jme3-core/src/main/java/com/jme3/input/RawInputListener.java b/jme3-core/src/main/java/com/jme3/input/RawInputListener.java index 6ba37ec2ef..7120809c19 100644 --- a/jme3-core/src/main/java/com/jme3/input/RawInputListener.java +++ b/jme3-core/src/main/java/com/jme3/input/RawInputListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,35 +56,35 @@ public interface RawInputListener { /** * Invoked on joystick axis events. * - * @param evt + * @param evt information about the event */ public void onJoyAxisEvent(JoyAxisEvent evt); /** * Invoked on joystick button presses. * - * @param evt + * @param evt information about the event */ public void onJoyButtonEvent(JoyButtonEvent evt); /** * Invoked on mouse movement/motion events. * - * @param evt + * @param evt information about the event */ public void onMouseMotionEvent(MouseMotionEvent evt); /** * Invoked on mouse button events. * - * @param evt + * @param evt information about the event */ public void onMouseButtonEvent(MouseButtonEvent evt); /** * Invoked on keyboard key press or release events. * - * @param evt + * @param evt information about the event */ public void onKeyEvent(KeyInputEvent evt); @@ -92,7 +92,7 @@ public interface RawInputListener { /** * Invoked on touchscreen touch events. * - * @param evt + * @param evt information about the event */ public void onTouchEvent(TouchEvent evt); diff --git a/jme3-core/src/main/java/com/jme3/input/controls/JoyAxisTrigger.java b/jme3-core/src/main/java/com/jme3/input/controls/JoyAxisTrigger.java index b2945c3eeb..c678ba909d 100644 --- a/jme3-core/src/main/java/com/jme3/input/controls/JoyAxisTrigger.java +++ b/jme3-core/src/main/java/com/jme3/input/controls/JoyAxisTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,10 @@ public class JoyAxisTrigger implements Trigger { /** * Use {@link Joystick#assignAxis(java.lang.String, java.lang.String, int) } * instead. + * + * @param joyId which joystick + * @param axisId which joystick axis + * @param negative true to negate input values, false to leave unchanged */ public JoyAxisTrigger(int joyId, int axisId, boolean negative) { this.joyId = joyId; diff --git a/jme3-core/src/main/java/com/jme3/input/controls/JoyButtonTrigger.java b/jme3-core/src/main/java/com/jme3/input/controls/JoyButtonTrigger.java index a922e013fe..5c4030775e 100644 --- a/jme3-core/src/main/java/com/jme3/input/controls/JoyButtonTrigger.java +++ b/jme3-core/src/main/java/com/jme3/input/controls/JoyButtonTrigger.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,8 +40,8 @@ public class JoyButtonTrigger implements Trigger { /** * Use {@link Joystick#assignButton(java.lang.String, int) } instead. * - * @param joyId - * @param axisId + * @param joyId the ID of a joystick + * @param axisId the ID of a joystick axis */ public JoyButtonTrigger(int joyId, int axisId) { this.joyId = joyId; diff --git a/jme3-core/src/main/java/com/jme3/input/event/JoyAxisEvent.java b/jme3-core/src/main/java/com/jme3/input/event/JoyAxisEvent.java index 71d59e06f6..8f56686df8 100644 --- a/jme3-core/src/main/java/com/jme3/input/event/JoyAxisEvent.java +++ b/jme3-core/src/main/java/com/jme3/input/event/JoyAxisEvent.java @@ -71,6 +71,7 @@ public JoyAxisEvent(JoystickAxis axis, float value, float rawValue) { /** * Returns the JoystickAxis that triggered this event. * + * @return the pre-existing instance * @see com.jme3.input.JoystickAxis#assignAxis(java.lang.String, java.lang.String) */ public JoystickAxis getAxis() { diff --git a/jme3-core/src/main/java/com/jme3/light/Light.java b/jme3-core/src/main/java/com/jme3/light/Light.java index 79ea54660b..4cbea59208 100644 --- a/jme3-core/src/main/java/com/jme3/light/Light.java +++ b/jme3-core/src/main/java/com/jme3/light/Light.java @@ -277,6 +277,8 @@ public void read(JmeImporter im) throws IOException { /** * Used internally to compute the last distance value. + * + * @param owner the Spatial whose distance is to be determined */ protected abstract void computeLastDistance(Spatial owner); diff --git a/jme3-core/src/main/java/com/jme3/light/LightList.java b/jme3-core/src/main/java/com/jme3/light/LightList.java index 0a7bf9b673..fd59ab5fc6 100644 --- a/jme3-core/src/main/java/com/jme3/light/LightList.java +++ b/jme3-core/src/main/java/com/jme3/light/LightList.java @@ -90,7 +90,8 @@ public LightList(Spatial owner) { /** * Set the owner of the LightList. Only used for cloning. - * @param owner + * + * @param owner the desired owner (alias created) */ public void setOwner(Spatial owner){ this.owner = owner; @@ -122,7 +123,7 @@ public void add(Light l) { /** * Remove the light at the given index. * - * @param index + * @param index the zero-based index of the Light to be removed (≥0) */ public void remove(int index){ if (index >= listSize || index < 0) @@ -162,6 +163,7 @@ public int size(){ } /** + * @param num the zero-based index of the light to be accessed (≥0) * @return the light at the given index. * @throws IndexOutOfBoundsException If the given index is outside bounds. */ @@ -224,8 +226,8 @@ public void sort(boolean transformChanged) { * Updates a "world-space" light list, using the spatial's local-space * light list and its parent's world-space light list. * - * @param local - * @param parent + * @param local the local-space LightList (not null) + * @param parent the parent's world-space LightList */ public void update(LightList local, LightList parent){ // clear the list as it will be reconstructed diff --git a/jme3-core/src/main/java/com/jme3/light/LightProbe.java b/jme3-core/src/main/java/com/jme3/light/LightProbe.java index 6c42f442e8..4ef1dd6903 100644 --- a/jme3-core/src/main/java/com/jme3/light/LightProbe.java +++ b/jme3-core/src/main/java/com/jme3/light/LightProbe.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -145,6 +145,8 @@ public void setPrefilteredMap(TextureCubeMap prefileteredEnvMap) { *

* The radius is obvious for a SphereProbeArea, * but in the case of a OrientedBoxProbeArea it's the max of the extent vector's components. + * + * @return the pre-existing matrix */ public Matrix4f getUniformMatrix(){ diff --git a/jme3-core/src/main/java/com/jme3/light/LightProbeBlendingStrategy.java b/jme3-core/src/main/java/com/jme3/light/LightProbeBlendingStrategy.java index 824c94bb16..5516231b3e 100644 --- a/jme3-core/src/main/java/com/jme3/light/LightProbeBlendingStrategy.java +++ b/jme3-core/src/main/java/com/jme3/light/LightProbeBlendingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2018 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,8 @@ public interface LightProbeBlendingStrategy { /** * Registers a probe with this strategy - * @param probe + * + * @param probe the probe to be registered */ public void registerProbe(LightProbe probe); /** diff --git a/jme3-core/src/main/java/com/jme3/light/ProbeArea.java b/jme3-core/src/main/java/com/jme3/light/ProbeArea.java index 28ca0c4e70..8a3d510d06 100644 --- a/jme3-core/src/main/java/com/jme3/light/ProbeArea.java +++ b/jme3-core/src/main/java/com/jme3/light/ProbeArea.java @@ -19,16 +19,25 @@ public interface ProbeArea extends Savable, Cloneable{ public Matrix4f getUniformMatrix(); /** + * @param box the BoundingBox to test for intersection + * @param vars storage for temporary data + * @return true if the area and the box intersect, otherwise false * @see Light#intersectsBox(BoundingBox, TempVars) */ public boolean intersectsBox(BoundingBox box, TempVars vars); /** + * @param sphere the BoundingSphere to test for intersection + * @param vars storage for temporary data + * @return true if the area and the sphere intersect, otherwise false * @see Light#intersectsSphere(BoundingSphere, TempVars) */ public boolean intersectsSphere(BoundingSphere sphere, TempVars vars); /** + * @param camera the Camera whose frustum will be tested for intersection + * @param vars storage for temporary data + * @return true if the area and the frustum intersect, otherwise false * @see Light#intersectsFrustum(Camera, TempVars) */ public abstract boolean intersectsFrustum(Camera camera, TempVars vars); diff --git a/jme3-core/src/main/java/com/jme3/light/SpotLight.java b/jme3-core/src/main/java/com/jme3/light/SpotLight.java index 2025ce4146..a3a982c60d 100644 --- a/jme3-core/src/main/java/com/jme3/light/SpotLight.java +++ b/jme3-core/src/main/java/com/jme3/light/SpotLight.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012, 2015-2016, 2018 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -378,7 +378,8 @@ public float getSpotInnerAngle() { * Must be between 0 and pi/2. *

* This angle is the angle between the spot direction axis and the inner border of the cone of influence. - * @param spotInnerAngle + * + * @param spotInnerAngle the desired angle (in radians, ≥0, ≤Pi/2) */ public void setSpotInnerAngle(float spotInnerAngle) { if (spotInnerAngle < 0f || spotInnerAngle >= FastMath.HALF_PI) { @@ -403,7 +404,8 @@ public float getSpotOuterAngle() { *

* This angle is the angle between the spot direction axis and the outer border of the cone of influence. * this should be greater than the inner angle or the result will be unexpected. - * @param spotOuterAngle + * + * @param spotOuterAngle the desired angle (in radians, ≥0, ≤Pi/2) */ public void setSpotOuterAngle(float spotOuterAngle) { if (spotOuterAngle < 0f || spotOuterAngle >= FastMath.HALF_PI) { diff --git a/jme3-core/src/main/java/com/jme3/material/MatParam.java b/jme3-core/src/main/java/com/jme3/material/MatParam.java index 26c833767d..e0cb8683fb 100644 --- a/jme3-core/src/main/java/com/jme3/material/MatParam.java +++ b/jme3-core/src/main/java/com/jme3/material/MatParam.java @@ -55,6 +55,10 @@ public class MatParam implements Savable, Cloneable { /** * Create a new material parameter. For internal use only. + * + * @param type the type of the parameter + * @param name the desired parameter name + * @param value the desired parameter value (alias created) */ public MatParam(VarType type, String name, Object value) { this.type = type; diff --git a/jme3-core/src/main/java/com/jme3/material/MatParamTexture.java b/jme3-core/src/main/java/com/jme3/material/MatParamTexture.java index 77ff897d93..187eebc72d 100644 --- a/jme3-core/src/main/java/com/jme3/material/MatParamTexture.java +++ b/jme3-core/src/main/java/com/jme3/material/MatParamTexture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -83,7 +83,8 @@ public ColorSpace getColorSpace() { /** * Set to {@link ColorSpace#Linear} if the texture color space has to be forced to linear * instead of sRGB - * @param colorSpace @see ColorSpace + * @param colorSpace the desired color space + * @see ColorSpace */ public void setColorSpace(ColorSpace colorSpace) { this.colorSpace = colorSpace; diff --git a/jme3-core/src/main/java/com/jme3/material/Material.java b/jme3-core/src/main/java/com/jme3/material/Material.java index 384b911a50..204e7d9946 100644 --- a/jme3-core/src/main/java/com/jme3/material/Material.java +++ b/jme3-core/src/main/java/com/jme3/material/Material.java @@ -295,6 +295,8 @@ public boolean contentEquals(Object otherObj) { /** * Works like {@link Object#hashCode() } except it may change together with the material as the material is mutable by definition. + * + * @return value for use in hashing */ public int contentHashCode() { int hash = 7; @@ -413,6 +415,7 @@ public MatParam getParam(String name) { /** * Returns the current parameter's value. * + * @param the expected type of the parameter value * @param name the parameter name to look up. * @return current value or null if the parameter wasn't set. */ @@ -888,6 +891,7 @@ private void updateRenderState(RenderManager renderManager, Renderer renderer, T * been already been setup for rendering. * * @param renderManager The render manager to preload for + * @param geometry to determine the applicable parameter overrides, if any */ public void preload(RenderManager renderManager, Geometry geometry) { if (technique == null) { diff --git a/jme3-core/src/main/java/com/jme3/material/RenderState.java b/jme3-core/src/main/java/com/jme3/material/RenderState.java index 0037f1cad7..667a64ba2f 100644 --- a/jme3-core/src/main/java/com/jme3/material/RenderState.java +++ b/jme3-core/src/main/java/com/jme3/material/RenderState.java @@ -708,6 +708,8 @@ public boolean equals(Object o) { * @deprecated Does nothing. Point sprite is already enabled by default for * all supported platforms. jME3 does not support rendering conventional * point clouds. + * + * @param pointSprite ignored */ @Deprecated public void setPointSprite(boolean pointSprite) { @@ -981,6 +983,7 @@ public void setDepthFunc(TestFunction depthFunc) { /** * @deprecated + * @param alphaFunc ignored */ @Deprecated public void setAlphaFunc(TestFunction alphaFunc) { @@ -1416,7 +1419,7 @@ public boolean isApplyLineWidth() { } /** - * + * @return value for use in hashing */ public int contentHashCode() { if (cachedHashCode == -1){ diff --git a/jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java b/jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java index 84ef3820fd..e8e44c8572 100644 --- a/jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java +++ b/jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java @@ -146,7 +146,8 @@ public List getUnusedNodes() { /** * the list of unused node names - * @param unusedNodes + * + * @param unusedNodes the new list (alias created) */ public void setUnusedNodes(List unusedNodes) { this.unusedNodes = unusedNodes; diff --git a/jme3-core/src/main/java/com/jme3/material/Technique.java b/jme3-core/src/main/java/com/jme3/material/Technique.java index a2fb1a0371..f5bd008455 100644 --- a/jme3-core/src/main/java/com/jme3/material/Technique.java +++ b/jme3-core/src/main/java/com/jme3/material/Technique.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -160,6 +160,7 @@ Shader makeCurrent(RenderManager renderManager, SafeArrayList * {@link #makeCurrent(com.jme3.renderer.RenderManager, java.util.EnumSet)}. * @param geometry The geometry to render * @param lights Lights which influence the geometry. + * @param lastTexUnit the index of the most recently used texture unit */ void render(RenderManager renderManager, Shader shader, Geometry geometry, LightList lights, int lastTexUnit) { TechniqueDefLogic logic = def.getLogic(); diff --git a/jme3-core/src/main/java/com/jme3/material/TechniqueDef.java b/jme3-core/src/main/java/com/jme3/material/TechniqueDef.java index 9202f1602d..ca821ba835 100644 --- a/jme3-core/src/main/java/com/jme3/material/TechniqueDef.java +++ b/jme3-core/src/main/java/com/jme3/material/TechniqueDef.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -171,6 +171,7 @@ public enum LightSpace { * Used internally by the J3M/J3MD loader. * * @param name The name of the technique + * @param sortId a unique ID for sorting */ public TechniqueDef(String name, int sortId){ this(); @@ -438,6 +439,7 @@ public void addShaderParamDefine(String paramName, VarType paramType, String def * configure the shader internally before rendering. * * @param defineName The define name to create + * @param defineType the type for the new define * @return The define ID of the created define */ public int addShaderUnmappedDefine(String defineName, VarType defineType) { @@ -582,6 +584,8 @@ public String getVertexShaderName() { /** * Returns the language of the fragment shader used in this technique. + * + * @return the name of the language (such as "GLSL100") */ public String getFragmentShaderLanguage() { return shaderLanguages.get(Shader.ShaderType.Fragment); @@ -589,19 +593,23 @@ public String getFragmentShaderLanguage() { /** * Returns the language of the vertex shader used in this technique. + * + * @return the name of the language (such as "GLSL100") */ public String getVertexShaderLanguage() { return shaderLanguages.get(Shader.ShaderType.Vertex); } /**Returns the language for each shader program - * @param shaderType + * @param shaderType Fragment/Vertex/etcetera + * @return the name of the language */ public String getShaderProgramLanguage(Shader.ShaderType shaderType){ return shaderLanguages.get(shaderType); } /**Returns the name for each shader program - * @param shaderType + * @param shaderType Fragment/Vertex/etcetera + * @return the name of the program */ public String getShaderProgramName(Shader.ShaderType shaderType){ return shaderNames.get(shaderType); diff --git a/jme3-core/src/main/java/com/jme3/material/logic/SinglePassAndImageBasedLightingLogic.java b/jme3-core/src/main/java/com/jme3/material/logic/SinglePassAndImageBasedLightingLogic.java index fd7b47b673..10eb2f018c 100644 --- a/jme3-core/src/main/java/com/jme3/material/logic/SinglePassAndImageBasedLightingLogic.java +++ b/jme3-core/src/main/java/com/jme3/material/logic/SinglePassAndImageBasedLightingLogic.java @@ -104,6 +104,15 @@ public Shader makeCurrent(AssetManager assetManager, RenderManager renderManager * // or the direction of the light (for directional lights). // * g_LightPosition.w is the inverse radius (1/r) of the light (for * attenuation)

+ * + * @param shader the Shader being used + * @param g the Geometry being rendered + * @param lightList the list of lights + * @param numLights the number of lights to upload + * @param rm to manage rendering + * @param startIndex the starting index in the LightList + * @param lastTexUnit the index of the most recently-used texture unit + * @return the next starting index in the LightList */ protected int updateLightListUniforms(Shader shader, Geometry g, LightList lightList, int numLights, RenderManager rm, int startIndex, int lastTexUnit) { if (numLights == 0) { // this shader does not do lighting, ignore. diff --git a/jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java b/jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java index 9b9a3721cc..77841c6c01 100644 --- a/jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java +++ b/jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java @@ -96,6 +96,14 @@ public Shader makeCurrent(AssetManager assetManager, RenderManager renderManager * // or the direction of the light (for directional lights).
// * g_LightPosition.w is the inverse radius (1/r) of the light (for * attenuation)

+ * + * @param shader the Shader being used + * @param g the Geometry being rendered + * @param lightList the list of lights + * @param numLights the number of lights to upload + * @param rm to manage rendering + * @param startIndex the starting index in the LightList + * @return the next starting index in the LightList */ protected int updateLightListUniforms(Shader shader, Geometry g, LightList lightList, int numLights, RenderManager rm, int startIndex) { if (numLights == 0) { // this shader does not do lighting, ignore. diff --git a/jme3-core/src/main/java/com/jme3/material/logic/TechniqueDefLogic.java b/jme3-core/src/main/java/com/jme3/material/logic/TechniqueDefLogic.java index e0921e869d..4d06eb09d4 100644 --- a/jme3-core/src/main/java/com/jme3/material/logic/TechniqueDefLogic.java +++ b/jme3-core/src/main/java/com/jme3/material/logic/TechniqueDefLogic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -90,6 +90,7 @@ public Shader makeCurrent(AssetManager assetManager, RenderManager renderManager * {@link #makeCurrent(com.jme3.asset.AssetManager, com.jme3.renderer.RenderManager, java.util.EnumSet, com.jme3.light.LightList, com.jme3.shader.DefineList)}. * @param geometry The geometry to render * @param lights Lights which influence the geometry. + * @param lastTexUnit the index of the most recently used texture unit */ public void render(RenderManager renderManager, Shader shader, Geometry geometry, LightList lights, int lastTexUnit); } diff --git a/jme3-core/src/main/java/com/jme3/math/FastMath.java b/jme3-core/src/main/java/com/jme3/math/FastMath.java index bbb357be69..e46b9aa149 100644 --- a/jme3-core/src/main/java/com/jme3/math/FastMath.java +++ b/jme3-core/src/main/java/com/jme3/math/FastMath.java @@ -1024,9 +1024,9 @@ public static float copysign(float x, float y) { /** * Take a float input and clamp it between min and max. * - * @param input - * @param min - * @param max + * @param input the value to be clamped + * @param min the minimum output value + * @param max the maximum output value * @return clamped input */ public static float clamp(float input, float min, float max) { @@ -1036,7 +1036,7 @@ public static float clamp(float input, float min, float max) { /** * Clamps the given float to be between 0 and 1. * - * @param input + * @param input the value to be clamped * @return input clamped between 0 and 1. */ public static float saturate(float input) { diff --git a/jme3-core/src/main/java/com/jme3/math/Plane.java b/jme3-core/src/main/java/com/jme3/math/Plane.java index 5d522f750b..a67b313746 100644 --- a/jme3-core/src/main/java/com/jme3/math/Plane.java +++ b/jme3-core/src/main/java/com/jme3/math/Plane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -266,8 +266,8 @@ public void setPlanePoints(AbstractTriangle t) { /** * Initialize this plane using a point of origin and a normal. * - * @param origin - * @param normal + * @param origin the desired origin location (not null, unaffected) + * @param normal the desired normal vector (not null, unaffected) */ public void setOriginNormal(Vector3f origin, Vector3f normal) { this.normal.set(normal); diff --git a/jme3-core/src/main/java/com/jme3/math/Quaternion.java b/jme3-core/src/main/java/com/jme3/math/Quaternion.java index 1734736af1..429c5713e7 100644 --- a/jme3-core/src/main/java/com/jme3/math/Quaternion.java +++ b/jme3-core/src/main/java/com/jme3/math/Quaternion.java @@ -855,8 +855,8 @@ public void slerp(Quaternion q2, float changeAmnt) { /** * Sets the values of this quaternion to the nlerp from itself to q2 by blend. * - * @param q2 - * @param blend + * @param q2 the desired final value when blend=1 (not null, unaffected) + * @param blend the fractional weight applied to q2 (0→this, 1→q2) */ public void nlerp(Quaternion q2, float blend) { float dot = dot(q2); diff --git a/jme3-core/src/main/java/com/jme3/math/Ray.java b/jme3-core/src/main/java/com/jme3/math/Ray.java index 4dbcadd60a..60be10e516 100644 --- a/jme3-core/src/main/java/com/jme3/math/Ray.java +++ b/jme3-core/src/main/java/com/jme3/math/Ray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -364,8 +364,9 @@ public boolean intersectWherePlanarQuad(Vector3f v0, Vector3f v1, Vector3f v2, } /** - * @param p - * @param loc + * @param p the Plane to test for collision (not null, unaffected) + * @param loc storage for the location of the intersection (not null, + * modified when returning true) * @return true if the ray collides with the given Plane */ public boolean intersectsWherePlane(Plane p, Vector3f loc) { diff --git a/jme3-core/src/main/java/com/jme3/math/Spline.java b/jme3-core/src/main/java/com/jme3/math/Spline.java index 3a455dbbcc..fca5305f10 100644 --- a/jme3-core/src/main/java/com/jme3/math/Spline.java +++ b/jme3-core/src/main/java/com/jme3/math/Spline.java @@ -341,7 +341,7 @@ public boolean isCycle() { /** * set to true to make the spline cycle * - * @param cycle + * @param cycle true for cyclic, false for acyclic */ public void setCycle(boolean cycle) { if (type != SplineType.Nurb) { @@ -379,7 +379,7 @@ public SplineType getType() { /** * Sets the type of the spline * - * @param type + * @param type Linear/CatmullRom/Bezier/Nurb */ public void setType(SplineType type) { this.type = type; diff --git a/jme3-core/src/main/java/com/jme3/math/Vector2f.java b/jme3-core/src/main/java/com/jme3/math/Vector2f.java index b90b788d3c..6d7dcbebf9 100644 --- a/jme3-core/src/main/java/com/jme3/math/Vector2f.java +++ b/jme3-core/src/main/java/com/jme3/math/Vector2f.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -773,8 +773,8 @@ public String toString() { * * @param in * ObjectInput - * @throws IOException - * @throws ClassNotFoundException + * @throws IOException if an I/O error occurs + * @throws ClassNotFoundException when? * @see java.io.Externalizable */ public void readExternal(ObjectInput in) throws IOException, @@ -788,7 +788,7 @@ public void readExternal(ObjectInput in) throws IOException, * * @param out * ObjectOutput - * @throws IOException + * @throws IOException if an I/O error occurs * @see java.io.Externalizable */ public void writeExternal(ObjectOutput out) throws IOException { diff --git a/jme3-core/src/main/java/com/jme3/math/Vector3f.java b/jme3-core/src/main/java/com/jme3/math/Vector3f.java index 9ee4c09efe..074aa02367 100644 --- a/jme3-core/src/main/java/com/jme3/math/Vector3f.java +++ b/jme3-core/src/main/java/com/jme3/math/Vector3f.java @@ -566,9 +566,9 @@ public Vector3f multLocal(Vector3f vec) { * internally, and returns a handle to this vector for easy chaining of * calls. * - * @param x - * @param y - * @param z + * @param x the scale factor for the X component + * @param y the scale factor for the Y component + * @param z the scale factor for the Z component * @return this */ public Vector3f multLocal(float x, float y, float z) { @@ -829,7 +829,7 @@ public Vector3f normalizeLocal() { * component in this and other vector. The result is stored * in this vector. * - * @param other + * @param other the vector to compare with (not null, unaffected) * @return this */ public Vector3f maxLocal(Vector3f other) { @@ -844,7 +844,7 @@ public Vector3f maxLocal(Vector3f other) { * component in this and other vector. The result is stored * in this vector. * - * @param other + * @param other the vector to compare with (not null, unaffected) * @return this */ public Vector3f minLocal(Vector3f other) { diff --git a/jme3-core/src/main/java/com/jme3/math/Vector4f.java b/jme3-core/src/main/java/com/jme3/math/Vector4f.java index d08aa7eba8..414bc52ff7 100644 --- a/jme3-core/src/main/java/com/jme3/math/Vector4f.java +++ b/jme3-core/src/main/java/com/jme3/math/Vector4f.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -465,10 +465,10 @@ public Vector4f multLocal(Vector4f vec) { * internally, and returns a handle to this vector for easy chaining of * calls. * - * @param x - * @param y - * @param z - * @param w + * @param x the scaling factor for the X component + * @param y the scaling factor for the Y component + * @param z the scaling factor for the Z component + * @param w the scaling factor for the W component * @return this */ public Vector4f multLocal(float x, float y, float z, float w) { @@ -741,7 +741,7 @@ public Vector4f normalizeLocal() { * component in this and other vector. The result is stored * in this vector. * - * @param other + * @param other the vector to compare with (not null, unaffected) * @return this */ public Vector4f maxLocal(Vector4f other) { @@ -757,7 +757,7 @@ public Vector4f maxLocal(Vector4f other) { * component in this and other vector. The result is stored * in this vector. * - * @param other + * @param other the vector to compare with (not null, unaffected) * @return this */ public Vector4f minLocal(Vector4f other) { @@ -1088,7 +1088,7 @@ public Vector4f setW(float w) { } /** - * @param index + * @param index which component (≥0, <4) * @return x value if index == 0, y value if index == 1 or z value if index == 2 * @throws IllegalArgumentException * if index is not one of 0, 1, 2. diff --git a/jme3-core/src/main/java/com/jme3/opencl/Buffer.java b/jme3-core/src/main/java/com/jme3/opencl/Buffer.java index 26fe5f8fda..a72606e0d9 100644 --- a/jme3-core/src/main/java/com/jme3/opencl/Buffer.java +++ b/jme3-core/src/main/java/com/jme3/opencl/Buffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -86,6 +86,10 @@ public Buffer register() { /** * Alternative version of {@link #read(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long, long) }, * sets {@code offset} to zero. + * + * @param queue the command queue + * @param dest the target buffer + * @param size the number of bytes to read */ public void read(CommandQueue queue, ByteBuffer dest, long size) { read(queue, dest, size, 0); @@ -94,6 +98,9 @@ public void read(CommandQueue queue, ByteBuffer dest, long size) { /** * Alternative version of {@link #read(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long) }, * sets {@code size} to {@link #getSize() }. + * + * @param queue the command queue + * @param dest the target buffer */ public void read(CommandQueue queue, ByteBuffer dest) { read(queue, dest, getSize()); @@ -115,6 +122,11 @@ public void read(CommandQueue queue, ByteBuffer dest) { /** * Alternative version of {@link #readAsync(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long, long) }, * sets {@code offset} to zero. + * + * @param queue the command queue + * @param dest the target buffer + * @param size the number of bytes to read + * @return an Event to indicate completion */ public Event readAsync(CommandQueue queue, ByteBuffer dest, long size) { return readAsync(queue, dest, size, 0); @@ -123,6 +135,10 @@ public Event readAsync(CommandQueue queue, ByteBuffer dest, long size) { /** * Alternative version of {@link #readAsync(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long) }, * sets {@code size} to {@link #getSize() } + * + * @param queue the command queue + * @param dest the target buffer + * @return an Event to indicate completion */ public Event readAsync(CommandQueue queue, ByteBuffer dest) { return readAsync(queue, dest, getSize()); @@ -143,6 +159,10 @@ public Event readAsync(CommandQueue queue, ByteBuffer dest) { /** * Alternative version of {@link #write(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long, long) }, * sets {@code offset} to zero. + * + * @param queue the command queue + * @param src the source buffer, its data is written to this buffer + * @param size the number of bytes to write */ public void write(CommandQueue queue, ByteBuffer src, long size) { write(queue, src, size, 0); @@ -151,6 +171,9 @@ public void write(CommandQueue queue, ByteBuffer src, long size) { /** * Alternative version of {@link #write(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long) }, * sets {@code size} to {@link #getSize() }. + * + * @param queue the command queue + * @param src the source buffer, its data is written to this buffer */ public void write(CommandQueue queue, ByteBuffer src) { write(queue, src, getSize()); @@ -165,13 +188,18 @@ public void write(CommandQueue queue, ByteBuffer src) { * @param src the source buffer, its data is written to this buffer * @param size the size in bytes to write * @param offset the offset into the target buffer - * @return the event object indicating when the write operation is completed + * @return an Event to indicate completion */ public abstract Event writeAsync(CommandQueue queue, ByteBuffer src, long size, long offset); /** * Alternative version of {@link #writeAsync(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long, long) }, * sets {@code offset} to zero. + * + * @param queue the command queue + * @param src the source buffer, its data is written to this buffer + * @param size the number of bytes to write + * @return an Event to indicate completion */ public Event writeAsync(CommandQueue queue, ByteBuffer src, long size) { return writeAsync(queue, src, size, 0); @@ -180,6 +208,10 @@ public Event writeAsync(CommandQueue queue, ByteBuffer src, long size) { /** * Alternative version of {@link #writeAsync(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long) }, * sets {@code size} to {@link #getSize() }. + * + * @param queue the command queue + * @param src the source buffer, its data is written to this buffer + * @return an Event to indicate completion */ public Event writeAsync(CommandQueue queue, ByteBuffer src) { return writeAsync(queue, src, getSize()); @@ -199,6 +231,10 @@ public Event writeAsync(CommandQueue queue, ByteBuffer src) { /** * Alternative version of {@link #copyTo(com.jme3.opencl.CommandQueue, com.jme3.opencl.Buffer, long, long, long) }, * sets {@code srcOffset} and {@code destOffset} to zero. + * + * @param queue the command queue + * @param dest the target buffer + * @param size the number of bytes to copy */ public void copyTo(CommandQueue queue, Buffer dest, long size) { copyTo(queue, dest, size, 0, 0); @@ -207,6 +243,9 @@ public void copyTo(CommandQueue queue, Buffer dest, long size) { /** * Alternative version of {@link #copyTo(com.jme3.opencl.CommandQueue, com.jme3.opencl.Buffer, long) }, * sets {@code size} to {@code this.getSize()}. + * + * @param queue the command queue + * @param dest the target buffer */ public void copyTo(CommandQueue queue, Buffer dest) { copyTo(queue, dest, getSize()); @@ -227,6 +266,11 @@ public void copyTo(CommandQueue queue, Buffer dest) { /** * Alternative version of {@link #copyToAsync(com.jme3.opencl.CommandQueue, com.jme3.opencl.Buffer, long, long, long) }, * sets {@code srcOffset} and {@code destOffset} to zero. + * + * @param queue the command queue + * @param dest the target buffer + * @param size the number of bytes to copy + * @return an Event to indicate completion */ public Event copyToAsync(CommandQueue queue, Buffer dest, long size) { return copyToAsync(queue, dest, size, 0, 0); @@ -235,6 +279,10 @@ public Event copyToAsync(CommandQueue queue, Buffer dest, long size) { /** * Alternative version of {@link #copyToAsync(com.jme3.opencl.CommandQueue, com.jme3.opencl.Buffer, long) }, * sets {@code size} to {@code this.getSize()}. + * + * @param queue the command queue + * @param dest the target buffer + * @return an Event to indicate completion */ public Event copyToAsync(CommandQueue queue, Buffer dest) { return copyToAsync(queue, dest, getSize()); @@ -260,6 +308,11 @@ public Event copyToAsync(CommandQueue queue, Buffer dest) { * sets {@code offset} to zero. * Important: The mapped memory MUST be released by calling * {@link #unmap(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer) }. + * + * @param queue the command queue + * @param size the number of bytes to map + * @param access specifies the possible access to the memory: READ_ONLY, WRITE_ONLY, READ_WRITE + * @return the byte buffer directly reflecting the buffer contents */ public ByteBuffer map(CommandQueue queue, long size, MappingAccess access) { return map(queue, size, 0, access); @@ -270,6 +323,10 @@ public ByteBuffer map(CommandQueue queue, long size, MappingAccess access) { * sets {@code size} to {@link #getSize() }. * Important: The mapped memory MUST be released by calling * {@link #unmap(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer) }. + * + * @param queue the command queue + * @param access specifies the possible access to the memory: READ_ONLY, WRITE_ONLY, READ_WRITE + * @return the byte buffer directly reflecting the buffer contents */ public ByteBuffer map(CommandQueue queue, MappingAccess access) { return map(queue, getSize(), access); @@ -306,6 +363,12 @@ public ByteBuffer map(CommandQueue queue, MappingAccess access) { * sets {@code offset} to zero. * Important: The mapped memory MUST be released by calling * {@link #unmap(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer) }. + * + * @param queue the command queue + * @param size the size in bytes to map + * @param access specifies the possible access to the memory: READ_ONLY, WRITE_ONLY, READ_WRITE + * @return the byte buffer directly reflecting the buffer contents + * and the event indicating when the buffer contents are available */ public AsyncMapping mapAsync(CommandQueue queue, long size, MappingAccess access) { return mapAsync(queue, size, 0, access); @@ -316,6 +379,11 @@ public AsyncMapping mapAsync(CommandQueue queue, long size, MappingAccess access * sets {@code size} to {@link #getSize() }. * Important: The mapped memory MUST be released by calling * {@link #unmap(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer) }. + * + * @param queue the command queue + * @param access specifies the possible access to the memory: READ_ONLY, WRITE_ONLY, READ_WRITE + * @return the byte buffer directly reflecting the buffer contents + * and the event indicating when the buffer contents are available */ public AsyncMapping mapAsync(CommandQueue queue, MappingAccess access) { return mapAsync(queue, getSize(), 0, access); diff --git a/jme3-core/src/main/java/com/jme3/opencl/Context.java b/jme3-core/src/main/java/com/jme3/opencl/Context.java index fa996fa987..4590f2c5f9 100644 --- a/jme3-core/src/main/java/com/jme3/opencl/Context.java +++ b/jme3-core/src/main/java/com/jme3/opencl/Context.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -286,8 +286,8 @@ public Image bindImage(Texture texture, MemoryAccess access) { * and after modifying it, released by {@link Image#releaseImageForSharingAsync(com.jme3.opencl.CommandQueue) } * This is needed so that OpenGL and OpenCL operations do not interfere with each other. * - * @param buffer - * @param access + * @param buffer the buffer to bind + * @param access the kernel access permissions * @return an image */ public Image bindRenderBuffer(FrameBuffer.RenderBuffer buffer, MemoryAccess access) { @@ -432,6 +432,9 @@ public Program createProgramFromSourceFilesWithInclude(AssetManager assetManager * Alternative version of {@link #createProgramFromSourceFilesWithInclude(com.jme3.asset.AssetManager, java.lang.String, java.lang.String...) } * with an empty include string * + * @param assetManager for loading assets + * @param resources asset paths pointing to OpenCL source files + * @return a new instance * @throws AssetNotFoundException if a file could not be loaded */ public Program createProgramFromSourceFiles(AssetManager assetManager, String... resources) { @@ -442,6 +445,9 @@ public Program createProgramFromSourceFiles(AssetManager assetManager, String... * Alternative version of {@link #createProgramFromSourceFilesWithInclude(com.jme3.asset.AssetManager, java.lang.String, java.util.List) } * with an empty include string * + * @param assetManager for loading assets + * @param resources a list of asset paths pointing to OpenCL source files + * @return a new instance * @throws AssetNotFoundException if a file could not be loaded */ public Program createProgramFromSourceFiles(AssetManager assetManager, List resources) { diff --git a/jme3-core/src/main/java/com/jme3/post/Filter.java b/jme3-core/src/main/java/com/jme3/post/Filter.java index ca27ffbec8..658a71877f 100644 --- a/jme3-core/src/main/java/com/jme3/post/Filter.java +++ b/jme3-core/src/main/java/com/jme3/post/Filter.java @@ -96,12 +96,14 @@ public Pass() { /** * init the pass called internally - * @param renderer - * @param width - * @param height - * @param textureFormat - * @param depthBufferFormat - * @param numSamples + * + * @param renderer (not null) + * @param width the width (in pixels, ≥0) + * @param height the height (in pixels, ≥0) + * @param textureFormat format of the rendered texture + * @param depthBufferFormat format of the depth buffer + * @param numSamples the number of samples per pixel (for multisampling) + * @param renderDepth true to create a depth texture, false for none */ public void init(Renderer renderer, int width, int height, Format textureFormat, Format depthBufferFormat, int numSamples, boolean renderDepth) { Collection caps = renderer.getCaps(); @@ -130,11 +132,12 @@ public void init(Renderer renderer, int width, int height, Format textureFormat, /** * init the pass called internally - * @param renderer - * @param width - * @param height - * @param textureFormat - * @param depthBufferFormat + * + * @param renderer (not null) + * @param width the image width (in pixels, ≥0) + * @param height the image height (in pixels, ≥0) + * @param textureFormat the format of the rendered texture + * @param depthBufferFormat the format of the depth buffer */ public void init(Renderer renderer, int width, int height, Format textureFormat, Format depthBufferFormat) { init(renderer, width, height, textureFormat, depthBufferFormat, 1); @@ -146,13 +149,14 @@ public void init(Renderer renderer, int width, int height, Format textureFormat, /** * init the pass called internally - * @param renderer - * @param width - * @param height - * @param textureFormat - * @param depthBufferFormat - * @param numSample - * @param material + * + * @param renderer (not null) + * @param width the image width (in pixels, ≥0) + * @param height the image height (in pixels, ≥0) + * @param textureFormat the format of the rendered texture + * @param depthBufferFormat the format of the depth buffer + * @param numSample the number of samples per pixel (for multisampling) + * @param material the Material for this pass */ public void init(Renderer renderer, int width, int height, Format textureFormat, Format depthBufferFormat, int numSample, Material material) { init(renderer, width, height, textureFormat, depthBufferFormat, numSample); @@ -213,7 +217,7 @@ public String toString() { } /** - * returns the default pass texture format. + * @return the default pass texture format */ protected Format getDefaultPassTextureFormat() { return processor.getDefaultPassTextureFormat(); @@ -253,7 +257,8 @@ protected final void init(AssetManager manager, RenderManager renderManager, Vie /** * cleanup this filter - * @param r + * + * @param r the Renderer */ protected final void cleanup(Renderer r) { processor = null; @@ -298,7 +303,8 @@ protected void cleanUpFilter(Renderer r) { /** * Override if you want to do something special with the depth texture; - * @param depthTexture + * + * @param depthTexture the desired Texture */ protected void setDepthTexture(Texture depthTexture){ getMaterial().setTexture("DepthTexture", depthTexture); @@ -306,7 +312,8 @@ protected void setDepthTexture(Texture depthTexture){ /** * Override this method if you want to make a pre pass, before the actual rendering of the frame - * @param queue + * + * @param queue the RenderQueue */ protected void postQueue(RenderQueue queue) { } @@ -322,10 +329,11 @@ protected void preFrame(float tpf) { /** * Override this method if you want to make a pass just after the frame has been rendered and just before the filter rendering - * @param renderManager - * @param viewPort - * @param prevFilterBuffer - * @param sceneBuffer + * + * @param renderManager for rendering + * @param viewPort for rendering + * @param prevFilterBuffer the FrameBuffer of the previous filter + * @param sceneBuffer the FrameBuffer of the scene */ protected void postFrame(RenderManager renderManager, ViewPort viewPort, FrameBuffer prevFilterBuffer, FrameBuffer sceneBuffer) { } @@ -333,8 +341,9 @@ protected void postFrame(RenderManager renderManager, ViewPort viewPort, FrameBu /** * Override this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved * This method should always begin by super.write(ex); - * @param ex - * @throws IOException + * + * @param ex the exporter (not null) + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { @@ -365,7 +374,8 @@ public String getName() { /** * Sets the name of the filter - * @param name + * + * @param name the desired name (alias created) */ public void setName(String name) { this.name = name; @@ -381,7 +391,8 @@ protected FrameBuffer getRenderFrameBuffer() { /** * sets the default pass frame buffer - * @param renderFrameBuffer + * + * @param renderFrameBuffer the buffer to use (alias created) */ protected void setRenderFrameBuffer(FrameBuffer renderFrameBuffer) { this.defaultPass.renderFrameBuffer = renderFrameBuffer; @@ -397,7 +408,7 @@ protected Texture2D getRenderedTexture() { /** * sets the rendered texture of this filter - * @param renderedTexture + * @param renderedTexture the desired Texture (alias created) */ protected void setRenderedTexture(Texture2D renderedTexture) { this.defaultPass.renderedTexture = renderedTexture; @@ -464,7 +475,8 @@ public boolean isEnabled() { /** * sets a reference to the FilterPostProcessor to which this filter is attached - * @param proc + * + * @param proc the desired FPP (alias created) */ protected void setProcessor(FilterPostProcessor proc) { processor = proc; diff --git a/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java b/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java index dd7bdd7ed9..b8dba7291f 100644 --- a/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java +++ b/jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java @@ -122,7 +122,8 @@ public void addFilter(Filter filter) { /** * removes this filters from the filters list - * @param filter + * + * @param filter the Filter to remove (not null) */ public void removeFilter(Filter filter) { if (filter == null) { @@ -378,8 +379,9 @@ public void preFrame(float tpf) { /** * sets the filter to enabled or disabled - * @param filter - * @param enabled + * + * @param filter the Filter to modify (not null) + * @param enabled true to enable, false to disable */ protected void setFilterState(Filter filter, boolean enabled) { if (filters.contains(filter)) { @@ -540,7 +542,8 @@ public void setNumSamples(int numSamples) { /** * Sets the asset manager for this processor - * @param assetManager + * + * @param assetManager to load assets */ public void setAssetManager(AssetManager assetManager) { this.assetManager = assetManager; @@ -591,7 +594,8 @@ public Texture2D getFilterTexture() { /** * returns the first filter in the list assignable from the given type - * @param + * + * @param the filter type * @param filterType the filter type * @return a filter assignable from the given type */ diff --git a/jme3-core/src/main/java/com/jme3/post/SceneProcessor.java b/jme3-core/src/main/java/com/jme3/post/SceneProcessor.java index 3a8ff16892..491a24cb5b 100644 --- a/jme3-core/src/main/java/com/jme3/post/SceneProcessor.java +++ b/jme3-core/src/main/java/com/jme3/post/SceneProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,7 +55,10 @@ public interface SceneProcessor { /** * Called when the resolution of the viewport has been changed. - * @param vp + * + * @param vp the affected ViewPort + * @param w the new width (in pixels) + * @param h the new height (in pixels) */ public void reshape(ViewPort vp, int w, int h); diff --git a/jme3-core/src/main/java/com/jme3/profile/AppProfiler.java b/jme3-core/src/main/java/com/jme3/profile/AppProfiler.java index 480de08f43..35106a4004 100644 --- a/jme3-core/src/main/java/com/jme3/profile/AppProfiler.java +++ b/jme3-core/src/main/java/com/jme3/profile/AppProfiler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 jMonkeyEngine + * Copyright (c) 2014-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,11 +48,15 @@ public interface AppProfiler { /** * Called at the beginning of the specified AppStep. + * + * @param step the application-level step that's about to begin */ public void appStep(AppStep step); /** * Called as a substep of the previous AppStep + * + * @param additionalInfo information about the substep */ public void appSubStep(String... additionalInfo); @@ -60,12 +64,19 @@ public interface AppProfiler { * Called at the beginning of the specified VpStep during * the rendering of the specified ViewPort. For bucket-specific * steps the Bucket parameter will be non-null. + * + * @param step the ViewPort-level step that's about to begin + * @param vp which ViewPort is being processed + * @param bucket which Bucket is being processed */ public void vpStep(VpStep step, ViewPort vp, Bucket bucket); /** * Called at the beginning of the specified SpStep (SceneProcessor step). * For more detailed steps it is possible to provide additional information as strings, like the name of the processor. + * + * @param step the SceneProcessor step that's about to begin + * @param additionalInfo information about the SceneProcessor step */ public void spStep(SpStep step, String... additionalInfo); } diff --git a/jme3-core/src/main/java/com/jme3/renderer/Camera.java b/jme3-core/src/main/java/com/jme3/renderer/Camera.java index 6201a0d1f8..0bcbf6a807 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/Camera.java +++ b/jme3-core/src/main/java/com/jme3/renderer/Camera.java @@ -217,6 +217,9 @@ protected Camera() { /** * Constructor instantiates a new Camera object. All * values of the camera are set to default. + * + * @param width the desired width (in pixels) + * @param height the desired height (in pixels) */ public Camera(int width, int height) { this(); @@ -634,6 +637,7 @@ public Vector3f getUp() { * getDirection retrieves the direction vector the camera is * facing. * + * @param store storage for the result (modified if not null) * @return the direction the camera is facing. * @see Camera#getDirection() */ @@ -644,6 +648,7 @@ public Vector3f getDirection(Vector3f store) { /** * getLeft retrieves the left axis of the camera. * + * @param store storage for the result (modified if not null) * @return the left axis of the camera. * @see Camera#getLeft() */ @@ -654,6 +659,7 @@ public Vector3f getLeft(Vector3f store) { /** * getUp retrieves the up axis of the camera. * + * @param store storage for the result (modified if not null) * @return the up axis of the camera. * @see Camera#getUp() */ @@ -692,6 +698,8 @@ public void setRotation(Quaternion rotation) { * given a direction and an up vector. * * @param direction the direction this camera is facing. + * @param up the desired "up" direction for the camera (not null, + * unaffected, typically (0,1,0)) */ public void lookAtDirection(Vector3f direction, Vector3f up) { this.rotation.lookAt(direction, up); @@ -1089,7 +1097,8 @@ public Matrix4f getViewMatrix() { * use the matrix for computing the view projection matrix as well. * Use null argument to return to normal functionality. * - * @param projMatrix + * @param projMatrix the desired projection matrix (unaffected) or null + * to cease the override */ public void setProjectionMatrix(Matrix4f projMatrix) { if (projMatrix == null) { @@ -1350,6 +1359,11 @@ public Vector3f getWorldCoordinates(Vector2f screenPos, float projectionZPos) { } /** + * @param screenPosition a (2-D) location in screen space (not null) + * @param projectionZPos a (non-linear) Z value in projection space + * @param store storage for the result (modified if not null) + * @return a location vector (in world coordinates, either + * store or a new vector) * @see Camera#getWorldCoordinates */ public Vector3f getWorldCoordinates(Vector2f screenPosition, @@ -1375,6 +1389,8 @@ public Vector3f getWorldCoordinates(Vector2f screenPosition, /** * Converts the given position from world space to screen space. * + * @param worldPos a location in world coordinates (not null, unaffected) + * @return a new (3-D) location vector (in screen coordinates) * @see Camera#getScreenCoordinates */ public Vector3f getScreenCoordinates(Vector3f worldPos) { @@ -1384,6 +1400,10 @@ public Vector3f getScreenCoordinates(Vector3f worldPos) { /** * Converts the given position from world space to screen space. * + * @param worldPosition a location in world coordinates (not null, unaffected) + * @param store storage for the result (modified if not null) + * @return a (3-D) location vector (in screen coordinates, either + * store or a new vector) * @see Camera#getScreenCoordinates(Vector3f, Vector3f) */ public Vector3f getScreenCoordinates(Vector3f worldPosition, Vector3f store) { diff --git a/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java b/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java index 54e661e66a..4cb84ef139 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java +++ b/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -95,7 +95,8 @@ public class RenderManager { /** * Create a high-level rendering interface over the * low-level rendering interface. - * @param renderer + * + * @param renderer (alias created) */ public RenderManager(Renderer renderer) { this.renderer = renderer; @@ -274,6 +275,10 @@ public List getPostViews() { * Creates a new pre ViewPort, to display the given camera's content. *

* The view will be processed before the main and post viewports. + * + * @param viewName the desired viewport name + * @param cam the Camera to use for rendering (alias created) + * @return a new instance */ public ViewPort createPreView(String viewName, Camera cam) { ViewPort vp = new ViewPort(viewName, cam); @@ -286,6 +291,10 @@ public ViewPort createPreView(String viewName, Camera cam) { *

* The view will be processed before the post viewports but after * the pre viewports. + * + * @param viewName the desired viewport name + * @param cam the Camera to use for rendering (alias created) + * @return a new instance */ public ViewPort createMainView(String viewName, Camera cam) { ViewPort vp = new ViewPort(viewName, cam); @@ -297,6 +306,10 @@ public ViewPort createMainView(String viewName, Camera cam) { * Creates a new post ViewPort, to display the given camera's content. *

* The view will be processed after the pre and main viewports. + * + * @param viewName the desired viewport name + * @param cam the Camera to use for rendering (alias created) + * @return a new instance */ public ViewPort createPostView(String viewName, Camera cam) { ViewPort vp = new ViewPort(viewName, cam); @@ -319,6 +332,9 @@ private void notifyReshape(ViewPort vp, int w, int h) { * Internal use only. * Updates the resolution of all on-screen cameras to match * the given width and height. + * + * @param w the new width (in pixels) + * @param h the new heigh (in pixels) */ public void notifyReshape(int w, int h) { for (ViewPort vp : preViewPorts) { @@ -392,6 +408,8 @@ public void setTimer(Timer timer) { * Sets an AppProfiler hook that will be called back for * specific steps within a single update frame. Value defaults * to null. + * + * @param prof the AppProfiler to use (alias created, default=null) */ public void setAppProfiler(AppProfiler prof) { this.prof = prof; @@ -520,6 +538,8 @@ public void setWorldMatrix(Matrix4f mat) { * Internal use only. * Updates the given list of uniforms with {@link UniformBinding uniform bindings} * based on the current world state. + * + * @param shader (not null) */ public void updateUniformBindings(Shader shader) { uniformBindingManager.updateUniformBindings(shader); @@ -1135,6 +1155,8 @@ public void renderViewPort(ViewPort vp, float tpf) { * * * @param tpf Time per frame value + * @param mainFrameBufferActive true to render viewports with no output + * FrameBuffer, false to skip them */ public void render(float tpf, boolean mainFrameBufferActive) { if (renderer instanceof NullRenderer) { diff --git a/jme3-core/src/main/java/com/jme3/renderer/Renderer.java b/jme3-core/src/main/java/com/jme3/renderer/Renderer.java index 986032ae12..2fd63b20a9 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/Renderer.java +++ b/jme3-core/src/main/java/com/jme3/renderer/Renderer.java @@ -81,6 +81,8 @@ public interface Renderer { * These are updated when the Renderer's methods are used, make sure * to call {@link Statistics#clearFrame() } at the appropriate time * to get accurate info per frame. + * + * @return a new instance */ public Statistics getStatistics(); @@ -110,6 +112,8 @@ public interface Renderer { /** * Applies the given {@link RenderState}, making the necessary * GL calls so that the state is applied. + * + * @param state the RenderState to apply */ public void applyRenderState(RenderState state); @@ -188,11 +192,18 @@ public interface Renderer { * Copies contents from src to dst, scaling if necessary. * set copyDepth to false to only copy the color buffers. * @deprecated Use {@link Renderer#copyFrameBuffer(com.jme3.texture.FrameBuffer, com.jme3.texture.FrameBuffer, boolean, boolean)}. + * @param src the source FrameBuffer (unaffected) + * @param dst the destination FrameBuffer (modified) + * @param copyDepth true→copy depth info, false→don't copy it */ @Deprecated public void copyFrameBuffer(FrameBuffer src, FrameBuffer dst, boolean copyDepth); /** * Copies contents from src to dst, scaling if necessary. + * @param src the source FrameBuffer (unaffected) + * @param dst the destination FrameBuffer (modified) + * @param copyColor true→copy color info, false→don't copy it + * @param copyDepth true→copy depth info, false→don't copy it */ public void copyFrameBuffer(FrameBuffer src, FrameBuffer dst, boolean copyColor, boolean copyDepth); @@ -241,11 +252,16 @@ public interface Renderer { /** * Deletes a framebuffer and all attached renderbuffers + * + * @param fb the FrameBuffer to be deleted */ public void deleteFrameBuffer(FrameBuffer fb); /** * Sets the texture to use for the given texture unit. + * + * @param unit which unit + * @param tex the Texture to use */ public void setTexture(int unit, Texture tex); @@ -264,6 +280,8 @@ public interface Renderer { /** * Deletes a texture from the GPU. + * + * @param image the texture to delete */ public void deleteImage(Image image); @@ -358,6 +376,8 @@ public interface Renderer { * Alpha-to-coverage is useful for rendering transparent objects * without having to worry about sorting them. *

+ * + * @param value true to enable alpha coverage, otherwise false */ public void setAlphaToCoverage(boolean value); @@ -375,6 +395,7 @@ public interface Renderer { * {@link Renderer#setMainFrameBufferSrgb(boolean)} if the * {@link Caps#Srgb} is supported by the GPU. * + * @param srgb true for sRGB colorspace, false for linear colorspace * @throws RendererException If the GPU hardware does not support sRGB. * * @see FrameBuffer#setSrgb(boolean) @@ -452,12 +473,14 @@ public interface Renderer { /** * Gets the alpha to coverage state. * + * @return true if alpha coverage is enabled, otherwise false */ public boolean getAlphaToCoverage(); /** * Get the default anisotropic filter level for textures. * + * @return the default filter level */ public int getDefaultAnisotropicFilter(); diff --git a/jme3-core/src/main/java/com/jme3/renderer/RendererException.java b/jme3-core/src/main/java/com/jme3/renderer/RendererException.java index 7781fae961..9dfc2ca7ae 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/RendererException.java +++ b/jme3-core/src/main/java/com/jme3/renderer/RendererException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,8 @@ public class RendererException extends RuntimeException { /** * Creates a new instance of RendererException + * + * @param message the desired message text */ public RendererException(String message){ super(message); diff --git a/jme3-core/src/main/java/com/jme3/renderer/Statistics.java b/jme3-core/src/main/java/com/jme3/renderer/Statistics.java index 5a29e776a1..66439e32cc 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/Statistics.java +++ b/jme3-core/src/main/java/com/jme3/renderer/Statistics.java @@ -122,6 +122,10 @@ public void getData(int[] data){ /** * Called by the Renderer when a mesh has been drawn. + * + * @param mesh the Mesh that was drawn (not null) + * @param lod which level of detail + * @param count multiplier for triangles and vertices */ public void onMeshDrawn(Mesh mesh, int lod, int count){ if( !enabled ) @@ -134,6 +138,9 @@ public void onMeshDrawn(Mesh mesh, int lod, int count){ /** * Called by the Renderer when a mesh has been drawn. + * + * @param mesh the Mesh that was drawn (not null) + * @param lod which level of detail */ public void onMeshDrawn(Mesh mesh, int lod){ onMeshDrawn(mesh, lod, 1); diff --git a/jme3-core/src/main/java/com/jme3/renderer/ViewPort.java b/jme3-core/src/main/java/com/jme3/renderer/ViewPort.java index c2d39dc4b5..54960903da 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/ViewPort.java +++ b/jme3-core/src/main/java/com/jme3/renderer/ViewPort.java @@ -285,6 +285,8 @@ public Camera getCamera() { /** * Internal use only. + * + * @return the pre-existing instance */ public RenderQueue getQueue() { return queue; diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java index 08f5c49ee9..bedfe5eda4 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java @@ -215,12 +215,12 @@ public interface GL { *

Reference Page

*

* Attaches a shader object to a program object. - *

+ * *

In order to create a complete shader program, there must be a way to specify the list of things that will be linked together. Program objects provide * this mechanism. Shaders that are to be linked together in a program object must first be attached to that program object. glAttachShader attaches the * shader object specified by shader to the program object specified by program. This indicates that shader will be included in link operations that will * be performed on program.

- *

+ * *

All operations that can be performed on a shader object are valid whether or not the shader object is attached to a program object. It is permissible to * attach a shader object to a program object before source code has been loaded into the shader object or before the shader object has been compiled. It * is permissible to attach multiple shader objects of the same type because each may contain a portion of the complete shader. It is also permissible to @@ -256,7 +256,7 @@ public interface GL { *

Reference Page

*

* Binds the a texture to a texture target. - *

+ * *

While a texture object is bound, GL operations on the target to which it is bound affect the bound object, and queries of the target to which it is * bound return state from the bound object. If texture mapping of the dimensionality of the target to which a texture object is bound is enabled, the * state of the bound texture object directs the texturing operation.

@@ -302,20 +302,20 @@ public interface GL { *

Reference Page

*

* Creates and initializes a buffer object's data store. - *

+ * *

{@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The * frequency of access may be one of these:

- *

+ * *

    *
  • STREAM - The data store contents will be modified once and used at most a few times.
  • *
  • STATIC - The data store contents will be modified once and used many times.
  • *
  • DYNAMIC - The data store contents will be modified repeatedly and used many times.
  • *
- *

+ * *

The nature of access may be one of these:

- *

+ * *

    *
  • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
  • *
  • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
  • @@ -332,20 +332,20 @@ public interface GL { *

    Reference Page

    *

    * Creates and initializes a buffer object's data store. - *

    + * *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The * frequency of access may be one of these:

    - *

    + * *

      *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • *
    • STATIC - The data store contents will be modified once and used many times.
    • *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • *
    - *

    + * *

    The nature of access may be one of these:

    - *

    + * *

      *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • @@ -362,20 +362,20 @@ public interface GL { *

      Reference Page

      *

      * Creates and initializes a buffer object's data store. - *

      + * *

      {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The * frequency of access may be one of these:

      - *

      + * *

        *
      • STREAM - The data store contents will be modified once and used at most a few times.
      • *
      • STATIC - The data store contents will be modified once and used many times.
      • *
      • DYNAMIC - The data store contents will be modified repeatedly and used many times.
      • *
      - *

      + * *

      The nature of access may be one of these:

      - *

      + * *

        *
      • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
      • *
      • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
      • @@ -392,20 +392,20 @@ public interface GL { *

        Reference Page

        *

        * Creates and initializes a buffer object's data store. - *

        + * *

        {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The * frequency of access may be one of these:

        - *

        + * *

          *
        • STREAM - The data store contents will be modified once and used at most a few times.
        • *
        • STATIC - The data store contents will be modified once and used many times.
        • *
        • DYNAMIC - The data store contents will be modified repeatedly and used many times.
        • *
        - *

        + * *

        The nature of access may be one of these:

        - *

        + * *

          *
        • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
        • *
        • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
        • @@ -512,7 +512,7 @@ public void glCompressedTexImage2D(int target, int level, int internalFormat, in /** *

          Reference Page

          - *

          + * * Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format. * * @param target the target texture. @@ -529,14 +529,16 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo /** *

          Reference Page

          - *

          + * * Creates a program object. + * + * @return the ID of the new program, or 0 if unsuccessful */ public int glCreateProgram(); /** *

          Reference Page

          - *

          + * * Creates a shader object. * * @param shaderType the type of shader to be created. One of: @@ -545,6 +547,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * {@link GL3#GL_GEOMETRY_SHADER GEOMETRY_SHADER} * {@link GL4#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER} * {@link GL4#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER} + * @return the ID of the new shader, or 0 if unsuccessful */ public int glCreateShader(int shaderType); @@ -596,7 +599,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * currently bound to any of the target bindings of {@link #glBindTexture BindTexture} is deleted, it is as though {@link #glBindTexture BindTexture} had been executed with the * same target and texture zero. Additionally, special care must be taken when deleting a texture if any of the images of the texture are attached to a * framebuffer object. - *

          + * *

          Unused names in textures that have been marked as used for the purposes of {@link #glGenTextures GenTextures} are marked as unused again. Unused names in textures are * silently ignored, as is the name zero.

          * @@ -673,7 +676,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo *

          * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices. Elements {@code first} through * first + count – 1 of each enabled non-instanced array are transferred to the GL. - *

          + * *

          If an array corresponding to an attribute required by a vertex shader is not enabled, then the corresponding element is taken from the current attribute * state. If an array is enabled, the corresponding current vertex attribute value is unaffected by the execution of this function.

          * @@ -685,25 +688,25 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo /** *

          Reference Page

          - *

          + * *

          Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument * {@link GL2#GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link GL2#GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be * achieved with an optimal index set.

          - *

          + * *

          When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is * enabled, each is used.

          - *

          + * *

          Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified * maintain their previous values.

          - *

          + * * Errors - *

          + * *

          It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause * implementation-dependent behavior.

          - *

          + * *

            *
          • GL_INVALID_ENUM is generated if mode is not an accepted value.
          • *
          • GL_INVALID_VALUE is generated if count is negative.
          • @@ -771,28 +774,30 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo /** *

            Reference Page

            - *

            + * * Generates query object names. * + * @param number the number of query object names to be generated * @param ids a buffer in which the generated query object names are stored. */ public void glGenQueries(int number, IntBuffer ids); /** *

            Reference Page

            - *

            + * * Returns the location of an attribute variable. * * @param program the program object to be queried. * @param name a null terminated string containing the name of the attribute variable whose location is to be queried. + * @return the location */ public int glGetAttribLocation(int program, String name); /** *

            Reference Page

            - *

            + * * Returns the current boolean value of the specified state variable. - *

            + * *

            LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

            @@ -804,7 +809,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo /** *

            Reference Page

            - *

            + * * Returns a subset of a buffer object's data store. * * @param target the target buffer object. @@ -815,19 +820,20 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo /** *

            Reference Page

            - *

            + * * Returns error information. Each detectable error is assigned a numeric code. When an error is detected, a flag is set and the code is recorded. Further * errors, if they occur, do not affect this recorded code. When {@code GetError} is called, the code is returned and the flag is cleared, so that a * further error will again record its code. If a call to {@code GetError} returns {@link #GL_NO_ERROR NO_ERROR}, then there has been no detectable error since * the last call to {@code GetError} (or since the GL was initialized). + * @return the error code, or NO_ERROR if none */ public int glGetError(); /** *

            Reference Page

            - *

            + * * Returns the current integer value of the specified state variable. - *

            + * *

            LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

            @@ -855,6 +861,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * * @param program the program object whose information log is to be queried. * @param maxSize the size of the character buffer for storing the returned information log. + * @return the contents of the information log */ public String glGetProgramInfoLog(int program, int maxSize); @@ -863,6 +870,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * * @param query the name of a query object * @param pname the symbolic name of a query object parameter + * @return the value of the parameter */ public long glGetQueryObjectui64(int query, int pname); @@ -875,6 +883,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * @param pname the symbolic name of a query object parameter. One of: * {@link #GL_QUERY_RESULT QUERY_RESULT} * {@link #GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE} + * @return the value of the parameter */ public int glGetQueryObjectiv(int query, int pname); @@ -896,6 +905,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * * @param shader the shader object whose information log is to be queried. * @param maxSize the size of the character buffer for storing the returned information log. + * @return the contents of the information log */ public String glGetShaderInfoLog(int shader, int maxSize); @@ -910,6 +920,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * {@link #GL_EXTENSIONS EXTENSIONS} * {@link #GL_VERSION VERSION} * {@link GL2#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION} + * @return the value of the property */ public String glGetString(int name); @@ -920,6 +931,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * * @param program the program object to be queried. * @param name a null terminated string containing the name of the uniform variable whose location is to be queried. + * @return the location */ public int glGetUniformLocation(int program, String name); @@ -929,6 +941,7 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * Determines if {@code cap} is currently enabled (as with {@link #glEnable Enable}) or disabled. * * @param cap the enable state to query. + * @return true if enabled, otherwise false */ public boolean glIsEnabled(int cap); @@ -962,10 +975,10 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo /** *

            Reference Page

            - *

            + * * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This * function determines that value. - *

            + * *

            {@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value.

            * @@ -1040,6 +1053,8 @@ public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yo * * @param shader the shader object whose source code is to be replaced, * @param strings an array of pointers to strings containing the source code to be loaded into the shader + * @param length storage for the string lengths, or null for + * null-terminated strings */ public void glShaderSource(int shader, String[] strings, IntBuffer length); @@ -1335,9 +1350,9 @@ public void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int /** *

            Reference Page

            - *

            + * * Specifies the viewport transformation parameters for all viewports. - *

            + * *

            In the initial state, {@code width} and {@code height} for each viewport are set to the width and height, respectively, of the window into which the GL is to do * its rendering. If the default framebuffer is bound but no default framebuffer is associated with the GL context, then {@code width} and {@code height} are * initially set to zero.

            diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java index f330f43db9..0ecc8432e5 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GL3.java @@ -165,13 +165,14 @@ public interface GL3 extends GL2 { /** *

            Reference Page

            - *

            + * * Queries indexed string state. * * @param name the indexed state to query. One of: * {@link GL#GL_EXTENSIONS EXTENSIONS} * {@link GL2#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION} * @param index the index of the particular element being queried. + * @return the value of the string state */ public String glGetString(int name, int index); /// GL3+ diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java index 642ac0c71b..8b4dfab375 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLExt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -104,22 +104,22 @@ public interface GLExt { /** *

            Reference Page

            - *

            + * * Creates and initializes a buffer object's data store. - *

            + * *

            {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The * frequency of access may be one of these:

            - *

            + * *

              *
            • STREAM - The data store contents will be modified once and used at most a few times.
            • *
            • STATIC - The data store contents will be modified once and used many times.
            • *
            • DYNAMIC - The data store contents will be modified repeatedly and used many times.
            • *
            - *

            + * *

            The nature of access may be one of these:

            - *

            + * *

              *
            • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
            • *
            • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
            • @@ -196,6 +196,7 @@ public interface GLExt { * * @param condition the condition that must be met to set the sync object's state to signaled. * @param flags a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and {@code flags} must be zero. + * @return a new instance */ public Object glFenceSync(int condition, int flags); diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java index 918fb0f069..915629c754 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java @@ -1164,9 +1164,16 @@ protected void bindProgram(Shader shader) { } } - /*********************************************************************\ - |* Shaders *| - \*********************************************************************/ + /*=========*\ + |* Shaders *| + \*=========*/ + + /** + * Update the location of the specified Uniform in the specified Shader. + * + * @param shader the Shader containing the Uniform (not null) + * @param uniform the Uniform to update (not null) + */ protected void updateUniformLocation(Shader shader, Uniform uniform) { int loc = gl.glGetUniformLocation(shader.getId(), uniform.getName()); if (loc < 0) { @@ -1642,9 +1649,17 @@ public void deleteShader(Shader shader) { shader.resetObject(); } - /*********************************************************************\ - |* Framebuffers *| - \*********************************************************************/ + /*==============*\ + |* Framebuffers *| + \*==============*/ + + /** + * Copy the source buffer to the destination buffer, including both color + * and depth. + * + * @param src the source buffer (unaffected) + * @param dst the destination buffer + */ public void copyFrameBuffer(FrameBuffer src, FrameBuffer dst) { copyFrameBuffer(src, dst, true, true); } @@ -3057,9 +3072,16 @@ public void drawTriangleList(VertexBuffer indexBuf, Mesh mesh, int count) { } } - /*********************************************************************\ - |* Render Calls *| - \*********************************************************************/ + /*==============*\ + |* Render Calls *| + \*==============*/ + + /** + * Convert a mesh mode to the corresponding GL value. + * + * @param mode input enum value (not null) + * @return the corresponding GL value + */ public int convertElementMode(Mesh.Mode mode) { switch (mode) { case Points: diff --git a/jme3-core/src/main/java/com/jme3/renderer/queue/GeometryList.java b/jme3-core/src/main/java/com/jme3/renderer/queue/GeometryList.java index 4b696af162..b26840f9c8 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/queue/GeometryList.java +++ b/jme3-core/src/main/java/com/jme3/renderer/queue/GeometryList.java @@ -75,6 +75,8 @@ public void setComparator(GeometryComparator comparator) { /** * Returns the GeometryComparator that this Geometry list uses * for sorting. + * + * @return the pre-existing instance */ public GeometryComparator getComparator() { return comparator; diff --git a/jme3-core/src/main/java/com/jme3/renderer/queue/RenderQueue.java b/jme3-core/src/main/java/com/jme3/renderer/queue/RenderQueue.java index 8785038eb1..e95463f14e 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/queue/RenderQueue.java +++ b/jme3-core/src/main/java/com/jme3/renderer/queue/RenderQueue.java @@ -182,6 +182,9 @@ public enum ShadowMode { *
            • Bucket.Gui: {@link com.jme3.renderer.queue.GuiComparator} sorts geometries back to * front based on their Z values. *
            + * + * @param bucket which Bucket to modify (not null) + * @param c the comparator to use (alias created) */ public void setGeometryComparator(Bucket bucket, GeometryComparator c) { switch (bucket) { @@ -208,6 +211,9 @@ public void setGeometryComparator(Bucket bucket, GeometryComparator c) { /** * Returns the current GeometryComparator used by the specified bucket, * one of Gui, Opaque, Sky, Transparent, or Translucent. + * + * @param bucket which Bucket to access (not null) + * @return the pre-existing instance */ public GeometryComparator getGeometryComparator(Bucket bucket) { switch (bucket) { diff --git a/jme3-core/src/main/java/com/jme3/scene/AssetLinkNode.java b/jme3-core/src/main/java/com/jme3/scene/AssetLinkNode.java index 2df365f794..8159455f15 100644 --- a/jme3-core/src/main/java/com/jme3/scene/AssetLinkNode.java +++ b/jme3-core/src/main/java/com/jme3/scene/AssetLinkNode.java @@ -87,7 +87,8 @@ public void cloneFields( Cloner cloner, Object original ) { /** * Add a "linked" child. These are loaded from the assetManager when the * AssetLinkNode is loaded from a binary file. - * @param key + * + * @param key the ModelKey to add */ public void addLinkedChild(ModelKey key) { if (assetLoaderKeys.contains(key)) { @@ -135,7 +136,8 @@ public void detachLinkedChild(Spatial child, ModelKey key) { /** * Loads the linked children AssetKeys from the AssetManager and attaches them to the Node
            * If they are already attached, they will be reloaded. - * @param manager + * + * @param manager for loading assets */ public void attachLinkedChildren(AssetManager manager) { detachLinkedChildren(); diff --git a/jme3-core/src/main/java/com/jme3/scene/Geometry.java b/jme3-core/src/main/java/com/jme3/scene/Geometry.java index 24f86dd02e..fde6160039 100644 --- a/jme3-core/src/main/java/com/jme3/scene/Geometry.java +++ b/jme3-core/src/main/java/com/jme3/scene/Geometry.java @@ -499,6 +499,7 @@ public boolean isGrouped() { /** * @deprecated Use {@link #isGrouped()} instead. + * @return true if managed by a {@link GeometryGroupNode} */ @Deprecated public boolean isBatched() { @@ -630,7 +631,7 @@ public boolean isDirtyMorph() { * Seting this to true will stop this geometry morph buffer to be updated, * unless the morph state changes * - * @param dirtyMorph + * @param dirtyMorph true→prevent updating, false→allow updating */ public void setDirtyMorph(boolean dirtyMorph) { this.dirtyMorph = dirtyMorph; diff --git a/jme3-core/src/main/java/com/jme3/scene/Mesh.java b/jme3-core/src/main/java/com/jme3/scene/Mesh.java index 04ef379841..6d72765bf4 100644 --- a/jme3-core/src/main/java/com/jme3/scene/Mesh.java +++ b/jme3-core/src/main/java/com/jme3/scene/Mesh.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -322,7 +322,7 @@ public void cloneFields(Cloner cloner, Object original) { } /** - * @param forSoftwareAnim + * @param forSoftwareAnim ignored * @deprecated use generateBindPose(); */ @Deprecated @@ -558,6 +558,8 @@ public int[] getModeStart() { /** * Get the mode start indices for {@link Mode#Hybrid} mesh mode. + * + * @param modeStart the pre-existing array */ public void setModeStart(int[] modeStart) { this.modeStart = modeStart; @@ -602,7 +604,7 @@ public int getMaxNumWeights() { * Only relevant if this mesh has bone index/weight buffers. * This value should be between 0 and 4. * - * @param maxNumWeights + * @param maxNumWeights the desired number (between 0 and 4, inclusive) */ public void setMaxNumWeights(int maxNumWeights) { this.maxNumWeights = maxNumWeights; @@ -891,6 +893,8 @@ public int getVertexCount() { /** * Returns the number of instances this mesh contains. The instance * count is based on any VertexBuffers with instancing set. + * + * @return the number of instances */ public int getInstanceCount() { return instanceCount; @@ -965,6 +969,8 @@ public void getTriangle(int index, int[] indices) { /** * Returns the mesh's VAO ID. Internal use only. + * + * @return the array ID */ public int getId() { return vertexArrayID; @@ -972,6 +978,8 @@ public int getId() { /** * Sets the mesh's VAO ID. Internal use only. + * + * @param id the array ID */ public void setId(int id) { if (vertexArrayID != -1) { @@ -1007,6 +1015,12 @@ public void clearCollisionData() { * Handles collision detection, internal use only. * User code should only use collideWith() on scene * graph elements such as {@link Spatial}s. + * + * @param other the other Collidable + * @param worldMatrix the world matrix + * @param worldBound the world bound + * @param results storage for the results + * @return the number of collisions detected (≥0) */ public int collideWith(Collidable other, Matrix4f worldMatrix, @@ -1458,7 +1472,7 @@ public boolean isAnimated() { /** * @deprecated use isAnimatedByJoint - * @param boneIndex + * @param boneIndex the bone's index in its skeleton * @return true if animated by that bone, otherwise false */ @Deprecated @@ -1508,7 +1522,7 @@ public boolean isAnimatedByJoint(int jointIndex) { /** * Sets the count of vertices used for each tessellation patch * - * @param patchVertexCount + * @param patchVertexCount the desired count */ public void setPatchVertexCount(int patchVertexCount) { this.patchVertexCount = patchVertexCount; diff --git a/jme3-core/src/main/java/com/jme3/scene/Node.java b/jme3-core/src/main/java/com/jme3/scene/Node.java index d8b63032c9..0be4f504a3 100644 --- a/jme3-core/src/main/java/com/jme3/scene/Node.java +++ b/jme3-core/src/main/java/com/jme3/scene/Node.java @@ -338,6 +338,8 @@ public int attachChild(Spatial child) { * * @param child * the child to attach to this node. + * @param index + * the position where the child should be attached * @return the number of children maintained by this node. * @throws IllegalArgumentException if child is null or this */ @@ -640,6 +642,7 @@ with BoundingSphere bounding volumes and collideWith(BoundingSphere). Doing * node.descendantMatches(aClass, aRegex). *

            * + * @param the type of Spatial returned * @param spatialSubclass Subclass which matching Spatials must implement. * Null causes all Spatials to qualify. * @param nameRegex Regular expression to match Spatial name against. @@ -672,6 +675,10 @@ public List descendantMatches( /** * Convenience wrapper. * + * @param the type of Spatial returned + * @param spatialSubclass the type of Spatial returned, or null for all + * spatials + * @return a new list of pre-existing spatials (may be empty) * @see #descendantMatches(java.lang.Class, java.lang.String) */ public List descendantMatches( @@ -682,6 +689,9 @@ public List descendantMatches( /** * Convenience wrapper. * + * @param the type of Spatial returned + * @param nameRegex regular expression to match Spatial names against, or null for all spatials + * @return a new list of pre-existing spatials (may be empty) * @see #descendantMatches(java.lang.Class, java.lang.String) */ public List descendantMatches(String nameRegex) { diff --git a/jme3-core/src/main/java/com/jme3/scene/Spatial.java b/jme3-core/src/main/java/com/jme3/scene/Spatial.java index a6f3d4bac6..db8bc1791b 100644 --- a/jme3-core/src/main/java/com/jme3/scene/Spatial.java +++ b/jme3-core/src/main/java/com/jme3/scene/Spatial.java @@ -247,6 +247,8 @@ boolean requiresUpdates() { * call setRequiresUpdate(false) in their constructors to receive * optimal behavior if they don't require updateLogicalState() to be * called even if there are no controls. + * + * @param f true→require updates, false→don't require updates */ protected void setRequiresUpdates(boolean f) { // Note to explorers, the reason this was done as a protected setter @@ -785,6 +787,7 @@ public void addControl(Control control) { /** * Removes the first control that is an instance of the given class. * + * @param controlType the type of Control to remove * @see Spatial#addControl(com.jme3.scene.control.Control) */ public void removeControl(Class controlType) { @@ -835,6 +838,7 @@ public boolean removeControl(Control control) { * Returns the first control that is an instance of the given class, * or null if no such control exists. * + * @param the type of control to look for * @param controlType The superclass of the control to look for. * @return The first instance in the list of the controlType class, or null. * @@ -1057,6 +1061,10 @@ public void setLocalScale(float localScale) { /** * setLocalScale sets the local scale of this node. + * + * @param x the desired scale factor for the X axis + * @param y the desired scale factor for the Y axis + * @param z the desired scale factor for the Z axis */ public void setLocalScale(float x, float y, float z) { localTransform.setScale(x, y, z); @@ -1099,6 +1107,10 @@ public void setLocalTranslation(Vector3f localTranslation) { /** * setLocalTranslation sets the local translation of this * spatial. + * + * @param x the desired offset in the +X direction + * @param y the desired offset in the +Y direction + * @param z the desired offset in the +Z direction */ public void setLocalTranslation(float x, float y, float z) { this.localTransform.setTranslation(x, y, z); @@ -1160,6 +1172,9 @@ public void removeLight(Light light) { /** * Translates the spatial by the given translation vector. * + * @param x the offset to apply in the +X direction + * @param y the offset to apply in the +Y direction + * @param z the offset to apply in the +Z direction * @return The spatial on which this method is called, e.g this. */ public Spatial move(float x, float y, float z) { @@ -1172,6 +1187,7 @@ public Spatial move(float x, float y, float z) { /** * Translates the spatial by the given translation vector. * + * @param offset the desired offset (not null, unaffected) * @return The spatial on which this method is called, e.g this. */ public Spatial move(Vector3f offset) { @@ -1184,6 +1200,7 @@ public Spatial move(Vector3f offset) { /** * Scales the spatial by the given value * + * @param s the scaling factor to apply to all axes * @return The spatial on which this method is called, e.g this. */ public Spatial scale(float s) { @@ -1193,6 +1210,9 @@ public Spatial scale(float s) { /** * Scales the spatial by the given scale vector. * + * @param x the scaling factor to apply to the X axis + * @param y the scaling factor to apply to the Y axis + * @param z the scaling factor to apply to the Z axis * @return The spatial on which this method is called, e.g this. */ public Spatial scale(float x, float y, float z) { @@ -1205,6 +1225,7 @@ public Spatial scale(float x, float y, float z) { /** * Rotates the spatial by the given rotation. * + * @param rot the intrinsic rotation to apply (not null, unaffected) * @return The spatial on which this method is called, e.g this. */ public Spatial rotate(Quaternion rot) { @@ -1218,6 +1239,9 @@ public Spatial rotate(Quaternion rot) { * Rotates the spatial by the xAngle, yAngle and zAngle angles (in radians), * (aka pitch, yaw, roll) in the local coordinate space. * + * @param xAngle the angle of rotation around the +X axis (in radians) + * @param yAngle the angle of rotation around the +Y axis (in radians) + * @param zAngle the angle of rotation around the +Z axis (in radians) * @return The spatial on which this method is called, e.g this. */ public Spatial rotate(float xAngle, float yAngle, float zAngle) { @@ -1343,6 +1367,7 @@ public void setLodLevel(int lod) { * Note that meshes of geometries are not cloned explicitly, they * are shared if static, or specially cloned if animated. * + * @param cloneMaterial true to clone materials, false to share them * @see Mesh#cloneForAnim() */ public Spatial clone(boolean cloneMaterial) { @@ -1377,6 +1402,9 @@ public Spatial clone(boolean cloneMaterial) { /** * The old clone() method that did not use the new Cloner utility. + * + * @param cloneMaterial ignored + * @return never */ @Deprecated public Spatial oldClone(boolean cloneMaterial) { @@ -1764,7 +1792,7 @@ public Matrix4f getLocalToWorldMatrix(Matrix4f store) { /** * Visit each scene graph element ordered by DFS with the default post order mode. * - * @param visitor + * @param visitor the action to take for each visited Spatial * @see #depthFirstTraversal(com.jme3.scene.SceneGraphVisitor, com.jme3.scene.Spatial.DFSMode) */ public void depthFirstTraversal(SceneGraphVisitor visitor) { @@ -1789,7 +1817,7 @@ public static enum DFSMode { * Visit each scene graph element ordered by DFS. * There are two modes: pre order and post order. * - * @param visitor + * @param visitor the action to take for each visited Spatial * @param mode the traversal mode: pre order or post order */ public abstract void depthFirstTraversal(SceneGraphVisitor visitor, DFSMode mode); @@ -1797,7 +1825,7 @@ public static enum DFSMode { /** * Visit each scene graph element ordered by BFS * - * @param visitor + * @param visitor the action to take for each visited Spatial */ public void breadthFirstTraversal(SceneGraphVisitor visitor) { Queue queue = new LinkedList<>(); diff --git a/jme3-core/src/main/java/com/jme3/scene/UserData.java b/jme3-core/src/main/java/com/jme3/scene/UserData.java index ac17c72e24..ee8434a3c5 100644 --- a/jme3-core/src/main/java/com/jme3/scene/UserData.java +++ b/jme3-core/src/main/java/com/jme3/scene/UserData.java @@ -251,6 +251,7 @@ public void read(JmeImporter im) throws IOException { * @param list * the list to be stored * @throws IOException + * from the capsule */ private void writeList(OutputCapsule oc, Collection list, String listName) throws IOException { if (list != null) { @@ -313,6 +314,7 @@ private void writeList(OutputCapsule oc, Collection list, String listName) th * the input capsule * @return loaded list (an empty list in case its size is 0) * @throws IOException + * from the capsule */ private List readList(InputCapsule ic, String listName) throws IOException { int size = ic.readInt(listName + "size", 0); diff --git a/jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java b/jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java index 3742aa73b0..deeec0eacf 100644 --- a/jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java +++ b/jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -336,6 +336,8 @@ public int getComponentSize() { /** * Creates an empty, uninitialized buffer. * Must call setupData() to initialize. + * + * @param type the type of VertexBuffer, such as Position or Binormal */ public VertexBuffer(Type type) { super(); @@ -544,6 +546,8 @@ public boolean isNormalized() { * Sets the instanceSpan to 1 or 0 depending on * the value of instanced and the existing value of * instanceSpan. + * + * @param instanced true for instanced, false for not instanced */ public void setInstanced(boolean instanced) { if (instanced && instanceSpan == 0) { @@ -554,8 +558,7 @@ public void setInstanced(boolean instanced) { } /** - * Returns true if instanceSpan is more than 0 indicating - * that this vertex buffer contains per-instance data. + * @return true if buffer contains per-instance data, otherwise false */ public boolean isInstanced() { return instanceSpan > 0; @@ -567,6 +570,8 @@ public boolean isInstanced() { * per vertex. If set to 1 then each element goes with one * instance. If set to 2 then each element goes with two * instances and so on. + * + * @param i the desired number of instances per element */ public void setInstanceSpan(int i) { this.instanceSpan = i; @@ -618,6 +623,8 @@ public int getNumElements() { * is 0 then 'instances' is 1. Otherwise, instances is elements * * instanceSpan. It is possible to render a mesh with more instances * but the instance data begins to repeat. + * + * @return the number of instances */ public int getBaseInstanceCount() { if (instanceSpan == 0) { @@ -984,6 +991,11 @@ public void copyElements(int inIndex, VertexBuffer outVb, int outIndex, int len) * of the parameters. The buffer will be of the type specified by * {@link Format format} and would be able to contain the given number * of elements with the given number of components in each element. + * + * @param format the desired format of components, such as Float or Half + * @param components the number of components per element (≥1, ≤4) + * @param numElements the desired capacity (number of elements) + * @return a new Buffer */ public static Buffer createBuffer(Format format, int components, int numElements) { if (components < 1 || components > 4) { diff --git a/jme3-core/src/main/java/com/jme3/scene/control/AbstractControl.java b/jme3-core/src/main/java/com/jme3/scene/control/AbstractControl.java index ca0dd47370..c46be62f32 100644 --- a/jme3-core/src/main/java/com/jme3/scene/control/AbstractControl.java +++ b/jme3-core/src/main/java/com/jme3/scene/control/AbstractControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -77,11 +77,16 @@ public boolean isEnabled() { /** * To be implemented in subclass. + * + * @param tpf time per frame (in seconds) */ protected abstract void controlUpdate(float tpf); /** * To be implemented in subclass. + * + * @param rm the RenderManager rendering the controlled Spatial (not null) + * @param vp the ViewPort being rendered (not null) */ protected abstract void controlRender(RenderManager rm, ViewPort vp); diff --git a/jme3-core/src/main/java/com/jme3/scene/control/BillboardControl.java b/jme3-core/src/main/java/com/jme3/scene/control/BillboardControl.java index 96d7bdf759..10e9b0be03 100644 --- a/jme3-core/src/main/java/com/jme3/scene/control/BillboardControl.java +++ b/jme3-core/src/main/java/com/jme3/scene/control/BillboardControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -280,6 +280,8 @@ public Alignment getAlignment() { * Sets the type of rotation this Billboard will have. The alignment can * be Camera, Screen, AxialY, or AxialZ. Invalid alignments will * assume no billboard rotation. + * + * @param alignment the desired alignment (Camera/Screen/AxialY/AxialZ) */ public void setAlignment(Alignment alignment) { this.alignment = alignment; diff --git a/jme3-core/src/main/java/com/jme3/scene/control/CameraControl.java b/jme3-core/src/main/java/com/jme3/scene/control/CameraControl.java index 0b8606d23a..befb89c24c 100644 --- a/jme3-core/src/main/java/com/jme3/scene/control/CameraControl.java +++ b/jme3-core/src/main/java/com/jme3/scene/control/CameraControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,6 +82,7 @@ public CameraControl(Camera camera) { /** * @param camera The Camera to be synced. + * @param controlDir SpatialToCamera or CameraToSpatial */ public CameraControl(Camera camera, ControlDirection controlDir) { this.camera = camera; diff --git a/jme3-core/src/main/java/com/jme3/scene/control/Control.java b/jme3-core/src/main/java/com/jme3/scene/control/Control.java index d3d0e221f6..ad13881eb3 100644 --- a/jme3-core/src/main/java/com/jme3/scene/control/Control.java +++ b/jme3-core/src/main/java/com/jme3/scene/control/Control.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2018 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ public interface Control extends Savable { * Creates a clone of the Control, the given Spatial is the cloned version * of the spatial to which this control is attached to. * - * @param spatial + * @param spatial the Spatial to be controlled by the clone * @return A clone of this control for the spatial * @deprecated Use * {@link com.jme3.util.clone.JmeCloneable#cloneFields(com.jme3.util.clone.Cloner, java.lang.Object)} @@ -74,8 +74,8 @@ public interface Control extends Savable { * Should be called prior to queuing the spatial by the RenderManager. This * should not be called from user code. * - * @param rm - * @param vp + * @param rm the caller (not null) + * @param vp the relevant ViewPort (not null) */ public void render(RenderManager rm, ViewPort vp); } diff --git a/jme3-core/src/main/java/com/jme3/scene/control/LightControl.java b/jme3-core/src/main/java/com/jme3/scene/control/LightControl.java index 8cfe510c36..dd64fb4159 100644 --- a/jme3-core/src/main/java/com/jme3/scene/control/LightControl.java +++ b/jme3-core/src/main/java/com/jme3/scene/control/LightControl.java @@ -92,6 +92,7 @@ public LightControl(Light light) { /** * @param light The light to be synced. + * @param controlDir SpatialToCamera or CameraToSpatial */ public LightControl(Light light, ControlDirection controlDir) { this.light = light; diff --git a/jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java b/jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java index 71821228e8..27b30c7b78 100644 --- a/jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java +++ b/jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java @@ -59,6 +59,10 @@ public class UpdateControl extends AbstractControl { /** * Enqueues a task/callable object to execute in the jME3 * rendering thread. + * + * @param type of result returned by the Callable + * @param callable the Callable to run + * @return a new instance */ public Future enqueue(Callable callable) { AppTask task = new AppTask<>(callable); diff --git a/jme3-core/src/main/java/com/jme3/scene/debug/Grid.java b/jme3-core/src/main/java/com/jme3/scene/debug/Grid.java index f9e5e119eb..5ad8197a80 100644 --- a/jme3-core/src/main/java/com/jme3/scene/debug/Grid.java +++ b/jme3-core/src/main/java/com/jme3/scene/debug/Grid.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,9 +50,10 @@ public Grid() { /** * Creates a grid debug shape. - * @param xLines - * @param yLines - * @param lineDist + * + * @param xLines number of lines parallel to the X axis + * @param yLines number of lines parallel to the Y axis + * @param lineDist the separation between consecutive lines (in world units) */ public Grid(int xLines, int yLines, float lineDist){ xLines -= 2; diff --git a/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureDebugger.java b/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureDebugger.java index 4f637b560e..d7973eabc1 100644 --- a/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureDebugger.java +++ b/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureDebugger.java @@ -1,7 +1,7 @@ package com.jme3.scene.debug.custom; /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -80,6 +80,7 @@ public ArmatureDebugger() { * * @param name the name of the debugger's node * @param armature the armature that will be shown + * @param deformingJoints a list of joints */ public ArmatureDebugger(String name, Armature armature, List deformingJoints) { super(name); diff --git a/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureInterJointsWire.java b/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureInterJointsWire.java index 70aa80c36d..085f35783c 100644 --- a/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureInterJointsWire.java +++ b/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureInterJointsWire.java @@ -97,6 +97,9 @@ protected void updateGeometry(Vector3f start, Vector3f[] ends) { /** * Update the start and end points of the line. + * + * @param start location vector (not null, unaffected) + * @param ends array of location vectors (not null, unaffected) */ public void updatePoints(Vector3f start, Vector3f[] ends) { VertexBuffer posBuf = getBuffer(Type.Position); diff --git a/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureNode.java b/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureNode.java index 6f58b0c682..75acec75f8 100644 --- a/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureNode.java +++ b/jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureNode.java @@ -76,6 +76,10 @@ public class ArmatureNode extends Node { * wires will show each full bone (from head to tail). * * @param armature the armature that will be shown + * @param joints the Node to visualize joints + * @param wires the Node to visualize wires + * @param outlines the Node to visualize outlines + * @param deformingJoints a list of joints */ public ArmatureNode(Armature armature, Node joints, Node wires, Node outlines, List deformingJoints) { this.armature = armature; diff --git a/jme3-core/src/main/java/com/jme3/scene/shape/AbstractBox.java b/jme3-core/src/main/java/com/jme3/scene/shape/AbstractBox.java index 1571823a7f..d474c596e7 100644 --- a/jme3-core/src/main/java/com/jme3/scene/shape/AbstractBox.java +++ b/jme3-core/src/main/java/com/jme3/scene/shape/AbstractBox.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2018 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -110,6 +110,8 @@ protected final Vector3f[] computeVertices() { /** * Get the center point of this box. + * + * @return the pre-existing location vector (in mesh coordinates) */ public final Vector3f getCenter() { return center; @@ -117,6 +119,8 @@ public final Vector3f getCenter() { /** * Get the x-axis size (extent) of this box. + * + * @return the radius parallel to the X axis (in mesh units) */ public final float getXExtent() { return xExtent; @@ -124,6 +128,8 @@ public final float getXExtent() { /** * Get the y-axis size (extent) of this box. + * + * @return the radius parallel to the Y axis (in mesh units) */ public final float getYExtent() { return yExtent; @@ -131,6 +137,8 @@ public final float getYExtent() { /** * Get the z-axis size (extent) of this box. + * + * @return the radius parallel to the Z axis (in mesh units) */ public final float getZExtent() { return zExtent; diff --git a/jme3-core/src/main/java/com/jme3/scene/shape/Dome.java b/jme3-core/src/main/java/com/jme3/scene/shape/Dome.java index 6c44409a81..307c4b7a80 100644 --- a/jme3-core/src/main/java/com/jme3/scene/shape/Dome.java +++ b/jme3-core/src/main/java/com/jme3/scene/shape/Dome.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -142,6 +142,8 @@ public Vector3f getCenter() { /** * Get the number of planar segments along the z-axis of the dome. + * + * @return the count */ public int getPlanes() { return planes; @@ -149,6 +151,8 @@ public int getPlanes() { /** * Get the number of samples radially around the main axis of the dome. + * + * @return the count */ public int getRadialSamples() { return radialSamples; @@ -156,6 +160,8 @@ public int getRadialSamples() { /** * Get the radius of the dome. + * + * @return the radius (in mesh units) */ public float getRadius() { return radius; @@ -163,6 +169,8 @@ public float getRadius() { /** * Are the triangles connected in such a way as to present a view out from the dome or not. + * + * @return true if visible from inside, false if visible from outside */ public boolean isInsideView() { return insideView; diff --git a/jme3-core/src/main/java/com/jme3/scene/shape/Surface.java b/jme3-core/src/main/java/com/jme3/scene/shape/Surface.java index a09b96a359..7756a4b5b5 100644 --- a/jme3-core/src/main/java/com/jme3/scene/shape/Surface.java +++ b/jme3-core/src/main/java/com/jme3/scene/shape/Surface.java @@ -115,6 +115,7 @@ public static final Surface createNurbsSurface(List> controlPoint * @param vSegments the amount of V segments * @param basisUFunctionDegree the degree of basis U function * @param basisVFunctionDegree the degree of basis V function + * @param smooth true for a smooth mesh * @return an instance of NURBS surface */ public static final Surface createNurbsSurface(List> controlPoints, List[] nurbKnots, int uSegments, int vSegments, int basisUFunctionDegree, int basisVFunctionDegree, boolean smooth) { diff --git a/jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java b/jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java index 1300bf3616..f5fe6c8ae4 100644 --- a/jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java +++ b/jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2018 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -422,6 +422,7 @@ protected void endCondition(String condition, StringBuilder source) { * * @param mapping the VariableMapping to append * @param source the StringBuilder to use + * @param declare true to declare the variable, false if already declared */ protected void map(VariableMapping mapping, StringBuilder source, boolean declare) { @@ -605,7 +606,7 @@ protected String getLanguageAndVersion(ShaderType type) { /** * appends indentation. - * @param source + * @param source the builder to append to */ protected void appendIndent(StringBuilder source) { source.append(INDENTCHAR.substring(0, indent)); diff --git a/jme3-core/src/main/java/com/jme3/shader/Shader.java b/jme3-core/src/main/java/com/jme3/shader/Shader.java index 214f0cc185..0010f17640 100644 --- a/jme3-core/src/main/java/com/jme3/shader/Shader.java +++ b/jme3-core/src/main/java/com/jme3/shader/Shader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -237,6 +237,8 @@ public Shader(){ /** * Do not use this constructor. Used for destructible clones only. + * + * @param s (not null) */ protected Shader(Shader s){ super(s.id); @@ -258,6 +260,7 @@ protected Shader(Shader s){ * Adds source code to a certain pipeline. * * @param type The pipeline to control + * @param name a name for the new shader object * @param source The shader source code (in GLSL). * @param defines Preprocessor defines (placed at the beginning of the shader) * @param language The shader source language, currently accepted is GLSL### diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java b/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java index 9d779be7d0..83238ad08a 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java @@ -77,7 +77,7 @@ public abstract class ShaderGenerator { /** * Build a shaderGenerator * - * @param assetManager + * @param assetManager for loading assets (alias created) */ protected ShaderGenerator(AssetManager assetManager) { this.assetManager = assetManager; @@ -90,6 +90,7 @@ public void initialize(TechniqueDef techniqueDef){ /** * Generate vertex and fragment shaders for the given technique * + * @param definesSourceCode (may be null) * @return a Shader program */ public Shader generateShader(String definesSourceCode) { @@ -348,7 +349,7 @@ protected void appendNodeDeclarationAndMain(String loadedSource, StringBuilder s * @param type the shaderType * @return the index of the shader path in ShaderNodeDefinition shadersPath * list - * @throws NumberFormatException + * @throws NumberFormatException for an invalid version */ protected int findShaderIndexFromVersion(ShaderNode shaderNode, ShaderType type) throws NumberFormatException { int index = 0; diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderNode.java b/jme3-core/src/main/java/com/jme3/shader/ShaderNode.java index 606ffd66f8..f5c87486a2 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderNode.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -175,7 +175,7 @@ public void setOutputMapping(List outputMapping) { * jme serialization * * @param ex the exporter - * @throws IOException + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { @@ -191,7 +191,7 @@ public void write(JmeExporter ex) throws IOException { * jme serialization * * @param im the importer - * @throws IOException + * @throws IOException from the importer */ @Override @SuppressWarnings("unchecked") diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java b/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java index 6ef199f43a..7dac5ec0ae 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderNodeDefinition.java @@ -178,7 +178,7 @@ public String getPath() { /** * sets the path of this definition - * @param path + * @param path the desired path */ public void setPath(String path) { this.path = path; @@ -190,7 +190,7 @@ public void setPath(String path) { * jme serialization (not used) * * @param ex the exporter - * @throws IOException + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { @@ -226,7 +226,7 @@ public void setNoOutput(boolean noOutput) { * jme serialization (not used) * * @param im the importer - * @throws IOException + * @throws IOException from the importer */ @Override @SuppressWarnings("unchecked") diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderNodeVariable.java b/jme3-core/src/main/java/com/jme3/shader/ShaderNodeVariable.java index 5038efb706..b38040ac74 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderNodeVariable.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderNodeVariable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -166,7 +166,7 @@ public String getPrefix() { /** * Sets the variable prefix (m_ or g_) * - * @param prefix + * @param prefix the desired prefix */ public void setPrefix(String prefix) { this.prefix = prefix; @@ -176,7 +176,7 @@ public void setPrefix(String prefix) { * sets the nameSpace (can be the name of the shaderNode or * Global,Attr,MatParam,WorldParam) * - * @param nameSpace + * @param nameSpace the desired nameSpace */ public void setNameSpace(String nameSpace) { this.nameSpace = nameSpace; @@ -246,7 +246,7 @@ public boolean equals(Object obj) { * jme serialization (not used) * * @param ex the exporter - * @throws IOException + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { @@ -265,7 +265,7 @@ public void write(JmeExporter ex) throws IOException { * jme serialization (not used) * * @param im the importer - * @throws IOException + * @throws IOException from the importer */ @Override public void read(JmeImporter im) throws IOException { @@ -330,7 +330,8 @@ public String getMultiplicity() { /** * sets the number of elements of this variable making it an array * this value can be a number of can be a define - * @param multiplicity + * + * @param multiplicity the desired expression */ public void setMultiplicity(String multiplicity) { this.multiplicity = multiplicity; diff --git a/jme3-core/src/main/java/com/jme3/shader/UniformBindingManager.java b/jme3-core/src/main/java/com/jme3/shader/UniformBindingManager.java index 7339aab278..1a6ab75ca6 100644 --- a/jme3-core/src/main/java/com/jme3/shader/UniformBindingManager.java +++ b/jme3-core/src/main/java/com/jme3/shader/UniformBindingManager.java @@ -85,6 +85,8 @@ public class UniformBindingManager { * Internal use only. * Updates the given list of uniforms with {@link UniformBinding uniform bindings} * based on the current world state. + * + * @param shader (not null) */ public void updateUniformBindings(Shader shader) { ArrayList params = shader.getBoundUniforms(); diff --git a/jme3-core/src/main/java/com/jme3/shader/VariableMapping.java b/jme3-core/src/main/java/com/jme3/shader/VariableMapping.java index a9a1e2366b..cdfe516be7 100644 --- a/jme3-core/src/main/java/com/jme3/shader/VariableMapping.java +++ b/jme3-core/src/main/java/com/jme3/shader/VariableMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -186,7 +186,7 @@ public void setRightSwizzling(String rightSwizzling) { * jme serialization (not used) * * @param ex the exporter - * @throws IOException + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { @@ -203,7 +203,7 @@ public void write(JmeExporter ex) throws IOException { * jme serialization (not used) * * @param im the importer - * @throws IOException + * @throws IOException from the importer */ @Override public void read(JmeImporter im) throws IOException { diff --git a/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowFilter.java b/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowFilter.java index ab98e7dd56..e48698783e 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowFilter.java +++ b/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -210,7 +210,7 @@ public int getEdgesThickness() { * Sets the shadow edges thickness. default is 1, setting it to lower values * can help to reduce the jagged effect of the shadow edges * - * @param edgesThickness + * @param edgesThickness the desired thickness (in tenths of a pixel, default=10) */ public void setEdgesThickness(int edgesThickness) { shadowRenderer.setEdgesThickness(edgesThickness); @@ -218,6 +218,8 @@ public void setEdgesThickness(int edgesThickness) { /** * isFlushQueues does nothing and is kept only for backward compatibility + * + * @return false */ @Deprecated public boolean isFlushQueues() { @@ -226,6 +228,8 @@ public boolean isFlushQueues() { /** * setFlushQueues does nothing now and is kept only for backward compatibility + * + * @param flushQueues ignored */ @Deprecated public void setFlushQueues(boolean flushQueues) {} @@ -233,7 +237,7 @@ public void setFlushQueues(boolean flushQueues) {} /** * sets the shadow compare mode see {@link CompareMode} for more info * - * @param compareMode + * @param compareMode the desired mode */ final public void setShadowCompareMode(CompareMode compareMode) { shadowRenderer.setShadowCompareMode(compareMode); @@ -253,7 +257,7 @@ public CompareMode getShadowCompareMode() { * Sets the filtering mode for shadow edges see {@link EdgeFilteringMode} * for more info * - * @param filterMode + * @param filterMode the desired mode */ final public void setEdgeFilteringMode(EdgeFilteringMode filterMode) { shadowRenderer.setEdgeFilteringMode(filterMode); diff --git a/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java b/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java index d55b556b01..0cf44326c1 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java @@ -201,7 +201,7 @@ protected void initForcedRenderState() { /** * set the post shadow material for this renderer * - * @param postShadowMat + * @param postShadowMat the desired Material (alias created) */ protected final void setPostShadowMaterial(Material postShadowMat) { this.postshadowMat = postShadowMat; @@ -293,6 +293,10 @@ public CompareMode getShadowCompareMode() { /** * debug function to create a visible frustum + * + * @param pts optional storage for vertex positions (may be null) + * @param i the index of the desired wire color (default=White) + * @return a new Geometry */ protected Geometry createFrustum(Vector3f[] pts, int i) { WireFrustum frustum = new WireFrustum(pts); @@ -386,7 +390,7 @@ public boolean isInitialized() { * responsible for displaying the frustum of the shadow cam for debug * purpose * - * @param shadowMapIndex + * @param shadowMapIndex the index of the shadow map */ protected void doDisplayFrustumDebug(int shadowMapIndex) { } @@ -450,6 +454,8 @@ public void displayFrustum() { /** * For debugging purposes, display depth shadow maps. + * + * @param r ignored */ protected void displayShadowMap(Renderer r) { Camera cam = viewPort.getCamera(); @@ -684,6 +690,7 @@ public float getShadowZFadeLength() { } /** + * @param viewCam a Camera to define the view frustum * @return true if the light source bounding box is in the view frustum */ protected abstract boolean checkCulling(Camera viewCam); @@ -754,7 +761,7 @@ public int getShadowMapSize() { * Sets the shadow edges thickness. default is 10, setting it to lower values * can help to reduce the jagged effect of the shadow edges * - * @param edgesThickness + * @param edgesThickness the desired thickness (in tenths of a pixel, default=10) */ public void setEdgesThickness(int edgesThickness) { this.edgesThickness = Math.max(1, Math.min(edgesThickness, 10)); @@ -764,12 +771,16 @@ public void setEdgesThickness(int edgesThickness) { /** * isFlushQueues does nothing now and is kept only for backward compatibility + * + * @return false */ @Deprecated public boolean isFlushQueues() { return false; } /** * setFlushQueues does nothing now and is kept only for backward compatibility + * + * @param flushQueues ignored */ @Deprecated public void setFlushQueues(boolean flushQueues) {} @@ -840,6 +851,7 @@ public void setProfiler(AppProfiler profiler) { * De-serialize this instance, for example when loading from a J3O file. * * @param im importer (not null) + * @throws IOException from the importer */ @Override public void read(JmeImporter im) throws IOException { @@ -860,6 +872,7 @@ public void read(JmeImporter im) throws IOException { * Serialize this instance, for example when saving to a J3O file. * * @param ex exporter (not null) + * @throws IOException from the exporter */ @Override public void write(JmeExporter ex) throws IOException { diff --git a/jme3-core/src/main/java/com/jme3/shadow/BasicShadowRenderer.java b/jme3-core/src/main/java/com/jme3/shadow/BasicShadowRenderer.java index 57095da33e..dc45963e3e 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/BasicShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/BasicShadowRenderer.java @@ -127,7 +127,8 @@ public Vector3f getDirection() { /** * sets the light direction to use to compute shadows - * @param direction + * + * @param direction a direction vector (not null, unaffected) */ public void setDirection(Vector3f direction) { this.direction.set(direction).normalizeLocal(); diff --git a/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowFilter.java b/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowFilter.java index 77fea9db4f..11cd566fe8 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowFilter.java +++ b/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -136,7 +136,8 @@ public boolean isEnabledStabilization() { * Enables the stabilization of the shadow's edges. (default is true) * This prevents shadow edges from flickering when the camera moves. * However it can lead to some shadow quality loss in some particular scenes. - * @param stabilize + * + * @param stabilize true to stabilize, false to disable stabilization */ public void setEnabledStabilization(boolean stabilize) { shadowRenderer.setEnabledStabilization(stabilize); diff --git a/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java b/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java index 63f2de800d..a1b2e1e1c5 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java @@ -265,7 +265,8 @@ public boolean isEnabledStabilization() { * Enables the stabilization of the shadow's edges. (default is true) * This prevents shadow edges from flickering when the camera moves. * However it can lead to some shadow quality loss in some particular scenes. - * @param stabilize + * + * @param stabilize true to stabilize, false to disable stabilization */ public void setEnabledStabilization(boolean stabilize) { this.stabilize = stabilize; @@ -303,7 +304,8 @@ public void write(JmeExporter ex) throws IOException { /** * Directional light are always in the view frustum - * @param viewCam + * + * @param viewCam a Camera to define the view frustum * @return true */ @Override diff --git a/jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java b/jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java index 5b66c4bf2a..43de1c7f7d 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -226,7 +226,7 @@ public void write(JmeExporter ex) throws IOException { /** * - * @param viewCam + * @param viewCam a Camera to define the view frustum * @return true if intersects */ @Override diff --git a/jme3-core/src/main/java/com/jme3/shadow/PssmShadowFilter.java b/jme3-core/src/main/java/com/jme3/shadow/PssmShadowFilter.java index 74937eaeef..7e1487025b 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/PssmShadowFilter.java +++ b/jme3-core/src/main/java/com/jme3/shadow/PssmShadowFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -143,7 +143,8 @@ public Vector3f getDirection() { /** * Sets the light direction to use to compute shadows - * @param direction + * + * @param direction a direction vector (not null, unaffected) */ public void setDirection(Vector3f direction) { pssmRenderer.setDirection(direction); @@ -219,7 +220,7 @@ public int getEdgesThickness() { /** * Sets the shadow edges thickness. default is 1, setting it to lower values can help to reduce the jagged effect of the shadow edges - * @param edgesThickness + * @param edgesThickness the desired thickness (in tenths of a pixel, default=10) */ public void setEdgesThickness(int edgesThickness) { pssmRenderer.setEdgesThickness(edgesThickness); @@ -236,7 +237,8 @@ public boolean isFlushQueues() { /** * 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 DOES flush the queues, but not the others - * @param flushQueues + * + * @param flushQueues true to flush the queues, false to avoid flushing them */ public void setFlushQueues(boolean flushQueues) { pssmRenderer.setFlushQueues(flushQueues); @@ -244,7 +246,8 @@ public void setFlushQueues(boolean flushQueues) { /** * sets the shadow compare mode see {@link CompareMode} for more info - * @param compareMode + * + * @param compareMode the desired mode (not null) */ final public void setCompareMode(CompareMode compareMode) { pssmRenderer.setCompareMode(compareMode); @@ -252,7 +255,8 @@ final public void setCompareMode(CompareMode compareMode) { /** * Sets the filtering mode for shadow edges see {@link FilterMode} for more info - * @param filterMode + * + * @param filterMode the desired mode (not null) */ final public void setFilterMode(FilterMode filterMode) { pssmRenderer.setFilterMode(filterMode); diff --git a/jme3-core/src/main/java/com/jme3/shadow/PssmShadowRenderer.java b/jme3-core/src/main/java/com/jme3/shadow/PssmShadowRenderer.java index 05cca215c8..8c88f4c101 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/PssmShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/PssmShadowRenderer.java @@ -376,7 +376,7 @@ public Vector3f getDirection() { /** * Sets the light direction to use to compute shadows * - * @param direction + * @param direction a direction vector (not null, unaffected) */ public void setDirection(Vector3f direction) { this.direction.set(direction).normalizeLocal(); @@ -680,7 +680,7 @@ public int getEdgesThickness() { * Sets the shadow edges thickness. default is 1, setting it to lower values * can help to reduce the jagged effect of the shadow edges * - * @param edgesThickness + * @param edgesThickness the desired thickness (in tenths of a pixel, default=10) */ public void setEdgesThickness(int edgesThickness) { this.edgesThickness = Math.max(1, Math.min(edgesThickness, 10)); @@ -703,7 +703,7 @@ public boolean isFlushQueues() { * multiple shadows cast by multiple light sources. Make sure the last * PssmRenderer in the stack DOES flush the queues, but not the others * - * @param flushQueues + * @param flushQueues true to flush the queues, false to avoid flushing them */ public void setFlushQueues(boolean flushQueues) { this.flushQueues = flushQueues; diff --git a/jme3-core/src/main/java/com/jme3/shadow/PssmShadowUtil.java b/jme3-core/src/main/java/com/jme3/shadow/PssmShadowUtil.java index d0d6e836cb..bb2fe71904 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/PssmShadowUtil.java +++ b/jme3-core/src/main/java/com/jme3/shadow/PssmShadowUtil.java @@ -59,6 +59,12 @@ private PssmShadowUtil() { /** * Updates the frustum splits stores in splits using PSSM. + * + * @param splits the array of splits (modified) + * @param near the distance to the camera's near plane + * @param far the distance to the camera's far plane + * @param lambda the mixing parameter (0→purely linear, + * 1→purely logarithmic) */ public static void updateFrustumSplits(float[] splits, float near, float far, float lambda) { for (int i = 0; i < splits.length; i++) { @@ -76,6 +82,11 @@ public static void updateFrustumSplits(float[] splits, float near, float far, fl /** * Compute the Zfar in the model view to adjust the Zfar distance for the splits calculation + * + * @param occ a list of occluders + * @param recv a list of receivers + * @param cam the Camera (not null, unaffected) + * @return the Z-far distance */ public static float computeZFar(GeometryList occ, GeometryList recv, Camera cam) { Matrix4f mat = cam.getViewMatrix(); diff --git a/jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java b/jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java index 82c001b15a..12b973dfc4 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java +++ b/jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java @@ -70,8 +70,9 @@ private ShadowUtil() { /** * Updates a points arrays with the frustum corners of the provided camera. * - * @param viewCam - * @param points + * @param viewCam the viewing Camera (not null, unaffected) + * @param points storage for the corner coordinates (not null, length≥8, + * modified) */ public static void updateFrustumPoints2(Camera viewCam, Vector3f[] points) { int w = viewCam.getWidth(); @@ -95,9 +96,12 @@ public static void updateFrustumPoints2(Camera viewCam, Vector3f[] points) { * * TODO: Reduce creation of new vectors * - * @param viewCam - * @param nearOverride - * @param farOverride + * @param viewCam the viewing Camera (not null, unaffected) + * @param nearOverride distance to the near plane (in world units) + * @param farOverride distance to the far plane (in world units) + * @param scale scale factor + * @param points storage for the corner coordinates (not null, length≥8, + * modified) */ public static void updateFrustumPoints(Camera viewCam, float nearOverride, @@ -175,8 +179,9 @@ public static void updateFrustumPoints(Camera viewCam, /** * Compute bounds of a geomList - * @param list - * @param transform + * + * @param list a list of geometries (not null) + * @param transform a coordinate transform * @return a new instance */ public static BoundingBox computeUnionBound(GeometryList list, Transform transform) { @@ -196,8 +201,9 @@ public static BoundingBox computeUnionBound(GeometryList list, Transform transfo /** * Compute bounds of a geomList - * @param list - * @param mat + * + * @param list a list of geometries (not null) + * @param mat a coordinate-transform matrix * @return a new instance */ public static BoundingBox computeUnionBound(GeometryList list, Matrix4f mat) { @@ -218,7 +224,7 @@ public static BoundingBox computeUnionBound(GeometryList list, Matrix4f mat) { /** * Computes the bounds of multiple bounding volumes * - * @param bv + * @param bv a list of bounding volumes (not null) * @return a new instance */ public static BoundingBox computeUnionBound(List bv) { @@ -233,8 +239,8 @@ public static BoundingBox computeUnionBound(List bv) { /** * Compute bounds from an array of points * - * @param pts - * @param transform + * @param pts an array of location vectors (not null, unaffected) + * @param transform a coordinate transform * @return a new instance */ public static BoundingBox computeBoundForPoints(Vector3f[] pts, Transform transform) { @@ -254,8 +260,9 @@ public static BoundingBox computeBoundForPoints(Vector3f[] pts, Transform transf /** * Compute bounds from an array of points - * @param pts - * @param mat + * + * @param pts an array of location vectors (not null, unaffected) + * @param mat a coordinate-transform matrix (not null, unaffected) * @return a new BoundingBox */ public static BoundingBox computeBoundForPoints(Vector3f[] pts, Matrix4f mat) { @@ -286,8 +293,8 @@ public static BoundingBox computeBoundForPoints(Vector3f[] pts, Matrix4f mat) { * Updates the shadow camera to properly contain the given points (which * contain the eye camera frustum corners) * - * @param shadowCam - * @param points + * @param shadowCam the shadow camera (not null, modified) + * @param points an array of location vectors (not null, unaffected) */ public static void updateShadowCamera(Camera shadowCam, Vector3f[] points) { boolean ortho = shadowCam.isParallelProjection(); @@ -369,6 +376,9 @@ public OccludersExtractor(Matrix4f vpm, int cc, BoundingBox sBB, BoundingBox cBB * Check the rootScene against camera frustum and if intersects process it recursively. * The global OccludersExtractor variables need to be initialized first. * Variables are updated and used in {@link ShadowUtil#updateShadowCamera} at last. + * + * @param scene the root of the scene to check (may be null) + * @return the number of shadow casters found */ public int addOccluders(Spatial scene) { if ( scene != null ) process(scene); @@ -458,6 +468,13 @@ else if ( scene instanceof Node && ((Node)scene).getWorldBound()!=null ) * Updates the shadow camera to properly contain the given points (which * contain the eye camera frustum corners) and the shadow occluder objects * collected through the traverse of the scene hierarchy + * + * @param viewPort the ViewPort + * @param receivers a list of receiving geometries + * @param shadowCam the shadow camera (not null, modified) + * @param points an array of location vectors (not null, unaffected) + * @param splitOccluders a list of occluding geometries + * @param shadowMapSize the size of each edge of the shadow map (in pixels) */ public static void updateShadowCamera(ViewPort viewPort, GeometryList receivers, @@ -628,6 +645,7 @@ public static void getGeometriesInCamFrustum(GeometryList inputGeometryList, * * @param rootScene the rootNode of the scene to traverse * @param camera the camera to check geometries against + * @param mode the ShadowMode to test for * @param outputGeometryList the list of all geometries that are in the * camera frustum */ @@ -667,7 +685,8 @@ static private boolean checkShadowMode(RenderQueue.ShadowMode shadowMode, Render * with geometry children of scene node * * @param camera - * @param scene + * @param scene the root of the scene to traverse (may be null) + * @param mode the ShadowMode to test for * @param outputGeometryList */ private static void addGeometriesInCamFrustumFromNode(Camera camera, Node scene, RenderQueue.ShadowMode mode, GeometryList outputGeometryList) { @@ -724,9 +743,10 @@ public static void getGeometriesInLightRadius(GeometryList inputGeometryList, * of OccludersExtractor.rootScene node that are both in the frustum of the given vpCamera and some camera inside cameras array. * The array of cameras must be initialized to represent the light viewspace of some light like pointLight or spotLight * - * @param rootScene + * @param rootScene the root of the scene to traverse (may be null) * @param vpCamera the viewPort camera * @param cameras the camera array to check geometries against, representing the light viewspace + * @param mode the ShadowMode to test for * @param outputGeometryList the output list of all geometries that are in the camera frustum */ public static void getLitGeometriesInViewPort(Spatial rootScene, Camera vpCamera, Camera[] cameras, RenderQueue.ShadowMode mode, GeometryList outputGeometryList) { diff --git a/jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowRenderer.java b/jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowRenderer.java index 47fabe2f45..cf0d64d938 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowRenderer.java @@ -223,7 +223,7 @@ public void write(JmeExporter ex) throws IOException { /** * - * @param viewCam + * @param viewCam the viewing Camera to check against * @return true if intersects, otherwise false */ @Override diff --git a/jme3-core/src/main/java/com/jme3/system/AppSettings.java b/jme3-core/src/main/java/com/jme3/system/AppSettings.java index 3f9434cbb1..cb5e4ffb7b 100644 --- a/jme3-core/src/main/java/com/jme3/system/AppSettings.java +++ b/jme3-core/src/main/java/com/jme3/system/AppSettings.java @@ -94,7 +94,7 @@ public final class AppSettings extends HashMap { * initialization will throw an exception. Note that currently jMonkeyEngine * does not have any shaders that support OpenGL3.0 therefore this * option is not useful. - *

            + *

            * * @see AppSettings#setRenderer(java.lang.String) */ @@ -107,7 +107,7 @@ public final class AppSettings extends HashMap { * initialization will throw an exception. Note that currently jMonkeyEngine * does not have any shaders that support OpenGL3.0 therefore this * option is not useful. - *

            + *

            * * @see AppSettings#setRenderer(java.lang.String) */ @@ -494,6 +494,9 @@ public void save(String preferencesKey) throws BackingStoreException { * Get an integer from the settings. *

            * If the key is not set, then 0 is returned. + * + * @param key the key of an integer setting + * @return the corresponding value, or 0 if not set */ public int getInteger(String key) { Integer i = (Integer) get(key); @@ -508,6 +511,9 @@ public int getInteger(String key) { * Get a boolean from the settings. *

            * If the key is not set, then false is returned. + * + * @param key the key of a boolean setting + * @return the corresponding value, or false if not set */ public boolean getBoolean(String key) { Boolean b = (Boolean) get(key); @@ -522,6 +528,9 @@ public boolean getBoolean(String key) { * Get a string from the settings. *

            * If the key is not set, then null is returned. + * + * @param key the key of a string setting + * @return the corresponding value, or null if not set */ public String getString(String key) { String s = (String) get(key); @@ -536,6 +545,9 @@ public String getString(String key) { * Get a float from the settings. *

            * If the key is not set, then 0.0 is returned. + * + * @param key the key of a float setting + * @return the corresponding value, or 0 if not set */ public float getFloat(String key) { Float f = (Float) get(key); @@ -548,6 +560,9 @@ public float getFloat(String key) { /** * Set an integer on the settings. + * + * @param key the desired key + * @param value the desired integer value */ public void putInteger(String key, int value) { put(key, Integer.valueOf(value)); @@ -555,6 +570,9 @@ public void putInteger(String key, int value) { /** * Set a boolean on the settings. + * + * @param key the desired key + * @param value the desired boolean value */ public void putBoolean(String key, boolean value) { put(key, Boolean.valueOf(value)); @@ -562,6 +580,9 @@ public void putBoolean(String key, boolean value) { /** * Set a string on the settings. + * + * @param key the desired key + * @param value the desired string value */ public void putString(String key, String value) { put(key, value); @@ -569,6 +590,9 @@ public void putString(String key, String value) { /** * Set a float on the settings. + * + * @param key the desired key + * @param value the desired float value */ public void putFloat(String key, float value) { put(key, Float.valueOf(value)); @@ -877,7 +901,8 @@ public void setVSync(boolean value) { * See http://en.wikipedia.org/wiki/Quad_buffering
            * Once enabled, filters or scene processors that handle 3D stereo rendering * could use this feature to render using hardware 3D stereo.

            - * (Default: false) + * + * @param value true to enable 3-D stereo, false to disable (default=false) */ public void setStereo3D(boolean value){ putBoolean("Stereo3D", value); @@ -930,6 +955,8 @@ public void setGammaCorrection(boolean gammaCorrection) { /** * Get the framerate. + * + * @return the maximum rate (in frames per second), or -1 for unlimited * @see #setFrameRate(int) */ public int getFrameRate() { @@ -938,6 +965,8 @@ public int getFrameRate() { /** * Get the use input state. + * + * @return true if input is enabled, false if it's disabled * @see #setUseInput(boolean) */ public boolean useInput() { @@ -946,6 +975,9 @@ public boolean useInput() { /** * Get the renderer + * + * @return the graphics renderer's name and version, + * for example "LWJGL-OpenGL33" * @see #setRenderer(java.lang.String) */ public String getRenderer() { @@ -954,6 +986,8 @@ public String getRenderer() { /** * Get the width + * + * @return the width of the rendering display (in pixels) * @see #setWidth(int) */ public int getWidth() { @@ -962,6 +996,8 @@ public int getWidth() { /** * Get the height + * + * @return the height of the rendering display (in pixels) * @see #setHeight(int) */ public int getHeight() { @@ -970,6 +1006,8 @@ public int getHeight() { /** * Get the width + * + * @return the minimum width for the rendering display (in pixels) * @see #setWidth(int) */ public int getMinWidth() { @@ -978,6 +1016,8 @@ public int getMinWidth() { /** * Get the height + * + * @return the minimum height for the rendering display (in pixels) * @see #setHeight(int) */ public int getMinHeight() { @@ -986,6 +1026,8 @@ public int getMinHeight() { /** * Get the bits per pixel + * + * @return the number of color bits per rendered pixel * @see #setBitsPerPixel(int) */ public int getBitsPerPixel() { @@ -994,6 +1036,8 @@ public int getBitsPerPixel() { /** * Get the frequency + * + * @return the refresh rate of the (full-screen) display (in Hertz) * @see #setFrequency(int) */ public int getFrequency() { @@ -1002,6 +1046,8 @@ public int getFrequency() { /** * Get the number of depth bits + * + * @return the number of depth bits per rendered pixel * @see #setDepthBits(int) */ public int getDepthBits() { @@ -1011,6 +1057,8 @@ public int getDepthBits() { /** * Android Only * Get the number of alpha bits for the surface view to use. + * + * @return the number of alpha bits per rendered pixel * @see #setAlphaBits(int) */ public int getAlphaBits() { @@ -1019,6 +1067,8 @@ public int getAlphaBits() { /** * Get the number of stencil bits + * + * @return the number of stencil bits per rendered pixel * @see #setStencilBits(int) */ public int getStencilBits() { @@ -1027,6 +1077,8 @@ public int getStencilBits() { /** * Get the number of samples + * + * @return the number of samples per pixel (for multisample anti-aliasing) * @see #setSamples(int) */ public int getSamples() { @@ -1035,6 +1087,8 @@ public int getSamples() { /** * Get the application title + * + * @return the title text * @see #setTitle(java.lang.String) */ public String getTitle() { @@ -1053,6 +1107,8 @@ public boolean isVSync() { /** * Get the fullscreen state + * + * @return true for fullscreen display, false for windowed display * @see #setFullscreen(boolean) */ public boolean isFullscreen() { @@ -1061,6 +1117,8 @@ public boolean isFullscreen() { /** * Get the use joysticks state + * + * @return true to enable joystick input, false to disable it * @see #setUseJoysticks(boolean) */ public boolean useJoysticks() { @@ -1069,6 +1127,8 @@ public boolean useJoysticks() { /** * Get the audio renderer + * + * @return the audio renderer's name, for example "LWJGL" * @see #setAudioRenderer(java.lang.String) */ public String getAudioRenderer() { @@ -1077,6 +1137,8 @@ public String getAudioRenderer() { /** * Get the stereo 3D state + * + * @return true if 3-D stereo is enabled, otherwise false * @see #setStereo3D(boolean) */ public boolean useStereo3D(){ @@ -1085,6 +1147,8 @@ public boolean useStereo3D(){ /** * Get the icon array + * + * @return the pre-existing array * @see #setIcons(java.lang.Object[]) */ public Object[] getIcons() { @@ -1093,6 +1157,8 @@ public Object[] getIcons() { /** * Get the settings dialog image + * + * @return a path to the image asset * @see #setSettingsDialogImage(java.lang.String) */ public String getSettingsDialogImage() { diff --git a/jme3-core/src/main/java/com/jme3/system/JmeContext.java b/jme3-core/src/main/java/com/jme3/system/JmeContext.java index b31042128d..f54831919a 100644 --- a/jme3-core/src/main/java/com/jme3/system/JmeContext.java +++ b/jme3-core/src/main/java/com/jme3/system/JmeContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -95,6 +95,8 @@ public enum Type { /** * Sets the listener that will receive events relating to context * creation, update, and destroy. + * + * @param listener the desired listener */ public void setSystemListener(SystemListener listener); diff --git a/jme3-core/src/main/java/com/jme3/system/SystemListener.java b/jme3-core/src/main/java/com/jme3/system/SystemListener.java index 132f475234..415e9e7ad7 100644 --- a/jme3-core/src/main/java/com/jme3/system/SystemListener.java +++ b/jme3-core/src/main/java/com/jme3/system/SystemListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2019 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,8 +46,8 @@ public interface SystemListener { /** * Called to notify the application that the resolution has changed. - * @param width - * @param height + * @param width the new width of the display (in pixels, ≥0) + * @param height the new height of the display (in pixels, ≥0) */ public void reshape(int width, int height); diff --git a/jme3-core/src/main/java/com/jme3/texture/FrameBuffer.java b/jme3-core/src/main/java/com/jme3/texture/FrameBuffer.java index 363a7a8632..aba76e7701 100644 --- a/jme3-core/src/main/java/com/jme3/texture/FrameBuffer.java +++ b/jme3-core/src/main/java/com/jme3/texture/FrameBuffer.java @@ -122,6 +122,7 @@ public Texture getTexture() { /** * Do not use. + * @return the buffer's ID */ public int getId() { return id; @@ -129,6 +130,8 @@ public int getId() { /** * Do not use. + * + * @param id the desired ID */ public void setId(int id) { this.id = id; @@ -136,6 +139,8 @@ public void setId(int id) { /** * Do not use. + * + * @return the slot code, such as SLOT_DEPTH_STENCIL */ public int getSlot() { return slot; @@ -470,6 +475,7 @@ public void setColorTexture(Texture2D tex) { * only target. * * @param tex The color texture array to set. + * @param layer (default=-1) * @deprecated Use addColorTarget */ @Deprecated @@ -565,6 +571,7 @@ public void addColorTexture(Texture2D tex) { * is rendered to by the shader. * * @param tex The texture array to add. + * @param layer (default=-1) * @deprecated Use addColorTarget */ @Deprecated @@ -637,8 +644,8 @@ public void setDepthTexture(Texture2D tex) { /** * - * @param tex - * @param layer + * @param tex the TextureArray to apply + * @param layer (default=-1) * @deprecated Use setDepthTarget */ @Deprecated @@ -667,7 +674,7 @@ public int getNumColorBuffers() { } /** - * @param index + * @param index the zero-base index (≥0) * @return The color buffer at the given index. * @deprecated Use getColorTarget(int) */ diff --git a/jme3-core/src/main/java/com/jme3/texture/Image.java b/jme3-core/src/main/java/com/jme3/texture/Image.java index 5137eafaeb..1e0ed3408c 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Image.java +++ b/jme3-core/src/main/java/com/jme3/texture/Image.java @@ -717,12 +717,14 @@ protected Image(int id){ * the width of the image. * @param height * the height of the image. + * @param depth + * the desired image depth * @param data * the image data. * @param mipMapSizes * the array of mipmap sizes, or null for no mipmaps. * @param colorSpace - * @see ColorSpace the colorSpace of the image + * the colorSpace of the image */ public Image(Format format, int width, int height, int depth, ArrayList data, int[] mipMapSizes, ColorSpace colorSpace) { @@ -749,12 +751,12 @@ public Image(Format format, int width, int height, int depth, ArrayList data, ColorSpace colorSpace) { this(format, width, height, depth, data, null, colorSpace); @@ -839,11 +843,11 @@ public Image(Format format, int width, int height, int depth, ArrayList getData() { * getData returns the data for this image. If the data is * undefined, null will be returned. * + * @param index index of the data buffer to access * @return the data for this image. */ public ByteBuffer getData(int index) { diff --git a/jme3-core/src/main/java/com/jme3/texture/Texture.java b/jme3-core/src/main/java/com/jme3/texture/Texture.java index 5def31ee18..fd44fc0e51 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Texture.java +++ b/jme3-core/src/main/java/com/jme3/texture/Texture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -567,6 +567,7 @@ public int hashCode() { /** Retrieve a basic clone of this Texture (ie, clone everything but the * image data, which is shared) * + * @param rVal storage for the clone (not null, modified) * @return Texture * * @deprecated Use {@link Texture#clone()} instead. @@ -584,6 +585,7 @@ public Texture createSimpleClone(Texture rVal) { } /** + * @return a new Texture * @deprecated Use {@link Texture#clone()} instead. */ @Deprecated diff --git a/jme3-core/src/main/java/com/jme3/texture/Texture2D.java b/jme3-core/src/main/java/com/jme3/texture/Texture2D.java index aca6125a10..b78c378988 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Texture2D.java +++ b/jme3-core/src/main/java/com/jme3/texture/Texture2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,9 +72,9 @@ public Texture2D(Image img){ * * @see com.jme3.texture.FrameBuffer * - * @param width - * @param height - * @param format + * @param width the desired width (in pixels) + * @param height the desired height (in pixels) + * @param format the desired format */ public Texture2D(int width, int height, Image.Format format){ this(new Image(format, width, height, null, ColorSpace.Linear)); @@ -86,10 +86,10 @@ public Texture2D(int width, int height, Image.Format format){ * * @see com.jme3.texture.FrameBuffer * - * @param width - * @param height - * @param format - * @param numSamples + * @param width the desired width (in pixels) + * @param height the desired height (in pixels) + * @param numSamples the desired degree of multi-sampling (≥1) + * @param format the desired format */ public Texture2D(int width, int height, int numSamples, Image.Format format){ this(new Image(format, width, height, null, ColorSpace.Linear)); diff --git a/jme3-core/src/main/java/com/jme3/texture/Texture3D.java b/jme3-core/src/main/java/com/jme3/texture/Texture3D.java index d05e353c74..adb8ff8cfa 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Texture3D.java +++ b/jme3-core/src/main/java/com/jme3/texture/Texture3D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,10 +73,10 @@ public Texture3D(Image img) { * * @see com.jme3.texture.FrameBuffer * - * @param width - * @param height - * @param depth - * @param format + * @param width the desired width (in pixels) + * @param height the desired height (in pixels) + * @param depth the desired depth + * @param format the desired format */ public Texture3D(int width, int height, int depth, Image.Format format) { this(new Image(format, width, height, depth, null, ColorSpace.Linear)); @@ -88,10 +88,11 @@ public Texture3D(int width, int height, int depth, Image.Format format) { * * @see com.jme3.texture.FrameBuffer * - * @param width - * @param height - * @param format - * @param numSamples + * @param width the desired width (in pixels) + * @param height the desired height (in pixels) + * @param depth the desired depth + * @param numSamples the desired degree of multi-sampling (≥1) + * @param format the desired format */ public Texture3D(int width, int height, int depth, int numSamples, Image.Format format) { this(new Image(format, width, height, depth, null, ColorSpace.Linear)); diff --git a/jme3-core/src/main/java/com/jme3/texture/TextureArray.java b/jme3-core/src/main/java/com/jme3/texture/TextureArray.java index a7e24c35d7..026489cb2a 100644 --- a/jme3-core/src/main/java/com/jme3/texture/TextureArray.java +++ b/jme3-core/src/main/java/com/jme3/texture/TextureArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -62,7 +62,8 @@ public TextureArray() { * Construct a TextureArray from the given list of images. * To check if a hardware supports TextureArray check : * renderManager.getRenderer().getCaps().contains(Caps.TextureArray) - * @param images + * + * @param images the images to use (not null) */ public TextureArray(List images) { super(); diff --git a/jme3-core/src/main/java/com/jme3/util/BufferUtils.java b/jme3-core/src/main/java/com/jme3/util/BufferUtils.java index 3a99c730a2..567dd7100d 100644 --- a/jme3-core/src/main/java/com/jme3/util/BufferUtils.java +++ b/jme3-core/src/main/java/com/jme3/util/BufferUtils.java @@ -80,7 +80,8 @@ private BufferUtils() { * purpose. Default is false. To print direct memory usage use * BufferUtils.printCurrentDirectMemory(StringBuilder store); * - * @param enabled + * @param enabled true to enable tracking, false to disable it + * (default=false) */ public static void setTrackDirectMemoryEnabled(boolean enabled) { trackDirectMemory = enabled; diff --git a/jme3-core/src/main/java/com/jme3/util/ListSort.java b/jme3-core/src/main/java/com/jme3/util/ListSort.java index 636af72431..ba882c2051 100644 --- a/jme3-core/src/main/java/com/jme3/util/ListSort.java +++ b/jme3-core/src/main/java/com/jme3/util/ListSort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -129,7 +129,7 @@ public ListSort() { * at least once, but only if the length of the list to sort changed before * sorting * - * @param len + * @param len the size of the array to sort */ @SuppressWarnings("unchecked") public final void allocateStack(int len) { @@ -995,6 +995,8 @@ public int getLength() { /** * test case + * + * @param argv ignored */ @SuppressWarnings("unchecked") public static void main(String[] argv) { diff --git a/jme3-core/src/main/java/com/jme3/util/LittleEndien.java b/jme3-core/src/main/java/com/jme3/util/LittleEndien.java index 6cb1eeadac..89f61d6c1b 100644 --- a/jme3-core/src/main/java/com/jme3/util/LittleEndien.java +++ b/jme3-core/src/main/java/com/jme3/util/LittleEndien.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,6 +74,9 @@ public int readUnsignedShort() throws IOException { /** * read an unsigned int as a long + * + * @return the value that was read + * @throws IOException if an I/O error occurs while reading */ public long readUInt() throws IOException { return ((in.read() & 0xff) diff --git a/jme3-core/src/main/java/com/jme3/util/NativeObject.java b/jme3-core/src/main/java/com/jme3/util/NativeObject.java index 8099ea6068..c7ff725294 100644 --- a/jme3-core/src/main/java/com/jme3/util/NativeObject.java +++ b/jme3-core/src/main/java/com/jme3/util/NativeObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -93,6 +93,8 @@ public NativeObject(){ /** * Protected constructor that doesn't allocate handle ref. * This is used in subclasses for the createDestructableClone(). + * + * @param id the desired ID */ protected NativeObject(int id){ this.id = id; @@ -140,6 +142,8 @@ public void clearUpdateNeeded(){ /** * Internal use only. Check if {@link #setUpdateNeeded()} was called before. + * + * @return true if an update is needed, otherwise false */ public boolean isUpdateNeeded(){ return updateNeeded; @@ -207,6 +211,8 @@ void deleteNativeBuffersInternal() { /** * Creates a shallow clone of this GL Object. The deleteObject method * should be functional for this object. + * + * @return a new instance */ public abstract NativeObject createDestructableClone(); diff --git a/jme3-core/src/main/java/com/jme3/util/NativeObjectManager.java b/jme3-core/src/main/java/com/jme3/util/NativeObjectManager.java index abd9f73ea3..0dfafc9c7c 100644 --- a/jme3-core/src/main/java/com/jme3/util/NativeObjectManager.java +++ b/jme3-core/src/main/java/com/jme3/util/NativeObjectManager.java @@ -98,6 +98,8 @@ public NativeObjectRef(ReferenceQueue refQueue, NativeObject obj){ /** * (Internal use only) Register a NativeObject with the manager. + * + * @param obj the object to register (not null) */ public void registerObject(NativeObject obj) { if (obj.getId() <= 0) { @@ -196,6 +198,8 @@ public void deleteUnused(Object rendererObject){ /** * (Internal use only) Deletes all objects. * Must only be called when display is destroyed. + * + * @param rendererObject the renderer object */ public void deleteAllObjects(Object rendererObject){ deleteUnused(rendererObject); diff --git a/jme3-core/src/main/java/com/jme3/util/SafeArrayList.java b/jme3-core/src/main/java/com/jme3/util/SafeArrayList.java index 487a5721b7..d7486c9070 100644 --- a/jme3-core/src/main/java/com/jme3/util/SafeArrayList.java +++ b/jme3-core/src/main/java/com/jme3/util/SafeArrayList.java @@ -137,6 +137,8 @@ protected final E[] createArray(int size) { * is guaranteed not to change through further List manipulation. * Changes to this array may or may not be reflected in the list and * should be avoided. + * + * @return either the pre-existing array or a new one */ public final E[] getArray() { if( backingArray != null ) diff --git a/jme3-core/src/main/java/com/jme3/util/SortUtil.java b/jme3-core/src/main/java/com/jme3/util/SortUtil.java index c7ec52c16b..3834ebf60e 100644 --- a/jme3-core/src/main/java/com/jme3/util/SortUtil.java +++ b/jme3-core/src/main/java/com/jme3/util/SortUtil.java @@ -140,6 +140,9 @@ public int compare(Float o1, Float o2) { /** * Quick sorts the supplied array using the specified comparator. + * + * @param a the array to sort (not null, modified) + * @param comp the Comparator to use (not null) */ public static void qsort(Object[] a, Comparator comp) { qsort(a, 0, a.length - 1, comp); @@ -148,8 +151,10 @@ public static void qsort(Object[] a, Comparator comp) { /** * Quick sorts the supplied array using the specified comparator. * + * @param a the array to sort (modified) * @param lo0 the index of the lowest element to include in the sort. * @param hi0 the index of the highest element to include in the sort. + * @param comp the Comparator to use (not null) */ @SuppressWarnings("unchecked") public static void qsort(Object[] a, int lo0, int hi0, Comparator comp) { @@ -269,6 +274,10 @@ public static void qsort(int[] a, int lo0, int hi0, Comparator comp) { /** * Merge sort + * + * @param src the source array (not null) + * @param dest the destination array (not null) + * @param comp the Comparator to use */ public static void msort(Object[] src, Object[] dest, Comparator comp){ msort(src, dest, 0, src.length - 1, comp); diff --git a/jme3-core/src/main/java/com/jme3/util/clone/CloneFunction.java b/jme3-core/src/main/java/com/jme3/util/clone/CloneFunction.java index cb58730078..509267b45f 100644 --- a/jme3-core/src/main/java/com/jme3/util/clone/CloneFunction.java +++ b/jme3-core/src/main/java/com/jme3/util/clone/CloneFunction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 jMonkeyEngine + * Copyright (c) 2016-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,6 +57,7 @@ public interface CloneFunction { * * @param cloner The cloner performing the cloning operation. * @param original The original object that needs to be cloned. + * @return a new instance */ public T cloneObject( Cloner cloner, T original ); diff --git a/jme3-core/src/main/java/com/jme3/util/clone/Cloner.java b/jme3-core/src/main/java/com/jme3/util/clone/Cloner.java index 3c5b1340ff..c4dd4baf8c 100644 --- a/jme3-core/src/main/java/com/jme3/util/clone/Cloner.java +++ b/jme3-core/src/main/java/com/jme3/util/clone/Cloner.java @@ -134,6 +134,10 @@ public Cloner() { /** * Convenience utility function that creates a new Cloner, uses it to * deep clone the object, and then returns the result. + * + * @param the type of object to be cloned + * @param object the object to be cloned (may be null) + * @return a new instance, or a cached value, or null */ public static T deepClone( T object ) { return new Cloner().clone(object); @@ -155,6 +159,10 @@ public static T deepClone( T object ) { * * Note: objects returned by this method may not have yet had their cloneField() * method called. + * + * @param the type of object to be cloned + * @param object the object to be cloned (may be null) + * @return a new instance, or a cached value, or null */ public T clone( T object ) { return clone(object, true); @@ -192,6 +200,12 @@ private Class objectClass( T object ) { * * Note: objects returned by this method may not have yet had their cloneField() * method called. + * + * @param the type of object to be cloned + * @param object the object to be cloned (may be null) + * @param useFunctions true→use custom clone functions, + * false→don't use + * @return a new instance, or a cached value, or null */ public T clone( T object, boolean useFunctions ) { @@ -283,6 +297,11 @@ public T clone( T object, boolean useFunctions ) { * not super-classes or super-interfaces unless you know specifically that they are cloneable.

            *

            By default ListCloneFunction is registered for ArrayList, LinkedList, CopyOnWriteArrayList, * Vector, Stack, and JME's SafeArrayList.

            + * + * @param the type of object to be cloned + * @param type the type of object to be cloned + * @param function the function to set, or null to cancel any previous + * setting */ public void setCloneFunction( Class type, CloneFunction function ) { if( function == null ) { @@ -295,6 +314,10 @@ public void setCloneFunction( Class type, CloneFunction function ) { /** * Returns a previously registered clone function for the specified type or null * if there is no custom clone function for the type. + * + * @param the type of object to be cloned + * @param type the type of object to be cloned + * @return the registered function, or null if none */ @SuppressWarnings("unchecked") public CloneFunction getCloneFunction( Class type ) { @@ -321,6 +344,10 @@ public CloneFunction getCloneFunction( Class type ) { * This can be used to stub out specific values from being cloned or to * force global shared instances to be used even if the object is cloneable * normally. + * + * @param the type of object to be detected and returned + * @param original the instance to be detected (alias created) + * @param clone the instance to be returned (alias created) */ public void setClonedValue( T original, T clone ) { index.put(original, clone); @@ -331,6 +358,9 @@ public void setClonedValue( T original, T clone ) { * by this cloner during this session. Cloned objects are cached * for later use and it's sometimes convenient to know if some * objects have already been cloned. + * + * @param o the object to be tested + * @return true if the object has been cloned, otherwise false */ public boolean isCloned( Object o ) { return index.containsKey(o); @@ -352,6 +382,11 @@ public void clearIndex() { * *

            This method is provided as a convenient way for CloneFunctions to call * clone() and objects without necessarily knowing their real type.

            + * + * @param the type of object to be cloned + * @param object the object to be cloned (may be null) + * @return a new instance or null + * @throws CloneNotSupportedException if the object has no public clone method */ public T javaClone( T object ) throws CloneNotSupportedException { if( object == null ) { @@ -382,6 +417,10 @@ public T javaClone( T object ) throws CloneNotSupportedException { * Clones a primitive array by coping it and clones an object * array by coping it and then running each of its values through * Cloner.clone(). + * + * @param the type of array to be cloned + * @param object the array to be cloned + * @return a new array */ protected T arrayClone( T object ) { diff --git a/jme3-core/src/main/java/com/jme3/util/clone/JmeCloneable.java b/jme3-core/src/main/java/com/jme3/util/clone/JmeCloneable.java index 28234d7bc9..b22514e250 100644 --- a/jme3-core/src/main/java/com/jme3/util/clone/JmeCloneable.java +++ b/jme3-core/src/main/java/com/jme3/util/clone/JmeCloneable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 jMonkeyEngine + * Copyright (c) 2016-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,6 +74,8 @@ public interface JmeCloneable extends Cloneable { * fields and instead get at the superclass protected clone() methods. * For example, through super.jmeClone() or another protected clone * method that some base class eventually calls super.clone() in.

            + * + * @return a new instance */ public Object jmeClone(); diff --git a/jme3-core/src/main/java/com/jme3/util/mikktspace/MikkTSpaceContext.java b/jme3-core/src/main/java/com/jme3/util/mikktspace/MikkTSpaceContext.java index 5c4e4f6fc6..85402eefbb 100644 --- a/jme3-core/src/main/java/com/jme3/util/mikktspace/MikkTSpaceContext.java +++ b/jme3-core/src/main/java/com/jme3/util/mikktspace/MikkTSpaceContext.java @@ -49,7 +49,7 @@ public interface MikkTSpaceContext { * Returns the number of vertices on face number iFace iFace is a number in * the range {0, 1, ..., getNumFaces()-1} * - * @param face + * @param face which face (≥0, <numFaces) * @return the count (≥0) */ public int getNumVerticesOfFace(int face); @@ -59,9 +59,9 @@ public interface MikkTSpaceContext { * number iVert. iVert is in the range {0,1,2} for triangles and {0,1,2,3} * for quads. * - * @param posOut - * @param face - * @param vert + * @param posOut storage for the results (modified) + * @param face which face (≥0, <numFaces) + * @param vert which vertex in the face (≥0, <numVertices) */ public void getPosition(float posOut[], int face, int vert); @@ -83,10 +83,10 @@ public interface MikkTSpaceContext { * already existing index list WILL produce INCORRECT results. DO NOT! use * an already existing index list. * - * @param tangent - * @param sign - * @param face - * @param vert + * @param tangent the desired tangent vector (unaffected) + * @param sign the desired sign + * @param face which face (≥0, <numFaces) + * @param vert which vertex in the face (≥0, <numVertices) */ public void setTSpaceBasic(float tangent[], float sign, int face, int vert); @@ -110,13 +110,14 @@ public interface MikkTSpaceContext { * already existing index list WILL produce INCORRECT results. DO NOT! use * an already existing index list. * - * @param tangent - * @param biTangent - * @param magS - * @param magT - * @param isOrientationPreserving - * @param face - * @param vert + * @param tangent the desired tangent vector (unaffected) + * @param biTangent the desired bitangent vector (unaffected) + * @param magS true magnitude of S + * @param magT true magnitude of T + * @param isOrientationPreserving true→preserves, false→doesn't + * preserve + * @param face which face (≥0, <numFaces) + * @param vert which vertex in the face (≥0, <numVertices) */ void setTSpace(float tangent[], float biTangent[], float magS, float magT, boolean isOrientationPreserving, int face, int vert); diff --git a/jme3-core/src/main/java/com/jme3/util/xml/SAXUtil.java b/jme3-core/src/main/java/com/jme3/util/xml/SAXUtil.java index 4a5c02ca1c..1be89e4a7e 100644 --- a/jme3-core/src/main/java/com/jme3/util/xml/SAXUtil.java +++ b/jme3-core/src/main/java/com/jme3/util/xml/SAXUtil.java @@ -54,7 +54,7 @@ private SAXUtil() { * @param i The string to parse * @param def The default value if the string is null * @return the parsed value or def - * @throws SAXException + * @throws SAXException in case of a syntax error */ public static int parseInt(String i, int def) throws SAXException{ if (i == null) diff --git a/jme3-core/src/plugins/java/com/jme3/cursors/plugins/JmeCursor.java b/jme3-core/src/plugins/java/com/jme3/cursors/plugins/JmeCursor.java index 22f22bc7dc..ad3d1ef24e 100644 --- a/jme3-core/src/plugins/java/com/jme3/cursors/plugins/JmeCursor.java +++ b/jme3-core/src/plugins/java/com/jme3/cursors/plugins/JmeCursor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -138,7 +138,8 @@ public void setImagesData(IntBuffer imagesData) { /** * Sets the cursor image delay for each frame of an animated cursor. If the * cursor has no animation and consist of only 1 image, null is expected. - * @param imagesDelay + * + * @param imagesDelay the desired delay amount for each frame */ public void setImagesDelay(IntBuffer imagesDelay) { this.imagesDelay = imagesDelay; diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java index 8f78f1b0db..3438e30082 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java @@ -101,7 +101,7 @@ public final void addNode(ShaderNode c) { * @param statements the list statements to parse * @param key the ShaderNodeDefinitionKey * @return a list of ShaderNodesDefinition - * @throws IOException + * @throws IOException if an I/O error occurs */ public List readNodesDefinitions(List statements, ShaderNodeDefinitionKey key) throws IOException { @@ -138,7 +138,7 @@ public List readNodesDefinitions(List statement * already loaded definitions * * @param statements the list of statements to parse - * @throws IOException + * @throws IOException if an I/O error occurs */ public void readNodesDefinitions(List statements) throws IOException { readNodesDefinitions(statements, new ShaderNodeDefinitionKey()); @@ -149,7 +149,7 @@ public void readNodesDefinitions(List statements) throws IOException * * @param statements the list of statements to parse * @param key the ShaderNodeDefinitionKey - * @throws IOException + * @throws IOException if an I/O error occurs */ protected void readShaderNodeDefinition(List statements, ShaderNodeDefinitionKey key) throws IOException { boolean isLoadDoc = key instanceof ShaderNodeDefinitionKey && key.isLoadDocumentation(); @@ -209,7 +209,7 @@ protected void readShaderNodeDefinition(List statements, ShaderNodeDe * * @param statement the statement to parse * @return a ShaderNodeVariable extracted from the statement - * @throws IOException + * @throws IOException if an I/O error occurs */ protected ShaderNodeVariable readVariable(Statement statement) throws IOException { @@ -248,7 +248,7 @@ protected ShaderNodeVariable readVariable(Statement statement) throws IOExceptio * reads the VertexShaderNodes{} block * * @param statements the list of statements to parse - * @throws IOException + * @throws IOException if an I/O error occurs */ public void readVertexShaderNodes(List statements) throws IOException { attributes.clear(); @@ -259,7 +259,7 @@ public void readVertexShaderNodes(List statements) throws IOException * reads a list of ShaderNode{} blocks * * @param statements the list of statements to parse - * @throws IOException + * @throws IOException if an I/O error occurs */ protected void readShaderNode(List statements) throws IOException { @@ -315,6 +315,7 @@ protected void readShaderNode(List statements) throws IOException { * * * @param statement the statement to read. + * @param hasNameSpace indicate which vars have namespaces * @return the read mapping. * @throws MatParseException if the statement isn't valid. */ @@ -381,7 +382,7 @@ protected VariableMapping parseMapping(Statement statement, boolean[] hasNameSpa * reads the FragmentShaderNodes{} block * * @param statements the list of statements to parse - * @throws IOException + * @throws IOException if an I/O error occurs */ public void readFragmentShaderNodes(List statements) throws IOException { readNodes(statements); @@ -390,8 +391,8 @@ public void readFragmentShaderNodes(List statements) throws IOExcepti /** * Reads a Shader statement of the form TYPE LANG : SOURCE * - * @param statement - * @throws IOException + * @param statement the shader statement (not null) + * @throws IOException if an I/O error occurs */ protected void readShaderStatement(Statement statement) throws IOException { String[] split = statement.getLine().split(":"); @@ -418,7 +419,7 @@ public void setTechniqueDef(TechniqueDef techniqueDef) { /** * sets the material def currently being loaded * - * @param materialDef + * @param materialDef (alias created) */ public void setMaterialDef(MaterialDef materialDef) { this.materialDef = materialDef; @@ -546,7 +547,9 @@ protected boolean updateRightFromUniforms(UniformBinding param, VariableMapping * @param param the mat param. * @param mapping the mapping. * @param map the map of uniforms to search into. + * @param statement the statement being read * @return true if the param was added to the map. + * @throws MatParseException in case of a syntax error */ public boolean updateRightFromUniforms(MatParam param, VariableMapping mapping, Map map, Statement statement) throws MatParseException { @@ -626,7 +629,8 @@ public void updateVarFromAttributes(ShaderNodeVariable right, VariableMapping ma /** * Adds a define to the technique def * - * @param paramName + * @param paramName the name of the material parameter + * @param paramType the type of the material parameter */ public void addDefine(String paramName, VarType paramType) { if (techniqueDef.getShaderParamDefine(paramName) == null) { @@ -850,7 +854,7 @@ public VariableMapping readOutputMapping(Statement statement) throws MatParseExc * Reads a list of ShaderNodes * * @param statements the list of statements to read - * @throws IOException + * @throws IOException if an I/O error occurs */ public void readNodes(List statements) throws IOException { if (techniqueDef.getShaderNodes() == null) { @@ -963,7 +967,7 @@ public void storeFragmentUniform(ShaderNodeVariable var) { /** * sets the assetManager * - * @param assetManager + * @param assetManager for loading assets (alias created) */ public void setAssetManager(AssetManager assetManager) { this.assetManager = assetManager; @@ -974,7 +978,7 @@ public void setAssetManager(AssetManager assetManager) { * * @param statement the statement being read * @return the definition - * @throws IOException + * @throws IOException if an I/O error occurs */ public ShaderNodeDefinition findDefinition(Statement statement) throws IOException { @@ -1100,7 +1104,7 @@ public void storeVariable(ShaderNodeVariable variable, List * * @param mapping the mapping * @param statement1 the statement being read - * @throws MatParseException + * @throws MatParseException in case of a syntax error */ protected void checkTypes(VariableMapping mapping, Statement statement1) throws MatParseException { if (!ShaderUtils.typesMatch(mapping)) { diff --git a/jme3-core/src/plugins/java/com/jme3/texture/plugins/DDSLoader.java b/jme3-core/src/plugins/java/com/jme3/texture/plugins/DDSLoader.java index 44e1aad620..af8ea3fd82 100644 --- a/jme3-core/src/plugins/java/com/jme3/texture/plugins/DDSLoader.java +++ b/jme3-core/src/plugins/java/com/jme3/texture/plugins/DDSLoader.java @@ -532,6 +532,7 @@ public ByteBuffer readRGB2D(boolean flip, int totalSize) throws IOException { /** * Reads a DXT compressed image from the InputStream * + * @param flip true→flip image along the Y axis, false→don't flip * @param totalSize Total size of the image in bytes, including mipmaps * @return ByteBuffer containing compressed DXT image in the format specified by pixelFormat_ * @throws java.io.IOException If an error occurred while reading from InputStream @@ -675,6 +676,7 @@ public ByteBuffer readRGB3D(boolean flip, int totalSize) throws IOException { /** * Reads a DXT compressed image from the InputStream * + * @param flip true→flip image along the Y axis, false→don't flip * @param totalSize Total size of the image in bytes, including mipmaps * @return ByteBuffer containing compressed DXT image in the format specified by pixelFormat_ * @throws java.io.IOException If an error occurred while reading from InputStream diff --git a/jme3-core/src/plugins/java/com/jme3/texture/plugins/TGALoader.java b/jme3-core/src/plugins/java/com/jme3/texture/plugins/TGALoader.java index 10c6e30f21..9d46b1091f 100644 --- a/jme3-core/src/plugins/java/com/jme3/texture/plugins/TGALoader.java +++ b/jme3-core/src/plugins/java/com/jme3/texture/plugins/TGALoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2020 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -102,7 +102,7 @@ public Object load(AssetInfo info) throws IOException { * Flip the image vertically * @return Image object that contains the * image, either as a RGB888 or RGBA8888 - * @throws java.io.IOException + * @throws java.io.IOException if an I/O error occurs */ public static Image load(InputStream in, boolean flip) throws IOException { boolean flipH = false; diff --git a/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXLoader.java b/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXLoader.java index 1869c7a595..a7cd19d6f1 100644 --- a/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXLoader.java +++ b/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXLoader.java @@ -270,10 +270,11 @@ private Image createImage(int nbSlices, int byteBuffersSize, Image.Format imgFor /** * Parse the file metaData to select the PixelReader that suits the file * coordinates orientation - * @param bytesOfKeyValueData - * @param in - * @return - * @throws IOException + * + * @param bytesOfKeyValueData number of bytes to read + * @param in the input stream (not null) + * @return a new instance or null + * @throws IOException from the input stream */ private PixelReader parseMetaData(int bytesOfKeyValueData, DataInput in) throws IOException { PixelReader pixelReader = null; diff --git a/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXWriter.java b/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXWriter.java index fbbdc8972d..092dd4e03d 100644 --- a/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXWriter.java +++ b/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2015 jMonkeyEngine + * Copyright (c) 2009-2021 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,7 +70,8 @@ public class KTXWriter { /** * Creates a KTXWriter that will write files in the given path - * @param path + * + * @param path the desired filesystem path (alias created) */ public KTXWriter(String path) { filePath = path; @@ -228,9 +229,10 @@ public void write(Image image, Class textureType, String file /** * writes padding data to the output padding times. - * @param padding - * @param out - * @throws IOException + * + * @param padding the number of bytes to be written + * @param out the output stream + * @throws IOException from the output stream */ private void pad(int padding, DataOutput out) throws IOException { //padding diff --git a/jme3-core/src/tools/java/jme3tools/optimize/GeometryBatchFactory.java b/jme3-core/src/tools/java/jme3tools/optimize/GeometryBatchFactory.java index 10d3b80c11..cbbc064320 100644 --- a/jme3-core/src/tools/java/jme3tools/optimize/GeometryBatchFactory.java +++ b/jme3-core/src/tools/java/jme3tools/optimize/GeometryBatchFactory.java @@ -91,8 +91,8 @@ private static void doTransformTangents(FloatBuffer inBuf, int offset, int compo * Merges all geometries in the collection into * the output mesh. Creates a new material using the TextureAtlas. * - * @param geometries - * @param outMesh + * @param geometries the geometries to merge + * @param outMesh a Mesh to receive the geometries */ public static void mergeGeometries(Collection geometries, Mesh outMesh) { int[] compsForBuf = new int[VertexBuffer.Type.values().length]; @@ -309,6 +309,8 @@ public static List makeBatches(Collection geometries) { /** * Batches a collection of Geometries so that all with the same material get combined. * @param geometries The Geometries to combine + * @param useLods true→generate levels of detail, false→don't + * generate them * @return A List of newly created Geometries, each with a distinct material */ public static List makeBatches(Collection geometries, boolean useLods) { diff --git a/jme3-core/src/tools/java/jme3tools/optimize/TextureAtlas.java b/jme3-core/src/tools/java/jme3tools/optimize/TextureAtlas.java index 95321506fe..3a1576c3eb 100644 --- a/jme3-core/src/tools/java/jme3tools/optimize/TextureAtlas.java +++ b/jme3-core/src/tools/java/jme3tools/optimize/TextureAtlas.java @@ -138,7 +138,8 @@ public TextureAtlas(int width, int height) { /** * Add a geometries DiffuseMap (or ColorMap), NormalMap and SpecularMap to the atlas. - * @param geometry + * + * @param geometry the Geometry to be added (not null) * @return false if the atlas is full. */ public boolean addGeometry(Geometry geometry) { @@ -394,7 +395,8 @@ private TextureAtlasTile getAtlasTile(String assetName) { /** * Creates a new atlas texture for the given map name. - * @param mapName + * + * @param mapName the desired name * @return the atlas texture */ public Texture getAtlasTexture(String mapName) { diff --git a/jme3-core/src/tools/java/jme3tools/shadercheck/Validator.java b/jme3-core/src/tools/java/jme3tools/shadercheck/Validator.java index a3574ca572..ac48eed779 100644 --- a/jme3-core/src/tools/java/jme3tools/shadercheck/Validator.java +++ b/jme3-core/src/tools/java/jme3tools/shadercheck/Validator.java @@ -9,11 +9,15 @@ public interface Validator { /** * Returns the name of the validation tool + * + * @return the name */ public String getName(); /** * Returns true if the tool is installed on the system, false otherwise. + * + * @return true if installed, otherwise false */ public boolean isInstalled();