class Environment

The main class that manages environment data. Usually, you will create a single instance of Environment, which will persist while your 3D game or simulation world is active.

If you use environment directly and not via TrueSkyRenderer, you must call the following each frame:

SetRealTime(time_seconds); skyKeyframer->TimeStep(step_days); Update();

Public Functions

void SetRealTime(double rt_sec)

Call this once per frame before Update() if you use real-time updates for clouds, rain, lightning, sky keyframes etc.

void Update(double latitudeRadians, double longitudeRadians, double headingRadians)

Call this once per-frame.

CloudKeyframer *GetCloudKeyframer(sky::uid uid)

Get the cloud keyframer with the specified uid.

bool DeleteCloudKeyframer(sky::uid uid)

Delete the specified cloud layer.

virtual clouds::CloudKeyframer *CreateCloudKeyframer(platform::core::MemoryInterface *m, sky::uid uid = 0)

Override this to create a custom derived keyframer. Valid id’s are anything greater than zero.