16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 07:59:18 +02:00

reformat: functions can be made static

This commit is contained in:
jerrrrycho
2026-07-04 06:09:04 +02:00
parent 1d0d1c015b
commit aeb800283c
66 changed files with 199 additions and 184 deletions

View File

@@ -306,7 +306,8 @@ cMoon::phase() {
// normalize values to range 0...1
float
cMoon::normalize( const float Value ) const {
cMoon::normalize( const float Value )
{
float value = Value - floor( Value );
if( value < 0.f ) { ++value; }

View File

@@ -12,7 +12,7 @@ public:
// methods:
void init();
void update( bool Includephase = false );
void render();
static void render();
// returns vector pointing at the sun
glm::vec3 getDirection() const;
// returns current elevation above horizon
@@ -50,7 +50,7 @@ protected:
void irradiance();
void phase();
// helper, normalize values to range 0...1
float normalize(float Value ) const;
static float normalize(float Value );
// members:

View File

@@ -59,9 +59,9 @@ private:
static float m_zenithymatrix[ 3 ][ 4 ];
// coloring
void GetPerez( float *Perez, float Distribution[ 5 ][ 2 ], float Turbidity );
float GetZenith( float Zenithmatrix[ 3 ][ 4 ], float Theta, float Turbidity );
float PerezFunctionO1( float Perezcoeffs[ 5 ], float Thetasun, float Zenithval );
float PerezFunctionO2( float Perezcoeffs[ 5 ], float Icostheta, float Gamma, float Cosgamma2, float Zenithval );
static void GetPerez( float *Perez, float Distribution[ 5 ][ 2 ], float Turbidity );
static float GetZenith( float Zenithmatrix[ 3 ][ 4 ], float Theta, float Turbidity );
static float PerezFunctionO1( float Perezcoeffs[ 5 ], float Thetasun, float Zenithval );
static float PerezFunctionO2( float Perezcoeffs[ 5 ], float Icostheta, float Gamma, float Cosgamma2, float Zenithval );
};

View File

@@ -14,7 +14,7 @@ public:
// methods:
void init();
void update();
void render();
static void render();
/*
// returns location of the sun in the 3d scene
glm::vec3 getPosition();