# The trueSKY Classes

## Updating

As described in \ref man_2_gettingstarted, you will declare and create an instance of Environment. If you have a sequence file (.sq or .seq) saved from the \ref man_6_sequencer, you can load this into the Environment and its keyframers will be appropriately initialized with global values and keyframes.

simul::clouds::Environment *environment=NULL;
...
environment=new simul::clouds::Environment();


You can either load a preconfigured sky sequence (.sq file), control the environment direct from the trueSKY API, or both together. To load a file (the .sq is a human-readable text file format), create a TextFileInput object.

simul::crossplatform::TextFileInput ifs;


You can use your own text loader class in place of TextFileInput.

The properties and keyframes of each Keyframer can also be modified in real time. The keyframes each have a \a time value, and the keyframer tracks a current time through these frames, interpolating properties as it does so. This time value is obtained or set using the skyKeyframer:

float time=environment->skyKeyframer->GetTime();


You don’t need to update the keyframers specifically, so long as you’re using simul::clouds::Environment::Update() once per frame.

For more information on the two types of keyframer, see: \subpage man_5_classes_ooo1_environment_ooo1_sky_keyframer \subpage man_5_classes_ooo1_environment_ooo2_cloud_keyframer

Next: \ref man_5_classes_ooo1_environment_ooo1_sky_keyframer