QtCraft API C++ classes QML types Handbook

QcSky Namespace

The sky as a function of the world time and the weather. More...

Header: #include <clientcore/light/QcSky.h>

Variables

const int lunarDays

Functions

QcSkyState at(double worldTime)
QcSkyState seenFrom(QcSkyState sky, double eyeY)
QcSkyState withBlast(QcSkyState sky, double flash)
QcSkyState withCloudDrift(QcSkyState sky, double seconds)
QcSkyState withWeather(QcSkyState sky, double rain, double thunder, double flash)

Detailed Description

Variable Documentation

const int QcSky::lunarDays

Days of one lunar month.

Function Documentation

QcSkyState QcSky::at(double worldTime)

Returns the sky at worldTime (seconds, QcDayCycle), without weather and with the clouds where they start (no drift).

QcSkyState QcSky::seenFrom(QcSkyState sky, double eyeY)

Returns sky seen from eyeY: below the world it fades to black, which it reaches at QcWorld::voidLimitY; fog, clouds, glow and stars fade with it (decision E-288).

QcSkyState QcSky::withBlast(QcSkyState sky, double flash)

Returns sky in an explosion's flash (0..1, QcExplosionEffects::flashAt; decision E-879): a warm light on the dome and the clouds and on everything around, in caves too.

QcSkyState QcSky::withCloudDrift(QcSkyState sky, double seconds)

Returns sky with its clouds drifted for seconds of the world's animation clock (QcWorldMirror::animationSeconds, decision E-968): they drift whether the time of day runs or not and stand while the server pauses or is frozen.

QcSkyState QcSky::withWeather(QcSkyState sky, double rain, double thunder, double flash)

Returns sky under the weather (decision E-395): rain (0..1) greys and darkens the dome, covers it with clouds, hides stars and the dusk glow, brings the fog closer and takes sky light away; thunder (0..1) darkens it further; a lightning flash (0..1) lights everything up for a moment. Only the shaders' factors change, so no section is meshed again.