Struct SunSettings
Represents configuration settings for simulating the sun's movement, seasonal variation, and heating effects in a planetary environment.
Inherited Members
Namespace: Fwt.HexTerrains.Suns.Data
Assembly: fwt.hexterrains.dll
Syntax
[Serializable]
public struct SunSettings
Remarks
The SunSettings structure encapsulates parameters that control the length of day and year, the sun's apparent movement relative to the equator, and how solar heat is distributed across the terrain. These settings are typically used in environmental or planetary simulation systems to model day-night cycles, seasonal changes, and temperature gradients. All fields are publicly accessible for direct configuration.
Fields
CoolingIntensity
when the sun does not apply the heat, this amount of heat is added to the cell. This can be used to simulate cooling of the cells during the night or when the sun is far away.
Declaration
[Tooltip("All cells outside the sun radius, this amount of heat is added to the cell. This can be used to simulate cooling of the cells during the night or when the sun is far away.")]
public float CoolingIntensity
Field Value
| Type | Description |
|---|---|
| float |
DayLength
Day in seconds. The sun goes around the terrain in horizontal direction by this time.
Declaration
[Tooltip("Day in seconds. The sun goes around the terrain in horizontal direction by this time.")]
public float DayLength
Field Value
| Type | Description |
|---|---|
| float |
Direction
Horizontal direction of the sun movement. WestToEast means that the sun moves from left to right, while EastToWest means that the sun moves from right to left.
Declaration
[Tooltip("Horizontal direction of the sun movement. WestToEast means that the sun moves from left to right, while EastToWest means that the sun moves from right to left.")]
public SunDirection Direction
Field Value
| Type | Description |
|---|---|
| SunDirection |
HeatIntensity
This value is the heat applied to the cell at distance 0 from the sun center. The heat applied to the cells at distance equal to SunRadius is determined by SunHeatCurve.
Declaration
[Tooltip("This value is the heat applied to the cell at distance 0 from the sun center. The heat applied to the cells at distance equal to SunSize is determined by SunHeatCurve.")]
public float HeatIntensity
Field Value
| Type | Description |
|---|---|
| float |
IsEnabled
Indicates whether the feature or component is enabled.
Declaration
[Tooltip("Indicates whether the feature or component is enabled.")]
public bool IsEnabled
Field Value
| Type | Description |
|---|---|
| bool |
PlanetAngle
Affects how far the sum moves from the equator during the year. 0 means no vertical movement, 1 means that the sun will move from the equator to the pole, then to equator and then to opposite pole during the year.
Declaration
[Range(0, 1)]
[Tooltip("Affects how far the sum moves from the equator during the year. 0 means no vertical movement, 1 means that the sun will move from the equator to the pole, then to equator and then to opposite pole during the year.")]
public float PlanetAngle
Field Value
| Type | Description |
|---|---|
| float |
SimulationSettings
Defines when the simulation happens during the simulation Frame Cycle.
Declaration
[Tooltip("Defines when the simulation happens during the simulation Frame Cycle.")]
public FrameCycleSettings SimulationSettings
Field Value
| Type | Description |
|---|---|
| FrameCycleSettings |
SunHeatCurve
Affects how much the sun heats the terrain with distance from the sun center. Max distance is SunRadius. This curve evaluates the multiplier to the sun heat applied to the cell.
Declaration
[Tooltip("Affects how much the sun heats the terrain with distance from the sun center. Max distance is SunSize. This curve evaluates the multiplier to the sun heat applied to the cell.")]
public ExponentialCurve SunHeatCurve
Field Value
| Type | Description |
|---|---|
| ExponentialCurve |
SunRadius
How much cells from the sun center is heated by the sun.
Declaration
[Tooltip("How much cells from the sun center is heated by the sun.")]
public float SunRadius
Field Value
| Type | Description |
|---|---|
| float |
SunType
Type of the sun (Circle or line stretched in horizontal direction). Circle sun heats the cells in a circular area around the sun center. Line sun heats the cells in a line around the sun center. Line sun can be used to simulate the sun that is far away from the terrain, while circle sun can be used to simulate the sun that is close to the terrain.
Declaration
public SunType SunType
Field Value
| Type | Description |
|---|---|
| SunType |
YearLengthInDays
Every time the sun goes around the terrain, the day passes. This amount of days is a full year. Year affects seasons (displacement of the sun vertically).
Declaration
[Tooltip("Every time the sun goes around the terrain, the day passes. This amount of days is a full year. Year affects seasons (displacement of the sun vertically).")]
public int YearLengthInDays
Field Value
| Type | Description |
|---|---|
| int |
Properties
Default
Declaration
public static SunSettings Default { get; }
Property Value
| Type | Description |
|---|---|
| SunSettings |