Sky Keyframer

class simul::sky::SkyKeyframer : public simul::sky::BaseKeyframer, public simul::sky::BaseSkyInterface

A class that maintains sky properties and interpolates them based on keyframe values.

An instance of the SkyKeyframer is kept as a member of the Environment instance. The SkyKeyframer interpolates the sky values, and passes the keyframe and interpolation data to external renderers, e.g. BaseSkyRenderer and BaseAtmosphericsRenderer. The generated tables are calculated for multiple altitudes - specified with SetNumAltitudes. The SunIrradiance value determines the colour and strength of sunlight, and is expressed in physical units. The apparent size of the sun is set using SetSunRadiusArcMinutes.

Public Functions

virtual vec3 GetLocalSunIrradiance(double t, float altitude_km) const override

Get the sunlight that reaches the altitude altitude_km.

virtual BaseKeyframe *InsertKeyframe(float t) override

Insert a keyframe at the given time and return a pointer to it.

void DeleteKeyframe(int i)

Delete a skykeyframe with the given ID.

virtual BaseKeyframe *GetKeyframe(int index) override

Get a pointer to the i’th keyframe.

virtual const BaseKeyframe *GetKeyframe(int i) const override

Get a pointer to the i’th keyframe.