Skip to content

Commit

Permalink
javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed May 16, 2024
1 parent cffd146 commit addc0ba
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,8 @@ private static void readCatalog() {
/**
* Read the catalog line by line and use the data therein to build up the
* collection of stars.
*
* @param bufferedReader the reader to use (not null)
*/
private static void readCatalog(BufferedReader bufferedReader)
throws IOException, InvalidEntryException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public int compareTo(Star other) {
// Object methods

/**
* Test whether this star is equivalent to another.
* Test for equality with another object.
*
* @param otherObject the object to compare (may be null, unaffected)
* @return true if equivalent, otherwise false
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -75,6 +75,8 @@ enum StarMapPreset {

/**
* Look up the textual description of this preset.
*
* @return a description (not null, not empty)
*/
String describe() {
switch (this) {
Expand Down Expand Up @@ -143,7 +145,7 @@ float hour() {
}

/**
* Look up the observer's latitude for this preset.
* Return the observer's latitude for this preset.
*
* @return radians north of the equator (≤Pi/2, ≥-Pi/2)
*/
Expand All @@ -169,7 +171,9 @@ float latitude() {
}

/**
* Look up the name of the texture asset file or folder for this preset.
* Return the name of the texture asset file or folder for this preset.
*
* @return the name (not null, not empty)
*/
String textureFileName() {
switch (this) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2022-2023, Stephen Gold
Copyright (c) 2022-2024 Stephen Gold
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -283,6 +283,9 @@ private static void executeChosenApp() {
/**
* Look for the shell script (or batch file) to execute in
* "./build/install/tests/bin".
*
* @return a new file instance that refers to a pre-existing script file
* (not null)
*/
private static File findScriptToExecute() {
File buildDir = new File("build");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014-2023, Stephen Gold
Copyright (c) 2014-2024 Stephen Gold
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -192,6 +192,7 @@ private void initializeSky() {
* Load an inverted splat texture asset in "repeat" mode.
*
* @param fileName (not null)
* @return a new texture instance
*/
private Texture loadSplatTexture(String fileName) {
assert fileName != null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2014-2023, Stephen Gold
Copyright (c) 2014-2024 Stephen Gold
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -227,6 +227,7 @@ private void initializeSky() {
* Load an inverted splat texture asset in "repeat" mode.
*
* @param fileName (not null)
* @return a new texture instance
*/
private Texture loadSplatTexture(String fileName) {
assert fileName != null;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -283,6 +283,8 @@ public void write(JmeExporter exporter) throws IOException {

/**
* Create a circular monument that vaguely resembles Stonehenge.
*
* @return a new scene-graph node
*/
private Node createMonument() {
Material stoneMaterial
Expand Down Expand Up @@ -333,6 +335,8 @@ private Node createMonument() {

/**
* Load terrain from assets.
*
* @return a new terrain instance
*/
private TerrainQuad createTerrain() {
// Create the terrain quad.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -179,14 +179,16 @@ boolean getAmbientFlag() {
}

/**
* Read the ambient light multiplier.
* Return the ambient light multiplier.
*
* @return the gain factor
*/
float getAmbientMultiplier() {
return ambientMultiplier;
}

/**
* Read the status of the "enable bloom" check box.
* Return the status of the "enable bloom" check box.
*
* @return true if the box is checked, otherwise false
*/
Expand All @@ -196,7 +198,7 @@ boolean getBloomFlag() {
}

/**
* Read the status of the "enable cartoon" check box.
* Return the status of the "enable cartoon" check box.
*
* @return true if the box is checked, otherwise false
*/
Expand All @@ -206,7 +208,7 @@ boolean getCartoonFlag() {
}

/**
* Read the current opacity of the clouds.
* Return the opacity of the clouds.
*
* @return maximum opacity (≤1, ≥0)
*/
Expand All @@ -217,7 +219,7 @@ float getCloudiness() {
}

/**
* Read the current state of the cloud modulation flag.
* Return the state of the cloud modulation flag.
*
* @return true if clouds should modulate the main light, false for steady
* light
Expand All @@ -227,7 +229,7 @@ boolean getCloudModulation() {
}

/**
* Read the current rate of motion of clouds.
* Return the rate of cloud motion.
*
* @return rate relative to the standard rate (negative means reverse)
*/
Expand All @@ -236,7 +238,7 @@ float getCloudsRate() {
}

/**
* Read the current vertical offset of the clouds-only dome.
* Return the current vertical offset of the clouds-only dome.
*
* @return offset as a fraction of dome height (<1, ≥0)
*/
Expand All @@ -247,7 +249,7 @@ float getCloudsYOffset() {
}

/**
* Read the status of the "enable floor" check box.
* Return the status of the "enable floor" check box.
*
* @return true if the box is checked, otherwise false
*/
Expand All @@ -257,7 +259,7 @@ boolean getFloorFlag() {
}

/**
* Read the current solar time.
* Return the current solar time.
*
* @return hours since midnight (<24, ≥0)
*/
Expand All @@ -270,7 +272,7 @@ float getHour() {
}

/**
* Read the status of the "enable landscape" check box.
* Return the status of the "enable landscape" check box.
*
* @return true if the box is checked, otherwise false
*/
Expand All @@ -280,7 +282,7 @@ boolean getLandscapeFlag() {
}

/**
* Read the observer's latitude.
* Return the observer's latitude.
*
* @return angle (radians north of the Equator, ≤Pi/2, ≥-Pi/2)
*/
Expand All @@ -291,7 +293,7 @@ float getLatitude() {
}

/**
* Read the angular diameter of the moon.
* Return the angular diameter of the moon.
*
* @return diameter (in radians, <Pi, >0)
*/
Expand All @@ -302,7 +304,7 @@ float getLunarDiameter() {
}

/**
* Read the celestial latitude for a custom moon.
* Return the celestial latitude for a custom moon.
*
* @return radians north of the ecliptic (≤Pi/2, ≥-Pi/2)
*/
Expand All @@ -313,7 +315,7 @@ float getLunarLatitude() {
}

/**
* Read the longitude difference for a custom moon.
* Return the longitude difference for a custom moon.
*
* @return radians east of the sun (≤2*Pi, ≥0)
*/
Expand All @@ -324,7 +326,7 @@ float getLongitudeDifference() {
}

/**
* Read the phase of the moon.
* Return the phase of the moon.
*
* @return preset value, or null for hidden moon
*/
Expand All @@ -333,7 +335,7 @@ LunarPhase getLunarPhase() {
}

/**
* Read the status of the "enable main light" check box.
* Return the status of the "enable main light" check box.
*
* @return true if the box is checked, otherwise false
*/
Expand All @@ -343,14 +345,16 @@ boolean getMainLightFlag() {
}

/**
* Read the main light multiplier.
* Return the main-light multiplier.
*
* @return the gain factor
*/
float getMainMultiplier() {
return mainMultiplier;
}

/**
* Read the current vertical relief of the terrain.
* Return the current vertical relief of the terrain.
*
* @return Y-coordinate of peak (>0)
*/
Expand All @@ -360,7 +364,7 @@ float getRelief() {
}

/**
* Read the status of the "enable shadow filters" check box.
* Return the status of the "enable shadow filters" check box.
*
* @return true if the box is checked, otherwise false
*/
Expand All @@ -370,7 +374,7 @@ boolean getShadowFiltersFlag() {
}

/**
* Read the status of the "enable sky" check box.
* Return the status of the "enable sky" check box.
*
* @return true if the box is checked, otherwise false
*/
Expand All @@ -380,7 +384,7 @@ boolean getSkyFlag() {
}

/**
* Read the diameter of the sun.
* Return the diameter of the sun.
*
* @return angular diameter (in radians, <Pi, >0)
*/
Expand All @@ -391,7 +395,7 @@ float getSolarDiameter() {
}

/**
* Read the current solar longitude.
* Return the longitude of the sun.
*
* @return radians east of March equinox (≤2*Pi, ≥0)
*/
Expand All @@ -402,7 +406,7 @@ float getSolarLongitude() {
}

/**
* Read the star map name.
* Return the name of the star map.
*
* @return name (not null)
*/
Expand All @@ -412,7 +416,7 @@ String getStarMapName() {
}

/**
* Read the sun's color map.
* Return the sun's color map.
*
* @return asset path
*/
Expand All @@ -421,7 +425,7 @@ String getSunStyle() {
}

/**
* Read the current vertical angle for the top dome.
* Return the current vertical angle for the top dome.
*
* @return radians from top to rim (<Pi, >0)
*/
Expand Down
Loading

0 comments on commit addc0ba

Please sign in to comment.