Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions jme3-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down
2 changes: 2 additions & 0 deletions jme3-core/src/main/java/checkers/quals/DefaultQualifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
}
4 changes: 2 additions & 2 deletions jme3-core/src/main/java/checkers/quals/Dependent.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<? extends Annotation> 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<? extends Annotation> when();
Expand Down
2 changes: 1 addition & 1 deletion jme3-core/src/main/java/checkers/quals/SubtypeOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<? extends Annotation>[] value();
}
2 changes: 2 additions & 0 deletions jme3-core/src/main/java/checkers/quals/Unused.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<? extends Annotation> when();
}
15 changes: 15 additions & 0 deletions jme3-core/src/main/java/com/jme3/anim/AnimComposer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -213,13 +214,18 @@ 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);
}

/**
* 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);
Expand Down Expand Up @@ -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));
Expand All @@ -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];
Expand Down
12 changes: 6 additions & 6 deletions jme3-core/src/main/java/com/jme3/anim/Armature.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -152,7 +152,7 @@ public List<Joint> getJointList() {
/**
* return a joint for the given index
*
* @param index
* @param index a zero-based joint index (&ge;0)
* @return the pre-existing instance
*/
public Joint getJoint(int index) {
Expand All @@ -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) {
Expand All @@ -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 (&ge;0) or -1 if not found
*/
public int getJointIndex(Joint joint) {
Expand All @@ -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 (&ge;0) or -1 if not found
*/
public int getJointIndex(String name) {
Expand Down
6 changes: 6 additions & 0 deletions jme3-core/src/main/java/com/jme3/anim/ArmatureMask.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion jme3-core/src/main/java/com/jme3/anim/MorphTrack.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions jme3-core/src/main/java/com/jme3/anim/SkinningControl.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion jme3-core/src/main/java/com/jme3/anim/TransformTrack.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion jme3-core/src/main/java/com/jme3/anim/tween/Tween.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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();

Expand All @@ -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&gt;length(), otherwise false
*/
public boolean interpolate(double t);

Expand Down
32 changes: 31 additions & 1 deletion jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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);
Expand All @@ -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.
* <p>
*
* <p>For example:</p>
* <pre>Tweens.callTweenMethod(1, myObject, "foo", "bar")</pre>
* <p>Would work for any of the following method signatures:</p>
Expand All @@ -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 )
* </pre>
*
* @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);
Expand Down
6 changes: 5 additions & 1 deletion jme3-core/src/main/java/com/jme3/anim/util/Primitives.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
*
* <pre>
* wrap(int.class) == Integer.class
* wrap(Integer.class) == Integer.class
* wrap(String.class) == String.class
* </pre>
*
* @param <T> type
* @param type the type to be boxed (not null)
* @return the boxed type
*/
public static <T> Class<T> wrap(Class<T> type) {
if (type == null) {
Expand Down
Loading