Typos in com.jme3.scene.*

I request permission to push the following corrections to comments into ‘master’. I also propose to change line endings to LineFeed-only/Unix where they differ.

In jme3-core\src\main\java\com\jme3\scene\control\AreaUtils.java:

--- HEAD
+++ Modified In Working Tree
@@ -46,9 +46,8 @@
 public class AreaUtils {
 
   /**
-   * calcScreenArea -- in Pixels
-   * Aproximates the screen area of a bounding volume.  If the volume isn't a
-   * BoundingSphere, BoundingBox, or OrientedBoundingBox 0 is returned.
\ No newline at end of file
+   * Estimate the screen area of a bounding volume. If the volume isn't a
+   * BoundingSphere, BoundingBox, or OrientedBoundingBox, 0 is returned.
\ No newline at end of file
    *
    * @param bound The bounds to calculate the volume from.
    * @param distance The distance from camera to object.

“Approximates” was misspelled, but the comment becomes confusing when formatted, so I rephrased it.

In jme3-core\src\main\java\com\jme3\scene\Geometry.java:

--- HEAD
+++ Modified In Working Tree
@@ -76,7 +76,7 @@
      */
     protected BatchNode batchNode = null;
     /**
-     * the start index of this geom's mesh in the batchNode mesh
+     * the start index of this geometry's mesh in the batchNode mesh
      */
     protected int startIndex;    
     /**
@@ -201,9 +201,9 @@
     }
 
     /**
-     * Returns the mseh to use for this geometry
+     * Returns the mesh to use for this geometry
      * 
-     * @return the mseh to use for this geometry
+     * @return the mesh to use for this geometry
      * 
      * @see #setMesh(com.jme3.scene.Mesh) 
      */
@@ -472,9 +472,8 @@
     }
 
     /**
-     * Creates a deep clone of the geometry,
-     * this creates an identical copy of the mesh
-     * with the vertexbuffer data duplicated.
+     * Create a deep clone of the geometry. This creates an identical copy of
+     * the mesh with the vertex buffer data duplicated.
      */
     @Override
     public Spatial deepClone() {

In jme3-core\src\main\java\com\jme3\scene\Node.java:

--- HEAD
+++ Modified In Working Tree
@@ -76,9 +76,8 @@
      * Constructor instantiates a new <code>Node</code> with a default empty
      * list for containing children.
      * 
-     * @param name
-     *            the name of the scene element. This is required for
-     *            identification and comparision purposes.
+     * @param name the name of the scene element. This is required for
+     * identification and comparison purposes.
      */
     public Node(String name) {
         super(name);

In jme3-core\src\main\java\com\jme3\scene\debug\SkeletonPoints.java:

--- HEAD
+++ Modified In Working Tree
@@ -90,7 +90,7 @@
     }
 
     /**
-     * The method updates the geometry according to the poitions of the bones.
+     * The method updates the geometry according to the positions of the bones.
      */
     public void updateGeometry() {
         VertexBuffer vb = this.getBuffer(Type.Position);

In jme3-core\src\main\java\com\jme3\scene\shape\Surface.java:

--- HEAD
+++ Modified In Working Tree
@@ -257,13 +257,15 @@
     }
 
     /**
-     * This method adds a normal to a normals' map. This map is used to merge normals of a vertor that should be rendered smooth.
+     * This method adds a normal to a normal's map. This map is used to merge
+     * normals of a vector that should be rendered smooth.
+     *
      * @param normalToAdd
      *            a normal to be added
      * @param normalMap
      *            merges normals of faces that will be rendered smooth; the key is the vertex and the value - its normal vector
-     * @param smooth
-     *            the variable that indicates wheather to merge normals (creating the smooth mesh) or not
+     * @param smooth the variable that indicates whether to merge normals
+     * (creating the smooth mesh) or not
      * @param vertices
      *            a list of vertices read from the blender file
      */

In jme3-core\src\main\java\com\jme3\scene\shape\Torus.java:

--- HEAD
+++ Modified In Working Tree
@@ -73,10 +73,8 @@
      *            The number of samples along the circles.
      * @param radialSamples
      *            The number of samples along the radial.
-     * @param innerRadius
-     *            The radius of the inner begining of the Torus.
-     * @param outerRadius
-     *            The radius of the outter end of the Torus.
+     * @param innerRadius The radius of the inner beginning of the Torus.
+     * @param outerRadius The radius of the outer end of the Torus.
      */
     public Torus(int circleSamples, int radialSamples,
             float innerRadius, float outerRadius) {
@@ -226,8 +224,8 @@
      * 
      * @param circleSamples the number of samples along the circles.
      * @param radialSamples the number of samples along the radial.
-     * @param innerRadius the radius of the inner begining of the Torus.
-     * @param outerRadius the radius of the outter end of the Torus.
\ No newline at end of file
+     * @param innerRadius the radius of the inner beginning of the Torus.
+     * @param outerRadius the radius of the outer end of the Torus.
\ No newline at end of file
      */
     public void updateGeometry(int circleSamples, int radialSamples, float innerRadius, float outerRadius) {
         this.circleSamples = circleSamples;

A torus has no beginning and no end, so I’m unsure what the “inner beginning” or the “outer end” of a torus refers to. Can anyone suggest better terminology?

In jme3-core\src\main\java\com\jme3\scene\VertexBuffer.java:

--- HEAD
+++ Modified In Working Tree
@@ -84,11 +84,12 @@
          */
         Color,
 
-        /**
-         * Tangent vector, normalized (4 floats) (x,y,z,w)
-         * the w component is called the binormal parity, is not normalized and is either 1f or -1f
-         * It's used to compuste the direction on the binormal verctor on the GPU at render time.
-         */
+	/**
+	 * Tangent vector, normalized (4 floats) (x,y,z,w). The w component is
+	 * called the binormal parity, is not normalized, and is either 1f or
+	 * -1f. It's used to compute the direction on the binormal vector on the
+	 * GPU at render time.
+	 */
         Tangent,
 
         /**
@sgold said:

A torus has no beginning and no end, so I’m unsure what the “inner beginning” or the “outer end” of a torus refers to. Can anyone suggest better terminology?

Radius of the innermost surface/ring. Radius of the outermost surface/ring?

Beginning and end seem wrong. One is the radius of the hole and the other is the radius of the torus.

According to Wikipedia, a torus has a “major radius” and a “minor radius”.

I like “radius of the hole”. However, by experimenting I’ve determined that the innerRadius parameter is actually the minor radius, not the radius of the hole. The radius of the hole is outerRadius - innerRadius.

As implemented, the radius of the rim of the torus is actually outerRadius + innerRadius.

it appears that the “radius of the outter end” can more accurately be described as the “major radius”.

Here is an amended diff for jme3-core\src\main\java\com\jme3\scene\shape\Torus.java:

--- HEAD
+++ Modified In Working Tree
@@ -57,9 +57,13 @@
     private int circleSamples;
 
     private int radialSamples;
-
+    /**
+     * minor radius of the torus
+     */
     private float innerRadius;
-
+    /**
+     * major radius of the torus
+     */
     private float outerRadius;
 
     public Torus() {
@@ -73,10 +77,8 @@
      *            The number of samples along the circles.
      * @param radialSamples
      *            The number of samples along the radial.
-     * @param innerRadius
-     *            The radius of the inner begining of the Torus.
-     * @param outerRadius
-     *            The radius of the outter end of the Torus.
+     * @param innerRadius minor radius of the torus
+     * @param outerRadius major radius of the torus
      */
     public Torus(int circleSamples, int radialSamples,
             float innerRadius, float outerRadius) {
@@ -226,8 +228,8 @@
      * 
      * @param circleSamples the number of samples along the circles.
      * @param radialSamples the number of samples along the radial.
-     * @param innerRadius the radius of the inner begining of the Torus.
-     * @param outerRadius the radius of the outter end of the Torus.
\ No newline at end of file
+     * @param innerRadius minor radius of the torus
+     * @param outerRadius major radius of the torus
\ No newline at end of file
      */
     public void updateGeometry(int circleSamples, int radialSamples, float innerRadius, float outerRadius) {
         this.circleSamples = circleSamples;

Heheh… nice. So “outer” and “inner” are total misnomers.

Still waiting for permission…

You have my permission for what it’s worth. Sorry if I delayed things.

Thanks, @pspeed. There’s surely no rush to fix typos.

Commited 4a69eee on jmonkeyengine/master

To see recent commits, go to https://github.com/jMonkeyEngine/jmonkeyengine/commits/master

Looks like Surface.java line endings got changed.