-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
164 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,68 @@ | ||
package me.vinceh121.wanderer.glx; | ||
|
||
import java.util.EnumMap; | ||
import java.util.Map; | ||
import java.util.NavigableMap; | ||
import java.util.Objects; | ||
import java.util.TreeMap; | ||
|
||
import com.badlogic.gdx.graphics.Color; | ||
|
||
import me.vinceh121.wanderer.glx.SkyboxRenderer.TimeRange; | ||
|
||
public class SkyProperties { | ||
private final Map<TimeRange, Color> sunColor = new EnumMap<>(TimeRange.class); | ||
private final Map<TimeRange, Color> sunLightColor = new EnumMap<>(TimeRange.class); | ||
private final Map<TimeRange, Color> ambLightColor = new EnumMap<>(TimeRange.class); | ||
private final Map<TimeRange, Color> skyTopColor = new EnumMap<>(TimeRange.class); | ||
private final Map<TimeRange, Color> skyMiddleColor = new EnumMap<>(TimeRange.class); | ||
private final Map<TimeRange, Color> skyBottomColor = new EnumMap<>(TimeRange.class); | ||
private final NavigableMap<Float, Color> sunColor = new TreeMap<>(); | ||
private final NavigableMap<Float, Color> sunLightColor = new TreeMap<>(); | ||
private final NavigableMap<Float, Color> ambLightColor = new TreeMap<>(); | ||
private final NavigableMap<Float, Color> skyTopColor = new TreeMap<>(); | ||
private final NavigableMap<Float, Color> skyMiddleColor = new TreeMap<>(); | ||
private final NavigableMap<Float, Color> skyBottomColor = new TreeMap<>(); | ||
|
||
public NavigableMap<Float, Color> getSunColor() { | ||
return sunColor; | ||
} | ||
|
||
public NavigableMap<Float, Color> getSunLightColor() { | ||
return sunLightColor; | ||
} | ||
|
||
public NavigableMap<Float, Color> getAmbLightColor() { | ||
return ambLightColor; | ||
} | ||
|
||
public Map<TimeRange, Color> getSunColor() { | ||
return this.sunColor; | ||
public NavigableMap<Float, Color> getSkyTopColor() { | ||
return skyTopColor; | ||
} | ||
|
||
public Map<TimeRange, Color> getSunLightColor() { | ||
return this.sunLightColor; | ||
public NavigableMap<Float, Color> getSkyMiddleColor() { | ||
return skyMiddleColor; | ||
} | ||
|
||
public Map<TimeRange, Color> getAmbLightColor() { | ||
return this.ambLightColor; | ||
public NavigableMap<Float, Color> getSkyBottomColor() { | ||
return skyBottomColor; | ||
} | ||
|
||
public Map<TimeRange, Color> getSkyTopColor() { | ||
return this.skyTopColor; | ||
@Override | ||
public int hashCode() { | ||
return Objects.hash(ambLightColor, skyBottomColor, skyMiddleColor, skyTopColor, sunColor, sunLightColor); | ||
} | ||
|
||
public Map<TimeRange, Color> getSkyMiddleColor() { | ||
return this.skyMiddleColor; | ||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
SkyProperties other = (SkyProperties) obj; | ||
return Objects.equals(ambLightColor, other.ambLightColor) | ||
&& Objects.equals(skyBottomColor, other.skyBottomColor) | ||
&& Objects.equals(skyMiddleColor, other.skyMiddleColor) | ||
&& Objects.equals(skyTopColor, other.skyTopColor) && Objects.equals(sunColor, other.sunColor) | ||
&& Objects.equals(sunLightColor, other.sunLightColor); | ||
} | ||
|
||
public Map<TimeRange, Color> getSkyBottomColor() { | ||
return this.skyBottomColor; | ||
@Override | ||
public String toString() { | ||
return "SkyProperties [sunColor=" + sunColor + ", sunLightColor=" + sunLightColor + ", ambLightColor=" | ||
+ ambLightColor + ", skyTopColor=" + skyTopColor + ", skyMiddleColor=" + skyMiddleColor | ||
+ ", skyBottomColor=" + skyBottomColor + "]"; | ||
} | ||
} |
Oops, something went wrong.