From c3da605040ff3626f2eed9d6386804a51d50cd82 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Thu, 25 Jan 2024 00:20:40 -0800 Subject: [PATCH] DomeMesh: "top" -> "apex" in javadoc and comments --- .../java/jme3utilities/mesh/DomeMesh.java | 41 ++++++++++--------- license.txt | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/HeartLibrary/src/main/java/jme3utilities/mesh/DomeMesh.java b/HeartLibrary/src/main/java/jme3utilities/mesh/DomeMesh.java index 7e5ad3a..101747c 100644 --- a/HeartLibrary/src/main/java/jme3utilities/mesh/DomeMesh.java +++ b/HeartLibrary/src/main/java/jme3utilities/mesh/DomeMesh.java @@ -1,5 +1,5 @@ /* - Copyright (c) 2013-2023, Stephen Gold + Copyright (c) 2013-2024 Stephen Gold All rights reserved. Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE /** * A 3-D, static, Triangles-mode mesh for a dome (or a pie-cut segment thereof) - * with radius=1, centered at the origin, with its top at (0,1,0) and its + * with radius=1, centered at the origin, with its apex at (0,1,0) and its * equator in the X-Z plane. *

* The key differences between this class and com.jme3.scene.shape.Dome are:

    @@ -66,15 +66,15 @@ public class DomeMesh extends Mesh { // constants and loggers /** - * default for the first (U) texture coordinate at the top of the dome + * default for the first (U) texture coordinate at the apex of the dome */ final public static float defaultTopU = 0.5f; /** - * default for the 2nd (V) texture coordinate at the top of the dome + * default for the 2nd (V) texture coordinate at the apex of the dome */ final public static float defaultTopV = 0.5f; /** - * default UV distance from top to rim + * default UV distance from apex to rim */ final public static float defaultUvScale = 0.44f; /** @@ -107,24 +107,25 @@ public class DomeMesh extends Mesh { */ private float segmentAngle; /** - * U-coordinate of the top (≤1, ≥0) + * U-coordinate of the apex (≤1, ≥0) */ private float topU; /** - * V-coordinate of the top (≤1, ≥0) + * V-coordinate of the apex (≤1, ≥0) */ private float topV; /** - * UV distance from top to equator (<0.5, >0) + * UV distance from apex to equator (<0.5, >0) */ private float uvScale; /** - * angle from top to rim (in radians, <Pi, >0, Pi/2 → hemisphere) + * angle from apex to rim (in radians, <Pi, >0, Pi/2 → + * hemisphere) */ private float verticalAngle; /** * number of samples in each longitudinal quadrant of the dome, including - * both the top and the rim (≥2) + * both the apex and the rim (≥2) */ private int quadrantSamples; /** @@ -154,7 +155,7 @@ protected DomeMesh() { * SkyMaterial. * * @param rimSamples number of samples around the rim (≥3) - * @param quadrantSamples number of samples from top to rim, inclusive + * @param quadrantSamples number of samples from apex to rim, inclusive * (≥2) */ public DomeMesh(int rimSamples, int quadrantSamples) { @@ -168,11 +169,11 @@ public DomeMesh(int rimSamples, int quadrantSamples) { * general form of the constructor. * * @param rimSamples number of samples around the rim (≥3) - * @param quadrantSamples number of samples from top to rim, inclusive + * @param quadrantSamples number of samples from apex to rim, inclusive * (≥2) - * @param topU U-coordinate of the top (≤1, ≥0) - * @param topV V-coordinate of the top (≤1, ≥0) - * @param uvScale UV distance from top to equator (<0.5, >0) + * @param topU U-coordinate of the apex (≤1, ≥0) + * @param topV V-coordinate of the apex (≤1, ≥0) + * @param uvScale UV distance from apex to equator (<0.5, >0) * @param inwardFacing if true, vertex normals point inward; if false, they * point outward */ @@ -230,7 +231,7 @@ public Vector2f directionUV(Vector3f direction) { // Avoid division by zero at the Y-axis. if (norm.y < 0f) { return null; - } else { // top + } else { // apex return new Vector2f(topU, topV); } } @@ -268,7 +269,7 @@ public float elevationAngle(float u, float v) { /** * Read the U-V scale of this dome. * - * @return UV distance from top to equator (<0.5, >0) + * @return UV distance from apex to equator (<0.5, >0) * @deprecated use {@link #getUvScale()} */ @Deprecated @@ -281,7 +282,7 @@ public float getUVScale() { /** * Read the U-V scale of this dome. * - * @return UV distance from top to equator (<0.5, >0) + * @return UV distance from apex to equator (<0.5, >0) */ public float getUvScale() { assert uvScale > 0f : uvScale; @@ -451,7 +452,7 @@ private void updateCoordinates() { } } - // The final vertex is at the top. + // The final vertex is at the apex. int topIndex = vertexCount - 1; logger.log(Level.INFO, "coords {0}", topIndex); locationArray[topIndex] = new Vector3f(0f, 1f, 0f); @@ -554,7 +555,7 @@ private void updateIndices() { } } /* - * The remaining (non-quad) triangles near the top of the dome + * The remaining (non-quad) triangles near the apex of the dome * are arranged by longitude, starting from the +X meridian and * proceeding counterclockwise as seen from +Y. */ diff --git a/license.txt b/license.txt index 352e22c..a3d3cdd 100644 --- a/license.txt +++ b/license.txt @@ -1,4 +1,4 @@ -jme3utilities software packages except Icosphere.java Copyright (c) 2013-2023 Stephen Gold +jme3utilities software packages except Icosphere.java Copyright (c) 2013-2024 Stephen Gold All rights reserved.