From e2d4f91eef1cbcfa22a0c261b46c58866d9af4bd Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Tue, 26 Feb 2019 13:12:06 -0800 Subject: [PATCH] jme3-terrain JavaDoc corrections (comments only) --- .../java/com/jme3/terrain/geomipmap/LODGeomap.java | 5 ++--- .../java/com/jme3/terrain/geomipmap/TerrainQuad.java | 4 ++-- .../jme3/terrain/heightmap/AbstractHeightMap.java | 7 +++---- .../com/jme3/terrain/heightmap/FaultHeightMap.java | 5 +++-- .../jme3/terrain/heightmap/FluidSimHeightMap.java | 6 +++--- .../heightmap/MidpointDisplacementHeightMap.java | 12 ++++++------ .../main/java/com/jme3/terrain/heightmap/Namer.java | 4 ++-- 7 files changed, 21 insertions(+), 22 deletions(-) diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/LODGeomap.java b/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/LODGeomap.java index 8d4a489d6..4b10e5c59 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/LODGeomap.java +++ b/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; diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainQuad.java b/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainQuad.java index 679afcb70..7f41bd372 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainQuad.java +++ b/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 diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/AbstractHeightMap.java b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/AbstractHeightMap.java index 21c504528..c6466c17b 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/AbstractHeightMap.java +++ b/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 { /** * erodeTerrain 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 diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FaultHeightMap.java b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FaultHeightMap.java index d5594b19a..ea64c570c 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FaultHeightMap.java +++ b/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) { diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FluidSimHeightMap.java b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FluidSimHeightMap.java index d5aff587d..c532681d6 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FluidSimHeightMap.java +++ b/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; diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java index 7a53c9711..acfbc9881 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java +++ b/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; diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/Namer.java b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/Namer.java index a260d7b65..fdaffeb4f 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/Namer.java +++ b/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);