Skip to content

Commit 015a59a

Browse files
committed
clarify javadoc (#1713)
* clarify javadoc * more javadoc clarification * ListSort: more javadpc * more javadoc refinements * ConstantVerifierState: "it's" -> "its"
1 parent 8282b10 commit 015a59a

File tree

68 files changed

+294
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+294
-268
lines changed

jme3-android/src/main/java/com/jme3/util/AndroidBufferAllocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class AndroidBufferAllocator implements BufferAllocator {
8080
}
8181

8282
/**
83-
* This function search the inner direct buffer of the android specific wrapped buffer classes
83+
* Searches the inner direct buffer of the Android-specific wrapped buffer classes
8484
* and destroys it using the reflection allocator method.
8585
*
8686
* @param toBeDestroyed The direct buffer that will be "cleaned".

jme3-bullet/src/common/java/com/jme3/bullet/animation/BoneLink.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ protected BoneLink() {
110110
* created)
111111
* @param bone the linked bone (not null, alias created)
112112
* @param collisionShape the desired shape (not null, alias created)
113-
* @param linkConfig the link configuration (not null)
113+
* @param mass the desired mass (>0)
114114
* @param localOffset the location of the body's center (in the bone's local
115-
* coordinates, not null, unaffected)
115+
* coordinates, not null, unaffected)
116116
*/
117117
BoneLink(DacLinks control, Joint bone, CollisionShape collisionShape,
118118
float mass, Vector3f localOffset) {

jme3-bullet/src/common/java/com/jme3/bullet/animation/DacConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ abstract public class DacConfiguration extends AbstractPhysicsControl {
9191
*/
9292
private float torsoMass = 1f;
9393
/**
94-
* map linked bone names to masses
94+
* Maps linked bone names to masses.
9595
*/
9696
private Map<String, Float> blConfigMap = new HashMap<>(50);
9797
/**
98-
* map linked bone names to ranges of motion for createSpatialData()
98+
* Maps linked bone names to ranges of motion for createSpatialData().
9999
*/
100100
private Map<String, RangeOfMotion> jointMap = new HashMap<>(50);
101101
/**

jme3-bullet/src/common/java/com/jme3/bullet/animation/DacLinks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ public void prePhysicsTick(PhysicsSpace space, float timeStep) {
883883
* Add joints to connect the named bone/torso link with each of its
884884
* children. Also fill in the boneLinkList. Note: recursive!
885885
*
886-
* @param parentName the parent bone/torso link (not null)
886+
* @param parentLink the parent bone/torso link (not null)
887887
*/
888888
private void addJoints(PhysicsLink parentLink) {
889889
List<String> childNames = childNames(parentLink);

jme3-bullet/src/common/java/com/jme3/bullet/animation/PhysicsLink.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ public void write(JmeExporter ex) throws IOException {
579579
/**
580580
* Create and configure a rigid body for this link.
581581
*
582-
* @param linkConfig the link configuration (not null)
582+
* @param mass the desired mass (&gt;0)
583583
* @param collisionShape the desired shape (not null, alias created)
584584
* @return a new instance, not in any PhysicsSpace
585585
*/

jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,16 @@
5656
import java.util.logging.Logger;
5757

5858
/**
59-
* This class is intended to replace the CharacterControl class.
59+
* Intended to replace the CharacterControl class.
6060
* <p>
6161
* A rigid body with cylinder collision shape is used and its velocity is set
6262
* continuously. A ray test is used to test whether the character is on the
6363
* ground.
6464
* <p>
6565
* The character keeps their own local coordinate system which adapts based on
66-
* the gravity working on the character so they will always stand upright.
66+
* the gravity working on the character, so it will always stand upright.
6767
* <p>
6868
* Motion in the local X-Z plane is damped.
69-
* <p>
70-
* This class is shared between JBullet and Native Bullet.
7169
*
7270
* @author normenhansen
7371
*/

jme3-core/src/main/java/com/jme3/anim/Joint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public final void update() {
115115
}
116116

117117
/**
118-
* Updates the model transforms for this bone, and, possibly the attach node
118+
* Updates the model transforms for this bone and for the attachments node
119119
* if not null.
120120
* <p>
121121
* The model transform of this bone is computed by combining the parent's

jme3-core/src/main/java/com/jme3/animation/Bone.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,8 @@ void blendAnimTransforms(Vector3f translation, Quaternion rotation, Vector3f sca
837837
}
838838

839839
/**
840-
* Sets local bind transform for bone.
841-
* Call setBindingPose() after all of the skeleton bones' bind transforms are set to save them.
840+
* Sets the local bind transform of the bone.
841+
* Call setBindingPose() after all of the bones' bind transforms are set to save them.
842842
*
843843
* @param translation the desired bind translation (not null, unaffected)
844844
* @param rotation the desired bind rotation (not null, unaffected)

jme3-core/src/main/java/com/jme3/app/Application.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ public interface Application {
5959
public LostFocusBehavior getLostFocusBehavior();
6060

6161
/**
62-
* Change the application's behavior when unfocused.
62+
* Changes the application's behavior when unfocused.
6363
*
6464
* By default, the application will
6565
* {@link LostFocusBehavior#ThrottleOnLostFocus throttle the update loop}
66-
* so as to not take 100% CPU usage when it is not in focus, e.g.
66+
* so as not to use 100% of the CPU when it is out of focus, e.g.
6767
* alt-tabbed, minimized, or obstructed by another window.
6868
*
6969
* @param lostFocusBehavior The new lost focus behavior to use.
@@ -82,15 +82,15 @@ public interface Application {
8282
public boolean isPauseOnLostFocus();
8383

8484
/**
85-
* Enable or disable pause on lost focus.
85+
* Enables or disables pause on lost focus.
8686
* <p>
8787
* By default, pause on lost focus is enabled.
8888
* If enabled, the application will stop updating
8989
* when it loses focus or becomes inactive (e.g. alt-tab).
9090
* For online or real-time applications, this might not be preferable,
91-
* so this feature should be set to disabled. For other applications,
92-
* it is best to keep it on so that CPU usage is not used when
93-
* not necessary.
91+
* so this feature should be disabled. For other applications,
92+
* it is best to keep it enabled so that CPU is not used
93+
* unnecessarily.
9494
*
9595
* @param pauseOnLostFocus True to enable pause on lost focus, false
9696
* otherwise.

jme3-core/src/main/java/com/jme3/app/LegacyApplication.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ public LostFocusBehavior getLostFocusBehavior() {
134134
}
135135

136136
/**
137-
* Change the application's behavior when unfocused.
137+
* Changes the application's behavior when unfocused.
138138
*
139139
* By default, the application will
140140
* {@link LostFocusBehavior#ThrottleOnLostFocus throttle the update loop}
141-
* so as to not take 100% CPU usage when it is not in focus, e.g.
142-
* alt-tabbed, minimized, or obstructed by another window.
141+
* so as not to use 100% of the CPU when out of focus, e.g.
142+
* alt-tabbed, minimized, or hidden by another window.
143143
*
144144
* @param lostFocusBehavior The new lost focus behavior to use.
145145
*
@@ -168,10 +168,9 @@ public boolean isPauseOnLostFocus() {
168168
* By default, pause on lost focus is enabled.
169169
* If enabled, the application will stop updating
170170
* when it loses focus or becomes inactive (e.g. alt-tab).
171-
* For online or real-time applications, this might not be preferable,
172-
* so this feature should be set to disabled. For other applications,
173-
* it is best to keep it on so that CPU usage is not used when
174-
* not necessary.
171+
* For online or real-time applications, this might be undesirable,
172+
* so this feature should be disabled. For other applications,
173+
* it is best to keep it enabled so the CPU is not used unnecessarily.
175174
*
176175
* @param pauseOnLostFocus True to enable pause on lost focus, false
177176
* otherwise.

jme3-core/src/main/java/com/jme3/app/state/ConstantVerifierState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ protected void checkValues() {
178178
}
179179

180180
/**
181-
* Checks the specified 'constant' value against it's known good
181+
* Checks the specified 'constant' value against its known good
182182
* value. These should obviously be different instances for this to
183183
* mean anything.
184184
*/

jme3-core/src/main/java/com/jme3/asset/AssetProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
public interface AssetProcessor {
4747
/**
48-
* Applies post processing to an asset.
48+
* Applies post-processing to an asset.
4949
* The method may return an object that is not the same
5050
* instance as the parameter object, and it could be from a different class.
5151
*

jme3-core/src/main/java/com/jme3/cinematic/Cinematic.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
import java.util.logging.Logger;
5555

5656
/**
57-
* An appstate for composing and playing cut scenes in a game. The cinematic
57+
* An appstate for composing and playing cutscenes in a game. The cinematic
5858
* schedules CinematicEvents over a timeline. Once the Cinematic created it has
5959
* to be attached to the stateManager.
6060
*
@@ -71,16 +71,16 @@
7171
* Cinematic#enqueueCinematicEvent(com.jme3.cinematic.events.CinematicEvent)
7272
* that enqueue events one after the other according to their initialDuration
7373
*
74-
* a cinematic has convenient methods to handle the playback :
74+
* A Cinematic has convenient methods to manage playback:
7575
* @see Cinematic#play()
7676
* @see Cinematic#pause()
7777
* @see Cinematic#stop()
7878
*
79-
* A cinematic is itself a CinematicEvent, meaning you can embed several
80-
* Cinematics. Embedded cinematics must not be added to the stateManager though.
79+
* A Cinematic is itself a CinematicEvent, meaning you can embed several
80+
* cinematics. Embedded cinematics must not be added to the stateManager though.
8181
*
82-
* Cinematic has a way to handle several point of view by creating CameraNode
83-
* over a cam and activating them on schedule.
82+
* Cinematic can handle several points of view by creating camera nodes
83+
* and activating them on schedule.
8484
* @see Cinematic#bindCamera(java.lang.String, com.jme3.renderer.Camera)
8585
* @see Cinematic#activateCamera(float, java.lang.String)
8686
* @see Cinematic#setActiveCamera(java.lang.String)
@@ -449,9 +449,8 @@ public KeyFrame addCinematicEvent(float timeStamp, CinematicEvent cinematicEvent
449449
}
450450

451451
/**
452-
* enqueue a cinematic event to a cinematic. This is a handy method when you
453-
* want to chain event of a given duration without knowing their initial
454-
* duration
452+
* Enqueue a cinematic event to a Cinematic. This is handy when you
453+
* want to chain events without knowing their durations.
455454
*
456455
* @param cinematicEvent the cinematic event to enqueue
457456
* @return the timestamp the event was scheduled.
@@ -715,7 +714,7 @@ public Node getScene() {
715714
}
716715

717716
/**
718-
* clear the cinematic of its events.
717+
* Remove all events from the Cinematic.
719718
*/
720719
public void clear() {
721720
dispose();

jme3-core/src/main/java/com/jme3/cinematic/events/AbstractCinematicEvent.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public AbstractCinematicEvent(LoopMode loopMode) {
9292

9393
/**
9494
* Construct a cinematic event with the given loopMode and the given initialDuration.
95+
*
9596
* @param initialDuration the duration of the event at speed = 1.
9697
* @param loopMode the loop mode of the event.
9798
*/
@@ -331,24 +332,27 @@ private List<CinematicEventListener> getListeners() {
331332
}
332333

333334
/**
334-
* Add a CinematicEventListener to this event.
335+
* Adds a CinematicEventListener to this event.
336+
*
335337
* @param listener CinematicEventListener
336338
*/
337339
public void addListener(CinematicEventListener listener) {
338340
getListeners().add(listener);
339341
}
340342

341343
/**
342-
* Remove a CinematicEventListener from this event.
344+
* Removes a CinematicEventListener from this event.
345+
*
343346
* @param listener CinematicEventListener
344347
*/
345348
public void removeListener(CinematicEventListener listener) {
346349
getListeners().remove(listener);
347350
}
348351

349352
/**
350-
* Fast-forward the event to the given timestamp. Time=0 is the start of the event.
351-
* @param time the time to fast forward to.
353+
* Fast-forwards the event to the given timestamp. Time=0 is the start of the event.
354+
*
355+
* @param time the time to fast-forward to.
352356
*/
353357
@Override
354358
public void setTime(float time) {

jme3-core/src/main/java/com/jme3/cinematic/events/CinematicEvent.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ public interface CinematicEvent extends Savable {
118118
public float getInitialDuration();
119119

120120
/**
121-
* Sets the duration of the animation at speed = 1 in seconds
122-
*
121+
* Sets the duration of the animation at speed = 1, in seconds.
122+
*
123123
* @param initialDuration the desired duration (in de-scaled seconds)
124124
*/
125125
public void setInitialDuration(float initialDuration);
@@ -138,8 +138,9 @@ public interface CinematicEvent extends Savable {
138138
public void initEvent(Application app, Cinematic cinematic);
139139

140140
/**
141-
* When this method is invoked, the event should fast forward to the given time according time 0 is the start of the event.
142-
* @param time the time to fast forward to
141+
* Fast-forwards to the given time, where time=0 is the start of the event.
142+
*
143+
* @param time the time to fast-forward to
143144
*/
144145
public void setTime(float time);
145146

jme3-core/src/main/java/com/jme3/effect/shapes/EmitterMeshConvexHullShape.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ public EmitterMeshConvexHullShape(List<Mesh> meshes) {
6060
}
6161

6262
/**
63-
* This method fills the point with coordinates of randomly selected point inside a convex hull
64-
* of randomly selected mesh.
63+
* Randomly selects a point inside the convex hull
64+
* of a randomly selected mesh.
65+
*
6566
* @param store
66-
* the variable to store with coordinates of randomly selected selected point inside a convex hull
67-
* of randomly selected mesh
67+
* storage for the coordinates of the selected point
6868
*/
6969
@Override
7070
public void getRandomPoint(Vector3f store) {
@@ -75,12 +75,12 @@ public void getRandomPoint(Vector3f store) {
7575
}
7676

7777
/**
78-
* This method fills the point with coordinates of randomly selected point inside a convex hull
79-
* of randomly selected mesh.
80-
* The normal param is not used.
78+
* Randomly selects a point inside the convex hull
79+
* of a randomly selected mesh.
80+
* The {@code normal} argument is not used.
81+
*
8182
* @param store
82-
* the variable to store with coordinates of randomly selected selected point inside a convex hull
83-
* of randomly selected mesh
83+
* storage for the coordinates of the selected point
8484
* @param normal
8585
* not used in this class
8686
*/

jme3-core/src/main/java/com/jme3/effect/shapes/EmitterMeshFaceShape.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ public void setMeshes(List<Mesh> meshes) {
8282
}
8383

8484
/**
85-
* This method fills the point with coordinates of randomly selected point on a random face.
85+
* Randomly selects a point on a random face.
86+
*
8687
* @param store
87-
* the variable to store with coordinates of randomly selected selected point on a random face
88+
* storage for the coordinates of the selected point
8889
*/
8990
@Override
9091
public void getRandomPoint(Vector3f store) {
@@ -102,12 +103,13 @@ public void getRandomPoint(Vector3f store) {
102103
}
103104

104105
/**
105-
* This method fills the point with coordinates of randomly selected point on a random face.
106-
* The normal param is filled with selected face's normal.
106+
* Randomly selects a point on a random face.
107+
* The {@code normal} argument is set to the normal of the selected face.
108+
*
107109
* @param store
108-
* the variable to store with coordinates of randomly selected selected point on a random face
110+
* storage for the coordinates of the selected point
109111
* @param normal
110-
* filled with selected face's normal
112+
* storage for the normal of the selected face
111113
*/
112114
@Override
113115
public void getRandomPointAndNormal(Vector3f store, Vector3f normal) {

jme3-core/src/main/java/com/jme3/environment/LightProbeFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
import java.util.concurrent.ScheduledThreadPoolExecutor;
4444

4545
/**
46-
* This Factory creates LightProbes within a scene, given an EnvironmentCamera.
46+
* Creates LightProbes within a scene, given an EnvironmentCamera.
4747
*
48-
* Since the process can be long, you can provide a JobProgressListener that
48+
* Since this process can take a long time, you can provide a JobProgressListener that
4949
* will be notified of the ongoing generation process when calling the makeProbe method.
5050
*
5151
* The process is as follows:

jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private EnvMapUtils() {
105105
* right image
106106
* @param downImg the bottom side image, also called negative y (negY) or
107107
* down image
108-
* @param upImg the up side image, also called positive y (posY) or up image
108+
* @param upImg the top side image, also called positive y (posY) or up image
109109
* @param backImg the south side image, also called positive z (posZ) or
110110
* back image
111111
* @param frontImg the north side image, also called negative z (negZ) or
@@ -419,7 +419,7 @@ public static Vector3f[] getSphericalHarmonicsCoefficents(TextureCubeMap cubeMap
419419
* The method used is the one from this article:
420420
* http://graphics.stanford.edu/papers/envmap/envmap.pdf
421421
*
422-
* Also good resources on spherical harmonics
422+
* Another good resource for spherical harmonics:
423423
* http://dickyjim.wordpress.com/2013/09/04/spherical-harmonics-for-beginners/
424424
*
425425
* @param cubeMap the environment cube map to compute SH for

jme3-core/src/main/java/com/jme3/export/FormatVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public final class FormatVersion {
4444
public static final int VERSION = 2;
4545

4646
/**
47-
* Signature of the format. Currently "JME3" as ASCII
47+
* Signature of the format: currently, "JME3" as ASCII.
4848
*/
4949
public static final int SIGNATURE = 0x4A4D4533;
5050

0 commit comments

Comments
 (0)