Sky Keyframe¶
-
struct SkyKeyframe : public simul::sky::BaseKeyframe
The keyframe structure for simul::sky::SkyKeyframer.
The properties of any sky keyframe can be changed at any time. However, only HazeEccentricity can be changed for an in-use keyframe without triggering a recalculation of the colour tables.
Public Functions
-
virtual void Save(Output &os) const¶
Save this keyframe’s values to the stream.
-
virtual void Load(Input &is, simul::base::MemoryInterface *memoryInterface)¶
Load this keyframe’s values from the stream.
-
virtual void SaveToText(crossplatform::TextOutput &os) const¶
Save this keyframe’s values to textual output.
-
virtual void LoadFromText(crossplatform::TextInput &is)¶
Load from a textual input.
-
virtual bool HasFloat(const char *name) const¶
Return true if the keyframe has a float value with the given, case-insensitive, name; return false otherwise.
-
virtual float GetFloat(const char *name) const¶
Return the float value with the given, case-insensitive, name.
-
virtual void SetFloat(const char *name, float val)¶
Set the float value with the given, case-insensitive, name.
-
virtual bool HasInt(const char *name) const¶
Return true if the keyframe has an int value with the given, case-insensitive, name; return false otherwise.
-
virtual int GetInt(const char *name) const¶
Return the integer value with the given, case-insensitive, name.
-
virtual void SetInt(const char *name, int val)¶
Set the integer value with the given, case-insensitive, name.
-
unsigned GetTransientChecksum() const¶
Checksum including values not needed for GPU recalculation.
-
virtual float4 GetColour(const char *name) const¶
Return the colour value with the given, case-insensitive, name.
-
virtual void SetColour(const char *name, float4 val)¶
Set the colour value with the given, case-insensitive, name.
Public Members
-
float daytime
The time this keyframe represents, in a floating-point number of days from the starting midnight of the sequence. If simul::sky::SkyKeyframer::SetLinkKeyframeTimeAndDaytime is true, this is not used.
-
mutable float4 Mie
The Mie scattering coefficients (x=red,y=green,z=blue). Mutable because of AutoMie.
-
float Haze
The amount of haze, mist or fog.
-
float HazeBaseKm
The base altitude, above which haze starts to decrease in density.
-
float HazeScaleKm
The vertical scale over which haze reduces with altitude.
-
float HazeEccentricity
The anisotropy of Mie scattering. Can be changed without recalculating tables.
-
float GroundFog
Thick ground fog.
-
float FogCeilingKm
Upper limit of ground fog.
-
float SeaLevelTemperatureK
Temperature at sealevel, in kelvins - mainly relevant to infra-red.
-
float StoreAsColours
If true, the keyframe is stored as a colour table, rather than generating its colours from its properties.
-
bool AutoMie
Whether to recalculate the Mie coefficients based on the haze at this keyframe.
-
bool automaticSunPosition
Whether to calculate the sun position from the date and time.
-
virtual void Save(Output &os) const¶
-
struct KeyframeInUseState¶
There are three keyframes in use. Two are complete, one is in construction. The keyframe values are interpolated from the true, control keyframes.