Rename and move EFogSettings -> FogSettings

It wasn't an enum so the prefix and package were wrong
This commit is contained in:
James Seibel
2022-07-01 21:35:01 -05:00
parent 957466b419
commit 1855e27d29
3 changed files with 17 additions and 13 deletions
@@ -17,7 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.core.enums.rendering;
package com.seibel.lod.core.objects;
import com.seibel.lod.core.enums.rendering.EFogFalloff;
import java.util.Objects;
@@ -26,10 +28,10 @@ import java.util.Objects;
*
* @version 2022-4-13
*/
public class EFogSetting
public class FogSettings
{
/** a FogSetting object with 0 for every value */
public static final EFogSetting EMPTY = new EFogSetting(0, 0, 0, 0,0, EFogFalloff.LINEAR);
public static final FogSettings EMPTY = new FogSettings(0, 0, 0, 0,0, EFogFalloff.LINEAR);
public final double start;
@@ -39,7 +41,7 @@ public class EFogSetting
public final double density;
public final EFogFalloff fogType;
public EFogSetting(double start, double end, double min, double max, double density, EFogFalloff fogType)
public FogSettings(double start, double end, double min, double max, double density, EFogFalloff fogType)
{
this.start = start;
this.end = end;
@@ -56,7 +58,7 @@ public class EFogSetting
return true;
if (o == null || getClass() != o.getClass())
return false;
EFogSetting that = (EFogSetting) o;
FogSettings that = (FogSettings) o;
return Double.compare(that.start, start) == 0 && Double.compare(that.end, end) == 0 && Double.compare(that.min, min) == 0 && Double.compare(that.max, max) == 0 && Double.compare(that.density, density) == 0 && fogType == that.fogType;
}
@@ -25,6 +25,7 @@ import com.seibel.lod.core.enums.rendering.EFogDistance;
import com.seibel.lod.core.enums.rendering.*;
import com.seibel.lod.core.handlers.IReflectionHandler;
import com.seibel.lod.core.handlers.dependencyInjection.SingletonHandler;
import com.seibel.lod.core.objects.FogSettings;
import com.seibel.lod.core.render.objects.Shader;
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton;
@@ -50,8 +51,8 @@ public class LodFogConfig
public static final boolean DEBUG_DUMP_GENERATED_CODE = false;
public final EFogSetting farFogSetting;
public final EFogSetting heightFogSetting;
public final FogSettings farFogSetting;
public final FogSettings heightFogSetting;
public final EHeightFogMixMode heightFogMixMode;
public final EHeightFogMode heightFogMode;
public final float heightFogHeight;
@@ -239,8 +240,8 @@ public class LodFogConfig
str.append("// =======RUNTIME GENERATED DEFINE SECTION======== //\n");
str.append("#version 150 core\n");
EFogSetting activeFarFogSetting = this.farFogSetting != null ? this.farFogSetting : EFogSetting.EMPTY;
EFogSetting activeHeightFogSetting = this.heightFogSetting != null ? this.heightFogSetting : EFogSetting.EMPTY;
FogSettings activeFarFogSetting = this.farFogSetting != null ? this.farFogSetting : FogSettings.EMPTY;
FogSettings activeHeightFogSetting = this.heightFogSetting != null ? this.heightFogSetting : FogSettings.EMPTY;
str.append("\n" +
"#define farFogStart " + activeFarFogSetting.start + "\n" +
@@ -28,6 +28,7 @@ import com.seibel.lod.core.enums.config.*;
import com.seibel.lod.core.enums.rendering.*;
import com.seibel.lod.core.handlers.dependencyInjection.IBindable;
import com.seibel.lod.core.handlers.dependencyInjection.SingletonHandler;
import com.seibel.lod.core.objects.FogSettings;
import com.seibel.lod.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
/**
@@ -157,8 +158,8 @@ public interface ILodConfigWrapperSingleton extends IBindable
double getHeightFogDensity();
void setHeightFogDensity(double newHeightFogDensity);
default EFogSetting computeHeightFogSetting() {
return new EFogSetting(
default FogSettings computeHeightFogSetting() {
return new FogSettings(
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogDensity.get(),
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogEnd.get(),
Config.Client.Graphics.FogQuality.AdvancedFog.HeightFog.heightFogMin.get(),
@@ -168,8 +169,8 @@ public interface ILodConfigWrapperSingleton extends IBindable
);
}
}
default EFogSetting computeFarFogSetting() {
return new EFogSetting(
default FogSettings computeFarFogSetting() {
return new FogSettings(
getFarFogStart(),
getFarFogEnd(),
getFarFogMin(),