6 #include "VectorMath.h"
17 : uvOffset(v2::Zero())
18 , uvVelocity(v2::Zero())
26 , uvVelocity(uvVelocity)
28 , inverseScale(inverseScale)
31 Eegeo_ASSERT(inverseScale > 0.0f);
34 float GetAlpha()
const {
return alpha; }
35 v2 GetUVOffset()
const {
return uvOffset; }
36 v2 GetUVScale()
const {
return uvScale; }
38 void Update(
float dt,
float viewportAspectRatio)
40 uvOffset += uvVelocity * (inverseScale * dt);
41 uvOffset.x -= (int)uvOffset.x;
42 uvOffset.y -= (
int)uvOffset.y;
44 uvScale = inverseScale * ((viewportAspectRatio >= 1.f) ?
v2(viewportAspectRatio, 1.f) :
v2(1.f, 1.f/viewportAspectRatio));
62 void Update(
float dt,
const dv3& ecefInterestPoint,
float cameraAltitude,
float viewportAspectRatio);
64 void SetIntensity(
float value) { m_globalIntensity = Clamp(value, 0.0f, 1.0f); }
68 float GetCurrentIntensity(){
return m_currentIntensity;}
70 void SetWeatherLayersParameters(
bool hasOverlayEffect,
71 v2 uvOffsetOne,
v2 uvVelocityOne,
float alphaOne,
float scaleOne,
72 v2 uvOffsetTwo,
v2 uvVelocityTwo,
float alphaTwo,
float scaleTwo);
74 bool HasOverlayEffect()
const;
77 float CalculateIntensityAtCameraAltitude(
float cameraAltitude)
const;
82 bool m_hasOverlayEffect;
83 float m_globalIntensity;
84 float m_currentIntensity;