jme3-terrain JavaDoc corrections (comments only)

accellbaker
Stephen Gold 6 years ago
parent b2381e8aed
commit 5bf619cca3
  1. 5
      jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/LODGeomap.java
  2. 4
      jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainQuad.java
  3. 7
      jme3-terrain/src/main/java/com/jme3/terrain/heightmap/AbstractHeightMap.java
  4. 5
      jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FaultHeightMap.java
  5. 6
      jme3-terrain/src/main/java/com/jme3/terrain/heightmap/FluidSimHeightMap.java
  6. 12
      jme3-terrain/src/main/java/com/jme3/terrain/heightmap/MidpointDisplacementHeightMap.java
  7. 4
      jme3-terrain/src/main/java/com/jme3/terrain/heightmap/Namer.java

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009-2012 jMonkeyEngine * Copyright (c) 2009-2019 jMonkeyEngine
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * 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. * 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 lod level of detail of the mesh
* @param rightLod LOD of the right neighbour * @param rightLod LOD of the right neighbour
* @param topLod LOD of the top neighbour * @param topLod LOD of the top neighbour
@ -1068,7 +1067,7 @@ public class LODGeomap extends GeoMap {
* *
* @param x local x coordinate * @param x local x coordinate
* @param z local z coordinate * @param z local z coordinate
* @return * @return a new array or null
*/ */
protected Triangle[] getGridTrianglesAtPoint(float x, float z) { protected Triangle[] getGridTrianglesAtPoint(float x, float z) {
int gridX = (int) x; int gridX = (int) x;

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009-2012 jMonkeyEngine * Copyright (c) 2009-2019 jMonkeyEngine
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * 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. * 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) { protected void setNormalRecalcNeeded(Vector2f changedPoint) {
if (changedPoint == null) { // set needToRecalculateNormals() to false if (changedPoint == null) { // set needToRecalculateNormals() to false

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009-2012 jMonkeyEngine * Copyright (c) 2009-2019 jMonkeyEngine
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * Build a new array of height data with the scaled values.
* @return * @return a new array
*/ */
public float[] getScaledHeightMap() { public float[] getScaledHeightMap() {
float[] hm = new float[heightData.length]; 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 * <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() { public void erodeTerrain() {
//erode left to right //erode left to right

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

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

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

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

Loading…
Cancel
Save