Represent a background environment with atmospheric scattering. The sun direction can be animated.
More...
#include <Sky.hpp>
|
Animated< glm::vec3 > | _sunDirection { glm::vec3(0.0f, 1.0f, 0.0f) } |
| The sun direction.
|
|
|
const Mesh * | _mesh = nullptr |
| Geometry of the object.
|
|
std::string | _materialName |
| Material name.
|
|
const Material * | _material = nullptr |
| Material.
|
|
std::vector< std::shared_ptr< Animation > > | _animations |
| Animations list (applied in order).
|
|
Animated< glm::mat4 > | _model { glm::mat4(1.0f) } |
| The transformation matrix of the 3D model, updated by the animations.
|
|
BoundingBox | _bbox |
| The world space object bounding box.
|
|
bool | _castShadow = true |
| Can the object casts shadows.
|
|
bool | _skipUVs = false |
| The object doesn't use UV coordinates.
|
|
bool | _dirtyBbox = true |
| Has the bounding box been updated following an animation update.
|
|
Represent a background environment with atmospheric scattering. The sun direction can be animated.
- See also
- Atmospheric scattering
Inherits Object.
◆ Sky()
Constructor.
- Parameters
-
options | data loading and storage options |
◆ decode()
Setup a sky environment parameters from a list of key-value tuples. The following keywords will be searched for:
bgsky:
direction: X,Y,Z
animations:
...
- Parameters
-
params | the parameters tuple |
options | data loading and storage options |
- Returns
- decoding status
Reimplemented from Object.
◆ direction()
const glm::vec3 & Sky::direction |
( |
| ) |
const |
|
inline |
Reference to the sun direction.
- Returns
- the normalized sun direction
◆ encode()
Generate a key-values representation of the object. See decode for the keywords and layout.
- Returns
- a tuple representing the object.
Reimplemented from Object.
◆ update()
void Sky::update |
( |
double |
fullTime, |
|
|
double |
frameTime |
|
) |
| |
|
overridevirtual |
Apply the animations for a frame duration.
- Parameters
-
fullTime | the time since the launch of the application |
frameTime | the time elapsed since the last frame |
Reimplemented from Object.
The documentation for this class was generated from the following files:
- src/engine/scene/Sky.hpp
- src/engine/scene/Sky.cpp