Jelajahi Sumber

add javadoc to avoid Java15 "no comment" warnings

Stephen Gold 4 tahun lalu
induk
melakukan
4db02fae9d

+ 59 - 1
jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java

@@ -102,6 +102,14 @@ public class BoundingBox extends BoundingVolume {
         this.zExtent = source.zExtent;
     }
 
+    /**
+     * Instantiate a BoundingBox with the specified extremes.
+     *
+     * @param min the desired minimum coordinate value for each axis (not null,
+     * not altered)
+     * @param max the desired maximum coordinate value for each axis (not null,
+     * not altered)
+     */
     public BoundingBox(Vector3f min, Vector3f max) {
         setMinMax(min, max);
     }
@@ -1009,18 +1017,38 @@ public class BoundingBox extends BoundingVolume {
         return store;
     }
 
+    /**
+     * Determine the X-axis distance between the center and the boundary.
+     *
+     * @return the distance
+     */
     public float getXExtent() {
         return xExtent;
     }
 
+    /**
+     * Determine the Y-axis distance between the center and the boundary.
+     *
+     * @return the distance
+     */
     public float getYExtent() {
         return yExtent;
     }
 
+    /**
+     * Determine the Z-axis distance between the center and the boundary.
+     *
+     * @return the distance
+     */
     public float getZExtent() {
         return zExtent;
     }
 
+    /**
+     * Alter the X-axis distance between the center and the boundary.
+     *
+     * @param xExtent the desired distance (≥0)
+     */
     public void setXExtent(float xExtent) {
         if (xExtent < 0) {
             throw new IllegalArgumentException();
@@ -1029,6 +1057,11 @@ public class BoundingBox extends BoundingVolume {
         this.xExtent = xExtent;
     }
 
+    /**
+     * Alter the Y-axis distance between the center and the boundary.
+     *
+     * @param yExtent the desired distance (&ge;0)
+     */
     public void setYExtent(float yExtent) {
         if (yExtent < 0) {
             throw new IllegalArgumentException();
@@ -1037,6 +1070,11 @@ public class BoundingBox extends BoundingVolume {
         this.yExtent = yExtent;
     }
 
+    /**
+     * Alter the Z-axis distance between the center and the boundary.
+     *
+     * @param zExtent the desired distance (&ge;0)
+     */
     public void setZExtent(float zExtent) {
         if (zExtent < 0) {
             throw new IllegalArgumentException();
@@ -1045,6 +1083,12 @@ public class BoundingBox extends BoundingVolume {
         this.zExtent = zExtent;
     }
 
+    /**
+     * Determine the minimum coordinate value for each axis.
+     *
+     * @param store storage for the result (modified if not null)
+     * @return either storeResult or a new vector
+     */
     public Vector3f getMin(Vector3f store) {
         if (store == null) {
             store = new Vector3f();
@@ -1053,6 +1097,12 @@ public class BoundingBox extends BoundingVolume {
         return store;
     }
 
+    /**
+     * Determine the maximum coordinate value for each axis.
+     *
+     * @param store storage for the result (modified if not null)
+     * @return either storeResult or a new vector
+     */
     public Vector3f getMax(Vector3f store) {
         if (store == null) {
             store = new Vector3f();
@@ -1061,6 +1111,14 @@ public class BoundingBox extends BoundingVolume {
         return store;
     }
 
+    /**
+     * Reconfigure with the specified extremes.
+     *
+     * @param min the desired minimum coordinate value for each axis (not null,
+     * not altered)
+     * @param max the desired maximum coordinate value for each axis (not null,
+     * not altered)
+     */
     public void setMinMax(Vector3f min, Vector3f max) {
         this.center.set(max).addLocal(min).multLocal(0.5f);
         xExtent = FastMath.abs(max.x - center.x);
@@ -1090,4 +1148,4 @@ public class BoundingBox extends BoundingVolume {
     public float getVolume() {
         return (8 * xExtent * yExtent * zExtent);
     }
-}
+}

+ 9 - 0
jme3-core/src/main/java/com/jme3/system/JmeSystem.java

@@ -43,6 +43,9 @@ import java.nio.ByteBuffer;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+/**
+ * Utility class to access platform-dependant features.
+ */
 public class JmeSystem {
 
     private static final Logger logger = Logger.getLogger(JmeSystem.class.getName());
@@ -155,6 +158,12 @@ public class JmeSystem {
         return systemDelegate.showSettingsDialog(sourceSettings, loadFromRegistry);
     }
 
+    /**
+     * Determine which Platform (operating system and architecture) the
+     * application is running on.
+     *
+     * @return an enum value (not null)
+     */
     public static Platform getPlatform() {
         checkDelegate();
         return systemDelegate.getPlatform();

+ 17 - 3
jme3-core/src/main/java/com/jme3/system/Platform.java

@@ -31,6 +31,9 @@
  */
 package com.jme3.system;
 
+/**
+ * Enumerate known operating system/architecture pairs.
+ */
 public enum Platform {
 
     /**
@@ -122,9 +125,15 @@ public enum Platform {
      * Android x86
      */
     Android_X86,
-    
+
+    /**
+     * iOS on x86
+     */
     iOS_X86,
-    
+
+    /**
+     * iOS on ARM
+     */
     iOS_ARM,
     
     /**
@@ -133,7 +142,12 @@ public enum Platform {
     Android_Other;
     
     private final boolean is64bit;
-    
+
+    /**
+     * Test for a 64-bit address space.
+     *
+     * @return true if 64 bits, otherwise false
+     */
     public boolean is64Bit() {
         return is64bit;
     }

+ 3 - 0
jme3-core/src/main/java/com/jme3/util/BufferAllocator.java

@@ -3,6 +3,9 @@ package com.jme3.util;
 import java.nio.Buffer;
 import java.nio.ByteBuffer;
 
+/**
+ * Interface to create/destroy direct buffers.
+ */
 public interface BufferAllocator {
     /**
      * De-allocate a direct buffer.