dao::atmosphere
Declared in dao/Atmosphere.h.
Classes
| Class | |
|---|---|
| TreeLight | The light SpeedTree’s trees are lit by, apart from the rest of the level: they take no ambient light, no placed lights and no light probe. |
Type aliases
Sky
using Sky = core::Sky
Every value of a sky; dao/core/Sky.h has the members.
Sunlight
using Sunlight = core::Sunlight
The level’s sunlight; dao/core/Sky.h has the members.
Enumerations
Preset
enum class Preset : std::int32_t
A row of the game’s own sky tables (atmosphere, clouds and fog): Ostagar’s skies.
| Value | |
|---|---|
Default = 0 |
|
Battle = 1 |
|
Night = 2 |
|
Lightning = 3 |
Functions
AreaOwnSky()
std::optional<Sky> AreaOwnSky()
Returns the area’s own sky, the one ResetSky returns to.
Returns nullopt as for CurrentSky
AreaOwnSunlight()
std::optional<Sunlight> AreaOwnSunlight()
Returns the area’s own sunlight, the one ResetSunlight returns to.
Returns nullopt as for CurrentSky
CurrentSky()
std::optional<Sky> CurrentSky()
Returns the sky as it is drawn now.
Call it on the game thread, as with all of these.
Returns nullopt before a game is loaded or with nobody controlled
CurrentSunlight()
std::optional<Sunlight> CurrentSunlight()
Returns the sunlight as it falls now.
Returns nullopt as for CurrentSky
CurrentTreeLight()
std::optional<TreeLight> CurrentTreeLight()
Returns the trees’ light as they are drawn with it now.
The area’s load sets it from the area’s sunlight; nothing else changes it but these calls.
Returns nullopt where the running game is not one the library knows
ResetSky()
void ResetSky()
Returns the sky to the area’s own.
ResetSunlight()
void ResetSunlight()
Returns the sunlight to the area’s own.
ResetTreeLight()
bool ResetTreeLight()
Lights the trees by the sunlight as it falls now, as the area’s load does.
Returns false, with nothing changed, where CurrentSunlight would return nullopt
SetSky()
bool SetSky(const Sky &sky)
Sets the whole sky.
Returns false, with nothing changed, where CurrentSky would return nullopt
SetSunlight()
bool SetSunlight(const Sunlight &light)
Sets the sunlight, the trees’ light with it (ResetTreeLight), and the place of the sky’s disc.
Returns false, with nothing changed, where CurrentSky would return nullopt
SetTreeLight()
bool SetTreeLight(const TreeLight &light)
Sets the trees’ light; it shows from the next frame, until the next area loads.
Returns false, with nothing changed, as for CurrentTreeLight
WithAir()
Sky WithAir(Sky sky, Preset preset)
Returns sky with the sun, the air and the moon of a row of the game’s atmosphere table.
Returns sky unchanged if the table has no such row; a value the row leaves out is kept
WithClouds()
Sky WithClouds(Sky sky, Preset preset)
Returns sky with the clouds of a row of the game’s clouds table. Works like WithAir.
WithFog()
Sky WithFog(Sky sky, Preset preset)
Returns sky with the fog of a row of the game’s fog table. Works like WithAir.