OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
Sky Class Referencefinal

#include <sky.h>

Classes

struct  State
 

Public Member Functions

 Sky (const SceneGlobals &scene, const World &world)
 
 ~Sky ()
 
void updateLight (const int64_t now)
 
const LightSourcesunLight () const
 
const Tempest::Vec3 & ambientLight () const
 
float sunIntensity () const
 
float moonIntensity () const
 
const Tempest::Texture2d & sunImage () const
 
const Tempest::Texture2d & moonImage () const
 
const StatecloudsDay () const
 
const StatecloudsNight () const
 
Tempest::Vec2 cloudsOffset (int layer) const
 
float isNight () const
 

Detailed Description

Definition at line 12 of file sky.h.

Constructor & Destructor Documentation

◆ Sky()

Sky::Sky ( const SceneGlobals scene,
const World world 
)

Definition at line 48 of file sky.cpp.

◆ ~Sky()

Sky::~Sky ( )

Definition at line 77 of file sky.cpp.

Member Function Documentation

◆ ambientLight()

const Tempest::Vec3 & Sky::ambientLight ( ) const
inline

Definition at line 24 of file sky.h.

◆ cloudsDay()

const State & Sky::cloudsDay ( ) const
inline

Definition at line 31 of file sky.h.

◆ cloudsNight()

const State & Sky::cloudsNight ( ) const
inline

Definition at line 32 of file sky.h.

◆ cloudsOffset()

Vec2 Sky::cloudsOffset ( int  layer) const

Definition at line 153 of file sky.cpp.

◆ isNight()

float Sky::isNight ( ) const

Definition at line 80 of file sky.cpp.

◆ moonImage()

const Tempest::Texture2d & Sky::moonImage ( ) const
inline

Definition at line 29 of file sky.h.

◆ moonIntensity()

float Sky::moonIntensity ( ) const
inline

Definition at line 26 of file sky.h.

◆ sunImage()

const Tempest::Texture2d & Sky::sunImage ( ) const
inline

Definition at line 28 of file sky.h.

◆ sunIntensity()

float Sky::sunIntensity ( ) const
inline

Definition at line 25 of file sky.h.

◆ sunLight()

const LightSource & Sky::sunLight ( ) const
inline

Definition at line 23 of file sky.h.

◆ updateLight()

void Sky::updateLight ( const int64_t  now)

central EU, mid day, sun at 60deg: sun = 70'000 lux sky = 20'000 lux all = 90'000 lux expected DirectSunLux = all/(cos(60)*sunClr) = 185'000

Definition at line 84 of file sky.cpp.


The documentation for this class was generated from the following files: