The scene's lighting environment: sky, night sky and fog.
More...
#include <environment.h>
|
| static glm::vec3 | directionFromAngles (float elevationDeg, float azimuthDeg) |
| | Unit direction for an elevation/azimuth pair, both in degrees.
|
The scene's lighting environment: sky, night sky and fog.
Scene-global, not a component: one per Scene (Scene::environment()), saved with it. The backend re-bakes the IBL whenever the sky changes.
◆ sunAngles()
| SkyAngles Vkm::Engine::Environment::sunAngles |
( |
| ) |
const |
|
inline |
Where the sun sits, straight off the authored fields.
- Returns
- Elevation/azimuth in degrees.
◆ moonAngles()
| SkyAngles Vkm::Engine::Environment::moonAngles |
( |
| ) |
const |
|
inline |
Where the moon sits: opposite the sun, tilted off that axis.
Derived, so lowering the sun raises the moon by itself.
- Returns
- Elevation/azimuth in degrees.
◆ sunDirection()
| glm::vec3 Vkm::Engine::Environment::sunDirection |
( |
| ) |
const |
|
inline |
Direction TO the sun from the authored angles.
Azimuth 0 is +Z by definition of the angles, not the engine's forward.
- Returns
- Unit direction pointing at the sun.
◆ moonDirection()
| glm::vec3 Vkm::Engine::Environment::moonDirection |
( |
| ) |
const |
|
inline |
Direction TO the moon.
- Returns
- Unit direction pointing at the moon.
◆ directionFromAngles()
| glm::vec3 Vkm::Engine::Environment::directionFromAngles |
( |
float | elevationDeg, |
|
|
float | azimuthDeg ) |
|
static |
Unit direction for an elevation/azimuth pair, both in degrees.
- Parameters
-
| elevationDeg | Degrees above the horizon. |
| azimuthDeg | Degrees around the horizon, from +Z toward +X. |
- Returns
- Unit direction.
The documentation for this struct was generated from the following file: