Skip to content

Commit 29f5872

Browse files
committed
more javadoc improvements
1 parent 65af369 commit 29f5872

File tree

13 files changed

+71
-31
lines changed

13 files changed

+71
-31
lines changed

jme3-android/src/main/java/com/jme3/renderer/android/RendererUtil.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2019 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -71,6 +71,8 @@ public static void checkGLErrorForced() {
7171
/**
7272
* Checks for an EGL error and throws a {@link RendererException} if there
7373
* is one. Ignores the value of {@link RendererUtil#ENABLE_ERROR_CHECKING}.
74+
*
75+
* @param egl (not null)
7476
*/
7577
public static void checkEGLError(EGL10 egl) {
7678
int error = egl.eglGetError();

jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglAbstractDisplay.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -68,7 +68,7 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna
6868

6969
/**
7070
* Set the title if it's a windowed display
71-
* @param title
71+
* @param title the desired title
7272
*/
7373
@Override
7474
public abstract void setTitle(String title);
@@ -81,7 +81,8 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna
8181

8282
/**
8383
* Apply the settings, changing resolution, etc.
84-
* @param settings
84+
* @param settings the AppSettings to apply
85+
* @throws LWJGLException for various error conditions
8586
*/
8687
protected abstract void createContext(AppSettings settings) throws LWJGLException;
8788

@@ -92,6 +93,8 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna
9293

9394
/**
9495
* Does LWJGL display initialization in the OpenGL thread
96+
*
97+
* @return true if successful, otherwise false
9598
*/
9699
protected boolean initInThread() {
97100
try {

jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -297,6 +297,9 @@ public void run(){
297297
/**
298298
* It seems it is best to use one pixel format for all shared contexts.
299299
* @see <a href="http://developer.apple.com/library/mac/#qa/qa1248/_index.html">http://developer.apple.com/library/mac/#qa/qa1248/_index.html</a>
300+
*
301+
* @param forPbuffer true&rarr;zero samples, false&rarr;correct number of samples
302+
* @return a new instance
300303
*/
301304
protected PixelFormat acquirePixelFormat(boolean forPbuffer){
302305
if (forPbuffer){
@@ -333,6 +336,8 @@ protected PixelFormat acquirePixelFormat(boolean forPbuffer){
333336

334337
/**
335338
* Makes sure the pbuffer is available and ready for use
339+
*
340+
* @throws LWJGLException if the buffer can't be made current
336341
*/
337342
protected void makePbufferAvailable() throws LWJGLException{
338343
if (pbuffer != null && pbuffer.isBufferLost()){

jme3-niftygui/src/main/java/com/jme3/niftygui/InputSystemJme.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -73,7 +73,7 @@ public void setResourceLoader(NiftyResourceLoader niftyResourceLoader) {
7373
/**
7474
* Must be set in order for nifty events to be forwarded correctly.
7575
*
76-
* @param nifty
76+
* @param nifty the Nifty instance to use
7777
*/
7878
public void setNifty(Nifty nifty) {
7979
this.nifty = nifty;

jme3-niftygui/src/main/java/com/jme3/niftygui/JmeBatchRenderBackend.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -347,7 +347,8 @@ public void removeImageFromAtlas(final Image image, final int x, final int y, fi
347347
* {@link de.lessvoid.nifty.render.batch.spi.BatchRenderBackend}
348348
* implementation
349349
*
350-
* @param shouldUseHighQualityTextures
350+
* @param shouldUseHighQualityTextures true&rarr;higher quality,
351+
* false&rarr;lower quality
351352
*/
352353
@Override
353354
public void useHighQualityTextures(final boolean shouldUseHighQualityTextures) {
@@ -362,7 +363,8 @@ public void useHighQualityTextures(final boolean shouldUseHighQualityTextures) {
362363
* debugging when visually inspecting the atlas, since there will not be
363364
* portions of old images visible in currently unused atlas space.
364365
*
365-
* @param shouldFill
366+
* @param shouldFill true&rarr;overwrite with blank data, false&rarr;don't
367+
* overwrite
366368
*/
367369
@Override
368370
public void fillRemovedImagesInAtlas(final boolean shouldFill) {

jme3-niftygui/src/main/java/com/jme3/niftygui/RenderFontJme.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2012 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@ public class RenderFontJme implements RenderFont {
4444
/**
4545
* Initialize the font.
4646
* @param name font filename
47-
* @param display
47+
* @param display (not null)
4848
*/
4949
public RenderFontJme(String name, NiftyJmeDisplay display) {
5050
font = display.getAssetManager().loadFont(name);

jme3-niftygui/src/main/java/com/jme3/niftygui/SoundHandleJme.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2018 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -55,9 +55,10 @@ public SoundHandleJme(AudioRenderer ar, AudioNode node){
5555

5656
/**
5757
* For streaming music only. (May need to loop..)
58-
* @param ar
59-
* @param am
60-
* @param fileName
58+
*
59+
* @param ar for rendering audio
60+
* @param am the AssetManager for loading assets
61+
* @param fileName the path to the audio asset (not null)
6162
*/
6263
public SoundHandleJme(AudioRenderer ar, AssetManager am, String fileName){
6364
if (ar == null || am == null) {

jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/AnimationList.java

+14-8
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,23 @@ public class AnimationList {
4747

4848
/**
4949
* Use in the case of multiple animation layers in FBX asset
50-
* @param name - animation name to access via {@link com.jme3.animation.AnimControl}
51-
*/
50+
*
51+
* @param name - animation name to access via {@link com.jme3.animation.AnimControl}
52+
* @param firstFrame the index of the first frame
53+
* @param lastFrame the index of the last frame
54+
*/
5255
public void add(String name, int firstFrame, int lastFrame) {
5356
add(name, null, firstFrame, lastFrame);
5457
}
55-
56-
/**
57-
* Use in the case of multiple animation layers in FBX asset
58-
* @param name - animation name to access via {@link com.jme3.animation.AnimControl}
59-
* @param layerName - source layer
60-
*/
58+
59+
/**
60+
* Use in the case of multiple animation layers in FBX asset
61+
*
62+
* @param name - animation name to access via {@link com.jme3.animation.AnimControl}
63+
* @param layerName - source layer
64+
* @param firstFrame the index of the first frame
65+
* @param lastFrame the index of the last frame
66+
*/
6167
public void add(String name, String layerName, int firstFrame, int lastFrame) {
6268
AnimInverval cue = new AnimInverval();
6369
cue.name = name;

jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/mesh/FbxMesh.java

+2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ protected IntMap<Mesh> toJmeObject() {
252252

253253
/**
254254
* Convert FBXMesh to IRMesh.
255+
*
256+
* @return a new IrMesh
255257
*/
256258
public IrMesh toIRMesh() {
257259
IrMesh newMesh = new IrMesh();

jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/ExtensionLoader.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -51,6 +51,7 @@ public interface ExtensionLoader {
5151
* @param extension the content of the extension found in the element being read
5252
* @param input an object containing already loaded data from the element, this is most probably a JME object
5353
* @return An object of the same type as input, containing the data from the input object and the eventual additional data read from the extension
54+
* @throws IOException for various error conditions
5455
*/
5556
Object handleExtension(GltfLoader loader, String parentName, JsonElement parent, JsonElement extension, Object input) throws IOException;
5657

jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfModelKey.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -109,7 +109,7 @@ public ExtrasLoader getExtrasLoader() {
109109
/**
110110
* Sets the ExtrasLoader for reading any extra information from the gltf file.
111111
*
112-
* @param extrasLoader
112+
* @param extrasLoader the desired loader
113113
*/
114114
public void setExtrasLoader(ExtrasLoader extrasLoader) {
115115
this.extrasLoader = extrasLoader;

jme3-plugins/src/main/java/com/jme3/scene/plugins/IrUtils.java

+19-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ private static IrPolygon[] quadToTri(IrPolygon quad) {
102102
}
103103

104104
/**
105-
* Applies smoothing groups to vertex normals.
105+
* Applies smoothing groups to vertex normals. XXX not implemented!
106+
*
107+
* @param mesh ignored
108+
* @return null
106109
*/
107110
public static IrMesh applySmoothingGroups(IrMesh mesh) {
108111
return null;
@@ -125,6 +128,11 @@ public static void toTangentsWithParity(IrMesh mesh) {
125128
}
126129
}
127130

131+
/**
132+
* Removes low bone weights from mesh, leaving only 4 bone weights at max.
133+
*
134+
* @param vertex the IrVertex to modify (not null)
135+
*/
128136
private static void trimBoneWeights(IrVertex vertex) {
129137
if (vertex.boneWeightsIndices == null) {
130138
return;
@@ -163,6 +171,8 @@ private static void trimBoneWeights(IrVertex vertex) {
163171

164172
/**
165173
* Removes low bone weights from mesh, leaving only 4 bone weights at max.
174+
*
175+
* @param mesh the IrMesh to modify (not null)
166176
*/
167177
public static void trimBoneWeights(IrMesh mesh) {
168178
for (IrPolygon polygon : mesh.polygons) {
@@ -174,6 +184,8 @@ public static void trimBoneWeights(IrMesh mesh) {
174184

175185
/**
176186
* Convert mesh from quads / triangles to triangles only.
187+
*
188+
* @param mesh the input IrMesh (not null)
177189
*/
178190
public static void triangulate(IrMesh mesh) {
179191
List<IrPolygon> newPolygons = new ArrayList<>(mesh.polygons.length);
@@ -200,6 +212,9 @@ public static void triangulate(IrMesh mesh) {
200212
* one material each.
201213
*
202214
* Polygons without a material will be added to key = -1.
215+
*
216+
* @param mesh the input IrMesh (not null)
217+
* @return a new IntMap containing the resulting meshes
203218
*/
204219
public static IntMap<IrMesh> splitByMaterial(IrMesh mesh) {
205220
IntMap<List<IrPolygon>> materialToPolyList = new IntMap<>();
@@ -239,6 +254,9 @@ public static IntMap<IrMesh> splitByMaterial(IrMesh mesh) {
239254

240255
/**
241256
* Convert IrMesh to jME3 mesh.
257+
*
258+
* @param mesh the input IrMesh (not null)
259+
* @return a new Mesh
242260
*/
243261
public static Mesh convertIrMeshToJmeMesh(IrMesh mesh) {
244262
Map<IrVertex, Integer> vertexToVertexIndex = new HashMap<>();

jme3-plugins/src/xml/java/com/jme3/export/xml/DOMSerializer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2012 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -87,7 +87,7 @@ private void escape(Writer writer, String s) throws IOException {
8787
*
8888
* @param doc the document to serialize.
8989
* @param file the file to serialize to.
90-
* @throws IOException
90+
* @throws IOException for various error conditions
9191
*/
9292
public void serialize(Document doc, File file) throws IOException {
9393
serialize(doc, new FileOutputStream(file));
@@ -98,7 +98,7 @@ public void serialize(Document doc, File file) throws IOException {
9898
*
9999
* @param doc the document to serialize.
100100
* @param out the stream to serialize to.
101-
* @throws IOException
101+
* @throws IOException for various error conditions
102102
*/
103103
public void serialize(Document doc, OutputStream out) throws IOException {
104104
Writer writer = new OutputStreamWriter(out, encoding);

0 commit comments

Comments
 (0)