summaryrefslogtreecommitdiff
path: root/indra/newview/llsky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsky.cpp')
-rw-r--r--indra/newview/llsky.cpp75
1 files changed, 9 insertions, 66 deletions
diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp
index fb3123fd81..f7ccf7c7ff 100644
--- a/indra/newview/llsky.cpp
+++ b/indra/newview/llsky.cpp
@@ -51,18 +51,16 @@
#include "llvosky.h"
#include "llcubemap.h"
#include "llviewercontrol.h"
+#include "llenvironment.h"
#include "llvowlsky.h"
F32 azimuth_from_vector(const LLVector3 &v);
F32 elevation_from_vector(const LLVector3 &v);
-LLSky gSky;
-// ---------------- LLSky ----------------
-
-const F32 LLSky::NIGHTTIME_ELEVATION = -8.0f; // degrees
-const F32 LLSky::NIGHTTIME_ELEVATION_COS = (F32)sin(NIGHTTIME_ELEVATION*DEG_TO_RAD);
+LLSky gSky;
+// ---------------- LLSky ----------------
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
@@ -76,7 +74,6 @@ LLSky::LLSky()
mLightingGeneration = 0;
mUpdatedThisFrame = TRUE;
- mSunPhase = 0.f;
}
@@ -139,7 +136,7 @@ void LLSky::setSunDirection(const LLVector3 &sun_direction, const LLVector3 &moo
}
}
-LLVector3 LLSky::getSunDirection() const
+/*LLVector3 LLSky::getSunDirection() const
{
if (mVOSkyp)
{
@@ -162,7 +159,7 @@ LLVector3 LLSky::getMoonDirection() const
{
return LLVector3::z_axis;
}
-}
+}*/
LLColor4 LLSky::getSunDiffuseColor() const
@@ -228,7 +225,7 @@ LLColor4 LLSky::getTotalAmbientColor() const
}
-BOOL LLSky::sunUp() const
+/*BOOL LLSky::sunUp() const
{
if (mVOSkyp)
{
@@ -238,7 +235,7 @@ BOOL LLSky::sunUp() const
{
return TRUE;
}
-}
+}*/
LLColor4U LLSky::getFadeColor() const
@@ -294,27 +291,6 @@ void LLSky::init(const LLVector3 &sun_direction)
gSky.setFogRatio(gSavedSettings.getF32("RenderFogRatio"));
- ////////////////////////////
- //
- // Legacy code, ignore
- //
- //
-
- // Get the parameters.
- mSunDefaultPosition = gSavedSettings.getVector3("SkySunDefaultPosition");
-
- LLGLState::checkStates();
- LLGLState::checkTextureChannels();
-
- if (gSavedSettings.getBOOL("SkyOverrideSimSunPosition"))
- {
- setSunDirection(mSunDefaultPosition, -mSunDefaultPosition);
- }
- else
- {
- setSunDirection(sun_direction, -sun_direction);
- }
-
LLGLState::checkStates();
LLGLState::checkTextureChannels();
@@ -339,49 +315,16 @@ void LLSky::setWind(const LLVector3& average_wind)
}
}
-
-void LLSky::propagateHeavenlyBodies(F32 dt)
-{
-// if (!mOverrideSimSunPosition)
-// {
-// LLVector3 curr_dir = getSunDirection();
-// LLVector3 diff = mSunTargDir - curr_dir;
-// const F32 dist = diff.normVec();
-// if (dist > 0)
-// {
-// const F32 step = llmin (dist, 0.00005f);
-// //const F32 step = min (dist, 0.0001);
-// diff *= step;
-// curr_dir += diff;
-// curr_dir.normVec();
-// if (mVOSkyp)
-// {
-// mVOSkyp->setSunDirection(curr_dir);
-// }
-// }
-// }
-}
-
-F32 LLSky::getSunPhase() const
-{
- return mSunPhase;
-}
-
-void LLSky::setSunPhase(const F32 phase)
-{
- mSunPhase = phase;
-}
-
//////////////////////////////////////////////////////////////////////
// Private Methods
//////////////////////////////////////////////////////////////////////
-LLColor4 LLSky::getFogColor() const
+LLColor4 LLSky::getSkyFogColor() const
{
if (mVOSkyp)
{
- return mVOSkyp->getFogColor();
+ return mVOSkyp->getSkyFogColor();
}
return LLColor4(1.f, 1.f, 1.f, 1.f);