Selaa lähdekoodia

jme3-terrain JavaDoc corrections (comments only)

Stephen Gold 6 vuotta sitten
vanhempi
commit
e2d4f91eef

+ 2 - 3
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/LODGeomap.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -148,7 +148,6 @@ public class LODGeomap extends GeoMap {
      * Create the LOD index array that will seam its edges with its neighbour's LOD.
      * This is a scary method!!! It will break your mind.
      *
-     * @param store to store the index buffer
      * @param lod level of detail of the mesh
      * @param rightLod LOD of the right neighbour
      * @param topLod LOD of the top neighbour
@@ -1068,7 +1067,7 @@ public class LODGeomap extends GeoMap {
      *
      * @param x local x coordinate
      * @param z local z coordinate
-     * @return
+     * @return a new array or null
      */
     protected Triangle[] getGridTrianglesAtPoint(float x, float z) {
         int gridX = (int) x;

+ 2 - 2
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainQuad.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -852,7 +852,7 @@ public class TerrainQuad extends Node implements Terrain {
      * exists already, then it will grow the box to fit the new changedPoint.
      * If the affectedAreaBBox is null, then it will create one of unit size.
      *
-     * @param needToRecalculateNormals if null, will cause needToRecalculateNormals() to return false
+     * @param changedPoint a location to include
      */
     protected void setNormalRecalcNeeded(Vector2f changedPoint) {
         if (changedPoint == null) { // set needToRecalculateNormals() to false

+ 3 - 4
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/AbstractHeightMap.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -216,7 +216,7 @@ public abstract class AbstractHeightMap implements HeightMap {
 
     /**
      * Build a new array of height data with the scaled values.
-     * @return
+     * @return a new array
      */
     public float[] getScaledHeightMap() {
         float[] hm = new float[heightData.length];
@@ -351,9 +351,8 @@ public abstract class AbstractHeightMap implements HeightMap {
 
     /**
      * <code>erodeTerrain</code> is a convenience method that applies the FIR
-     * filter to a given height map. This simulates water errosion.
+     * filter to a given height map. This simulates water erosion.
      *
-     * @see setFilter
      */
     public void erodeTerrain() {
         //erode left to right

+ 3 - 2
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FaultHeightMap.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -97,7 +97,8 @@ public class FaultHeightMap extends AbstractHeightMap {
      * @param minFaultHeight Height modified on each side
      * @param maxFaultHeight Height modified on each side
      * @param seed A seed to feed the Random generator
-     * @see setFaultRange, setMinRadius, setMaxRadius
+     * @see #setMinRadius(float)
+     * @see #setMaxRadius(float) 
      */
     public FaultHeightMap(int size, int iterations, int faultType, int faultShape, float minFaultHeight, float maxFaultHeight, long seed) throws Exception {
         if (size < 0 || iterations < 0) {

+ 3 - 3
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FluidSimHeightMap.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -248,7 +248,7 @@ public class FluidSimHeightMap extends AbstractHeightMap {
      *
      * @param maxInitialHeight
      *                        the maximum initial height
-     * @see #setMinInitialHeight(int)
+     * @see #setMinInitialHeight(float)
      */
     public void setMaxInitialHeight(float maxInitialHeight) {
         this.maxInitialHeight = maxInitialHeight;
@@ -259,7 +259,7 @@ public class FluidSimHeightMap extends AbstractHeightMap {
      *
      * @param minInitialHeight
      *                        the minimum initial height
-     * @see #setMaxInitialHeight(int)
+     * @see #setMaxInitialHeight(float)
      */
     public void setMinInitialHeight(float minInitialHeight) {
         this.minInitialHeight = minInitialHeight;

+ 6 - 6
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -71,7 +71,7 @@ public class MidpointDisplacementHeightMap extends AbstractHeightMap {
      *          typically a good choice
      * @param seed
      *          A seed to feed the random number generator.
-     * @throw IllegalArgumentException if size is not a power of two plus one.
+     * @throws IllegalArgumentException if size is not a power of two plus one.
      */
     public MidpointDisplacementHeightMap(int size, float range, float persistence, long seed) {
         if (size < 0 || !FastMath.isPowerOfTwo(size - 1)) {
@@ -102,7 +102,7 @@ public class MidpointDisplacementHeightMap extends AbstractHeightMap {
      *          The factor by which the range will evolve at each iteration.
      *          A value of 0.5f will halve the range at each iteration and is
      *          typically a good choice
-     * @throw JMException if size is not a power of two plus one.
+     * @throws JMException if size is not a power of two plus one.
      */
     public MidpointDisplacementHeightMap(int size, float range, float persistence) throws Exception {
         this(size, range, persistence, new Random().nextLong());
@@ -110,7 +110,7 @@ public class MidpointDisplacementHeightMap extends AbstractHeightMap {
 
     /**
      * Generate the heightmap.
-     * @return
+     * @return true
      */
     @Override
     public boolean load() {
@@ -163,7 +163,7 @@ public class MidpointDisplacementHeightMap extends AbstractHeightMap {
      * @param stepSize the size of the square
      * @param offsetRange the offset range within a random value is picked and added to the average
      * @param random the random generator
-     * @return
+     * @return a new array or null
      */
     protected int[] doSquareStep(float[][] tempBuffer, int[] coords, int stepSize, float offsetRange, Random random) {
         float cornerAverage = 0;
@@ -195,7 +195,7 @@ public class MidpointDisplacementHeightMap extends AbstractHeightMap {
      * @param stepSize
      * @param offsetRange
      * @param random
-     * @return
+     * @return a new array or null
      */
     protected int[] doDiamondStep(float[][] tempBuffer, int[] coords, int stepSize, float offsetRange, Random random) {
         int cornerNbr = 0;

+ 2 - 2
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/Namer.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2018 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@ public interface Namer {
      * Gets a name for a heightmap tile given its cell id
      * @param x
      * @param y
-     * @return
+     * @return a tile name
      */
     public String getName(int x, int y);