diff options
Diffstat (limited to 'indra/newview/llvosky.h')
-rw-r--r-- | indra/newview/llvosky.h | 67 |
1 files changed, 9 insertions, 58 deletions
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 9cfb9773bd..9123381c3d 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -33,6 +33,7 @@ #include "llviewertexture.h" #include "llviewerobject.h" #include "llframetimer.h" +#include "v3colorutil.h" ////////////////////////////////// @@ -85,26 +86,6 @@ BOOL clip_quad_to_horizon(F32& t_left, F32& t_right, LLVector3 v_clipped[4], const LLVector3 v_corner[4], const F32 cos_max_angle); F32 clip_side_to_horizon(const LLVector3& v0, const LLVector3& v1, const F32 cos_max_angle); -inline F32 color_intens ( const LLColor3 &col ) -{ - return col.mV[0] + col.mV[1] + col.mV[2]; -} - -inline F32 color_max(const LLColor3 &col) -{ - return llmax(col.mV[0], col.mV[1], col.mV[2]); -} - -inline F32 color_max(const LLColor4 &col) -{ - return llmax(col.mV[0], col.mV[1], col.mV[2]); -} - - -inline F32 color_min(const LLColor3 &col) -{ - return llmin(col.mV[0], col.mV[1], col.mV[2]); -} class LLFace; class LLHaze; @@ -398,30 +379,8 @@ class LLCubeMap; class LLVOSky : public LLStaticViewerObject { -public: - /// WL PARAMS - F32 dome_radius; - F32 dome_offset_ratio; - LLColor3 sunlight_color; - LLColor3 ambient; - F32 gamma; - LLVector4 lightnorm; - LLVector4 unclamped_lightnorm; - LLColor3 blue_density; - LLColor3 blue_horizon; - F32 haze_density; - F32 haze_horizon; - F32 density_multiplier; - F32 max_y; - LLColor3 glow; - F32 cloud_shadow; - LLColor3 cloud_color; - F32 cloud_scale; - LLColor3 cloud_pos_density1; - LLColor3 cloud_pos_density2; public: - void initAtmospherics(void); void calcAtmospherics(void); LLColor3 createDiffuseFromWL(LLColor3 diffuse, LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); LLColor3 createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); @@ -489,13 +448,12 @@ public: const LLVector3& getToMoon() const { return mMoon.getDirection(); } const LLVector3& getToMoonLast() const { return mMoon.getDirectionCached(); } BOOL isSunUp() const { return mSun.getDirectionCached().mV[2] > -0.05f; } - void calculateColors(); - LLColor3 getSunDiffuseColor() const { return mSunDiffuse; } - LLColor3 getMoonDiffuseColor() const { return mMoonDiffuse; } - LLColor4 getSunAmbientColor() const { return mSunAmbient; } - LLColor4 getMoonAmbientColor() const { return mMoonAmbient; } - const LLColor4& getTotalAmbientColor() const { return mTotalAmbient; } + LLColor3 getSunDiffuseColor() const; + LLColor3 getMoonDiffuseColor() const; + LLColor4 getSunAmbientColor() const; + LLColor4 getMoonAmbientColor() const; + LLColor4 getTotalAmbientColor() const; LLColor4 getFogColor() const { return mFogColor; } LLColor4 getGLFogColor() const { return mGLFogCol; } @@ -503,7 +461,7 @@ public: void initSunDirection(const LLVector3 &sun_dir, const LLVector3 &sun_ang_velocity); - void setSunDirection(const LLVector3 &sun_dir, const LLVector3 &sun_ang_velocity); + void setSunDirection(const LLVector3 &sun_dir, const LLVector3 &moon_dir); BOOL updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 side, const BOOL is_sun, LLHeavenBody& hb, const F32 sin_max_angle, @@ -527,8 +485,8 @@ public: void setWorldScale(const F32 s) { mWorldScale = s; } void updateFog(const F32 distance); void setFogRatio(const F32 fog_ratio) { mFogRatio = fog_ratio; } - LLColor4U getFadeColor() const { return mFadeColor; } - F32 getFogRatio() const { return mFogRatio; } + LLColor4U getFadeColor() const; + F32 getFogRatio() const { return mFogRatio; } void setCloudDensity(F32 cloud_density) { mCloudDensity = cloud_density; } void setWind ( const LLVector3& wind ) { mWind = wind.length(); } @@ -595,13 +553,6 @@ protected: F32 mFogRatio; F32 mWorldScale; - LLColor4 mSunAmbient; - LLColor4 mMoonAmbient; - LLColor4 mTotalAmbient; - LLColor3 mSunDiffuse; - LLColor3 mMoonDiffuse; - LLColor4U mFadeColor; // Color to fade in from - LLPointer<LLCubeMap> mCubeMap; // Cube map for the environment S32 mDrawRefl; |