JavaDoc fixes

I’m currently playing around with JMonkey and have encountered some class documentation issues, you may want to fix. Currently it’s only for 2 Terrain classes, but maybe I have the time to add more.

Please tell if I’m doing it wrong. (Any way to commit it myself?)



First patch (only formatting):

[patch]

Index: src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java

===================================================================

— src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java (revision 9270)

+++ src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java (working copy)

@@ -58,25 +58,26 @@

import java.util.logging.Logger;



/**

    • TerrainGrid itself is an actual TerrainQuad. Its four children are the visible four tiles.
  • *
    • <p>
    • TerrainGrid itself is an actual TerrainQuad. Its four children are the visible four tiles.</p>
    • </p><p>
  • The grid is indexed by cells. Each cell has an integer XZ coordinate originating at 0,0.
  • TerrainGrid will piggyback on the TerrainLodControl so it can use the camera for its
  • updates as well. It does this in the overwritten update() method.
  • *
    • </p><p>
  • It uses an LRU (Least Recently Used) cache of 16 terrain tiles (full TerrainQuadTrees). The
  • center 4 are the ones that are visible. As the camera moves, it checks what camera cell it is in
  • and will attach the now visible tiles.
  • *
    • The ‘quadIndex’ variable is a 4x4 array that represents the tiles. The center
    • </p><p>
    • The ‘quadIndex’ variable is a 4x4 array that represents the tiles. The center
  • four (index numbers: 5, 6, 9, 10) are what is visible. Each quadIndex value is an
  • offset vector. The vector contains whole numbers and represents how many tiles in offset
  • this location is from the center of the map. So for example the index 11 [Vector3f(2, 0, 1)]
  • is located 2terrainSize in X axis and 1terrainSize in Z axis.
  • *
    • </p><p>
  • As the camera moves, it tests what cameraCell it is in. Each camera cell covers four quad tiles
  • and is half way inside each one.
  • *
    • </p><pre>

+
+
* | 1 | 4 | Four terrainQuads that make up the grid
* | *..|..* | with the cameraCell in the middle, covering
@@ -84,22 +85,24 @@
* | *..|..* |
* | 2 | 3 |
* +
+
+
- *
+ * </pre><p>
* This results in the effect of when the camera gets half way across one of the sides of a quad to
* an empty (non-loaded) area, it will trigger the system to load in the next tiles.
- *
+ * </p><p>
* The tile loading is done on a background thread, and once the tile is loaded, then it is
* attached to the qrid quad tree, back on the OGL thread. It will grab the terrain quad from
* the LRU cache if it exists. If it does not exist, it will load in the new TerrainQuad tile.
- *
+ * </p><p>
* The loading of new tiles triggers events for any TerrainGridListeners. The events are:
- * -tile Attached
- * -tile Detached
- * -grid moved.
- *
+ * <ul>
+ * <li>tile Attached
+ * <li>tile Detached
+ * <li>grid moved.
+ * </ul>
+ * <p>
* These allow physics to update, and other operation (often needed for loading the terrain) to occur
* at the right time.
- *
+ * </p>
* @author Anthyon
*/
public class TerrainGrid extends TerrainQuad {
[/patch]
1 Like

[patch]

Index: src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java

===================================================================

— src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java (revision 9324)

+++ src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java (working copy)

@@ -65,16 +65,16 @@

import java.util.logging.Logger;



/**

    • <p>
  • A terrain quad is a node in the quad tree of the terrain system.
  • The root terrain quad will be the only one that receives the update() call every frame
  • and it will determine if there has been any LOD change.
  • *
    • </p><p>
  • The leaves of the terrain quad tree are Terrain Patches. These have the real geometry mesh.
  • *
  • *
    • </p><p>
  • Heightmap coordinates start from the bottom left of the world and work towards the
  • top right.
  • *
    • </p><pre>
  • +x
  • ^
  • | …N = length of heightmap

    @@ -83,7 +83,7 @@
  • | 0…:

> +z
* (world coordinates)
- *
+ * </pre>
* @author Brent Owens
*/
public class TerrainQuad extends Node implements Terrain {
[/patch]

Cool, I committed the patch. Thanks @slyh

Uhm, something went wrong with TerrainGrid.java.

The class signature is missing in the version you checked in:

[java]public class TerrainGrid extends TerrainQuad {[/java]

hmm I put it back in… oh, I didn’t save that part, haha

1 sec