LLVOSky Class Reference

#include <llvosky.h>

Inheritance diagram for LLVOSky:

Inheritance graph
[legend]
Collaboration diagram for LLVOSky:

Collaboration graph
[legend]
List of all members.

Public Types

 FACE_SIDE0
 FACE_SIDE1
 FACE_SIDE2
 FACE_SIDE3
 FACE_SIDE4
 FACE_SIDE5
 FACE_SUN
 FACE_MOON
 FACE_BLOOM
 FACE_REFLECTION
 FACE_COUNT
enum  {
  FACE_SIDE0, FACE_SIDE1, FACE_SIDE2, FACE_SIDE3,
  FACE_SIDE4, FACE_SIDE5, FACE_SUN, FACE_MOON,
  FACE_BLOOM, FACE_REFLECTION, FACE_COUNT
}

Public Member Functions

 LLVOSky (const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
void init ()
void initCubeMap ()
void initEmpty ()
BOOL isReady () const
const LLTranspMapSetgetTransp () const
void cleanupGL ()
void restoreGL ()
BOOL idleUpdate (LLAgent &agent, LLWorld &world, const F64 &time)
BOOL updateSky ()
void updateTextures (LLAgent &agent)
LLDrawablecreateDrawable (LLPipeline *pipeline)
BOOL updateGeometry (LLDrawable *drawable)
void initSkyTextureDirs (const S32 side, const S32 tile)
void createSkyTexture (const S32 side, const S32 tile)
void updateBrightestDir ()
void calcBrightnessScaleAndColors ()
LLColor3 calcSkyColorInDir (const LLVector3 &dir)
void calcSkyColorInDir (LLColor3 &res, LLColor3 &transp, const LLVector3 &dir) const
LLColor4 calcInScatter (LLColor4 &transp, const LLVector3 &point, F32 exag) const
void calcInScatter (LLColor3 &res, LLColor3 &transp, const LLVector3 &P, F32 exag) const
LLColor3 calcRadianceAtPoint (const LLVector3 &pos) const
const LLHeavenBodygetSun () const
const LLHeavenBodygetMoon () const
const LLVector3getToSunLast () const
const LLVector3getToSun () const
const LLVector3getToMoon () const
const LLVector3getToMoonLast () const
BOOL isSunUp () const
void calculateColors ()
LLColor3 getSunDiffuseColor () const
LLColor3 getMoonDiffuseColor () const
LLColor4 getSunAmbientColor () const
LLColor4 getMoonAmbientColor () const
const LLColor4getTotalAmbientColor () const
LLColor4 getFogColor () const
LLColor4 getGLFogColor () const
LLVector3 calcUpVec (const LLVector3 &pos) const
F32 calcHeight (const LLVector3 &pos) const
F32 calcAirPhaseFunc (const F32 co) const
BOOL isSameFace (S32 idx, const LLFace *face) const
void initSunDirection (const LLVector3 &sun_dir, const LLVector3 &sun_ang_velocity)
void setSunDirection (const LLVector3 &sun_dir, const LLVector3 &sun_ang_velocity)
void updateHaze ()
BOOL updateHeavenlyBodyGeometry (LLDrawable *drawable, const S32 side, const BOOL is_sun, LLHeavenBody &hb, const F32 sin_max_angle, const LLVector3 &up, const LLVector3 &right)
LLVector3 toHorizon (const LLVector3 &dir, F32 delta=0) const
F32 cosHorizon (const F32 delta=0) const
void updateSunHaloGeometry (LLDrawable *drawable)
void updateReflectionGeometry (LLDrawable *drawable, F32 H, const LLHeavenBody &HB)
const LLHazegetHaze () const
LLHazegetHaze ()
F32 getHazeConcentration () const
void setHaze (const LLHaze &h)
F32 getWorldScale () const
void setWorldScale (const F32 s)
void updateFog (const F32 distance)
void setFogRatio (const F32 fog_ratio)
LLColor4U getFadeColor () const
F32 getFogRatio () const
void setCloudDensity (F32 cloud_density)
void setWind (const LLVector3 &wind)
const LLVector3getCameraPosAgent () const
LLVector3 getEarthCenter () const
LLCubeMapgetCubeMap () const
S32 getDrawRefl () const
void setDrawRefl (const S32 r)
BOOL isReflFace (const LLFace *face) const
LLFacegetReflFace () const
F32 calcHitsEarth (const LLVector3 &orig, const LLVector3 &dir) const
F32 calcHitsAtmEdge (const LLVector3 &orig, const LLVector3 &dir) const
LLViewerImagegetSunTex () const
LLViewerImagegetMoonTex () const
LLViewerImagegetBloomTex () const
void generateScatterMap ()
LLImageGLgetScatterMap ()

Static Public Member Functions

static void initClass ()

Public Attributes

LLFacemFace [FACE_COUNT]

Static Public Attributes

static F32 sNighttimeBrightness = 1.5f

Protected Member Functions

 ~LLVOSky ()

Protected Attributes

LLPointer< LLViewerImagemSunTexturep
LLPointer< LLViewerImagemMoonTexturep
LLPointer< LLViewerImagemBloomTexturep
LLSkyTex mSkyTex [6]
LLHeavenBody mSun
LLHeavenBody mMoon
LLVector3 mSunDefaultPosition
LLVector3 mSunAngVel
F32 mAtmHeight
LLVector3 mEarthCenter
LLVector3 mCameraPosAgent
F32 mBrightnessScale
LLColor3 mBrightestPoint
F32 mBrightnessScaleNew
LLColor3 mBrightestPointNew
F32 mBrightnessScaleGuess
LLColor3 mBrightestPointGuess
LLTranspMapSet mTransp
LLHaze mHaze
F32 mHazeConcentration
BOOL mWeatherChange
F32 mCloudDensity
F32 mWind
BOOL mInitialized
BOOL mForceUpdate
LLVector3 mLastLightingDirection
LLColor3 mLastTotalAmbient
F32 mAmbientScale
LLColor3 mNightColorShift
F32 sInterpVal
LLColor4 mFogColor
LLColor4 mGLFogCol
F32 mFogRatio
F32 mWorldScale
LLColor4 mSunAmbient
LLColor4 mMoonAmbient
LLColor4 mTotalAmbient
LLColor3 mSunDiffuse
LLColor3 mMoonDiffuse
LLColor4U mFadeColor
LLPointer< LLCubeMapmCubeMap
S32 mDrawRefl
LLFrameTimer mUpdateTimer
LLPointer< LLImageGLmScatterMap
LLPointer< LLImageRawmScatterMapRaw

Static Protected Attributes

static S32 sResolution = LLSkyTex::getResolution()
static S32 sTileResX = sResolution/NUM_TILES_X
static S32 sTileResY = sResolution/NUM_TILES_Y

Detailed Description

Definition at line 511 of file llvosky.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
FACE_SIDE0 
FACE_SIDE1 
FACE_SIDE2 
FACE_SIDE3 
FACE_SIDE4 
FACE_SIDE5 
FACE_SUN 
FACE_MOON 
FACE_BLOOM 
FACE_REFLECTION 
FACE_COUNT 

Definition at line 514 of file llvosky.h.


Constructor & Destructor Documentation

LLVOSky::LLVOSky ( const LLUUID id,
const LLPCode  pcode,
LLViewerRegion regionp 
)

Definition at line 501 of file llvosky.cpp.

References ATM_HEIGHT, EARTH_RADIUS, f, FACE_COUNT, FALSE, gAgent, LLControlGroup::getBOOL(), LLAgent::getCameraPositionAgent(), LLControlGroup::getColor3(), LLControlGroup::getF32(), LLViewerImageList::getImage(), LLControlGroup::getVector3(), gImageList, gMoonTextureID, gSavedSettings, gSunTextureID, i, IMG_BLOOM1, init(), initSunDirection(), mAmbientScale, mAtmHeight, LLViewerObject::mbCanSelect, mBloomTexturep, mCameraPosAgent, mEarthCenter, mFace, mFogColor, mFogRatio, mInitialized, mMoon, mMoonTexturep, mNightColorShift, mSkyTex, mSun, mSunDefaultPosition, mSunTexturep, mUpdateTimer, LLColor4::mV, LLVector3::mV, NULL, LLFrameTimer::reset(), S32, LLHeavenBody::setIntensity(), SUN_INTENSITY, TRUE, updateHaze(), VALPHA, VBLUE, VGREEN, and VRED.

LLVOSky::~LLVOSky (  )  [protected]

Definition at line 554 of file llvosky.cpp.

References mCubeMap, and NULL.


Member Function Documentation

F32 LLVOSky::calcAirPhaseFunc ( const F32  co  )  const [inline]

Definition at line 608 of file llvosky.h.

References f.

Referenced by calcInScatter(), and calcSkyColorInDir().

void LLVOSky::calcBrightnessScaleAndColors (  ) 

Definition at line 989 of file llvosky.cpp.

References calcHitsEarth(), calcSkyColorInDir(), LLTranspMapSet::calcTransp(), calculateColors(), color_intens(), color_max(), color_norm_abs(), e, f, LLHeavenBody::getIntensity(), LLHaze::getSigSca(), getToMoonLast(), getToSunLast(), i, llmax(), mBrightestPoint, mBrightestPointGuess, mBrightestPointNew, mBrightnessScale, mBrightnessScaleGuess, mBrightnessScaleNew, mCameraPosAgent, mHaze, mHazeConcentration, mMoon, mNightColorShift, mSkyTex, mSun, mTransp, LLVector3::mV, LLHeavenBody::renewColor(), LLHeavenBody::renewDirection(), S32, LLHeavenBody::setColor(), LLColor3::setToBlack(), toHorizon(), and updateBrightestDir().

Referenced by init(), restoreGL(), and updateSky().

F32 LLVOSky::calcHeight ( const LLVector3 pos  )  const [inline]

Definition at line 601 of file llvosky.h.

References dist_vec(), EARTH_RADIUS, and mEarthCenter.

Referenced by calcInScatter(), calcRadianceAtPoint(), and calcSkyColorInDir().

F32 LLVOSky::calcHitsAtmEdge ( const LLVector3 orig,
const LLVector3 dir 
) const

Definition at line 959 of file llvosky.cpp.

References EARTH_RADIUS, mAtmHeight, and mEarthCenter.

Referenced by calcSkyColorInDir().

F32 LLVOSky::calcHitsEarth ( const LLVector3 orig,
const LLVector3 dir 
) const

Definition at line 940 of file llvosky.cpp.

References EARTH_RADIUS, and mEarthCenter.

Referenced by calcBrightnessScaleAndColors(), calcInScatter(), and calcSkyColorInDir().

void LLVOSky::calcInScatter ( LLColor3 res,
LLColor3 transp,
const LLVector3 P,
F32  exag 
) const

Definition at line 872 of file llvosky.cpp.

References calcAirPhaseFunc(), LLHaze::calcAirSca(), calcHeight(), calcHitsEarth(), LLHaze::calcPhase(), LLHaze::calcSigSca(), LLTranspMapSet::calcTransp(), calcUpVec(), color_avg(), color_div(), color_pow(), LLHeavenBody::getIntensity(), getToSunLast(), mCameraPosAgent, mHaze, mSun, mTransp, LLVector3::mV, LLVector3::normVec(), LLColor3::setToBlack(), LLColor3::setToWhite(), and VZ.

LLColor4 LLVOSky::calcInScatter ( LLColor4 transp,
const LLVector3 point,
F32  exag 
) const

Definition at line 804 of file llvosky.cpp.

References mBrightnessScaleGuess.

LLColor3 LLVOSky::calcRadianceAtPoint ( const LLVector3 pos  )  const [inline]

Definition at line 568 of file llvosky.h.

References calcHeight(), LLTranspMapSet::calcTransp(), calcUpVec(), LLHeavenBody::getIntensity(), getToSunLast(), mBrightnessScaleGuess, mSun, and mTransp.

void LLVOSky::calcSkyColorInDir ( LLColor3 res,
LLColor3 transp,
const LLVector3 dir 
) const

Definition at line 815 of file llvosky.cpp.

References calcAirPhaseFunc(), LLHaze::calcAirSca(), calcHeight(), calcHitsAtmEdge(), calcHitsEarth(), LLHaze::calcPhase(), LLHaze::calcSigSca(), LLTranspMapSet::calcTransp(), calcUpVec(), LLColor3::exp(), f, F_PI, FIRST_STEP, LLHaze::getAbsCoef(), LLHeavenBody::getIntensity(), getToSunLast(), gFastLn, LL_FAST_EXP, LLFastLn::ln(), mCameraPosAgent, mHaze, mSun, mTransp, NO_STEPS, s, S32, LLColor3::setToBlack(), and LLColor3::setToWhite().

LLColor3 LLVOSky::calcSkyColorInDir ( const LLVector3 dir  ) 

Definition at line 777 of file llvosky.cpp.

References color_max(), f, llmax(), mBrightestPointNew, mBrightnessScaleNew, mFogColor, LLColor3::mV, LLVector3::mV, powf, VZ, and x.

Referenced by calcBrightnessScaleAndColors(), createSkyTexture(), updateBrightestDir(), and updateFog().

void LLVOSky::calculateColors (  ) 

Definition at line 1064 of file llvosky.cpp.

References LLTranspMapSet::calcTransp(), color_norm(), color_norm_pow(), f, gAgent, LLHeavenBody::getIntensity(), getToMoonLast(), getToSunLast(), LLAgent::inPrelude(), llmax(), llmin(), mAmbientScale, mBrightestPointGuess, mBrightnessScaleGuess, mFadeColor, min_intens_factor(), mMoonAmbient, mMoonDiffuse, mNightColorShift, mSun, mSunAmbient, mSunDiffuse, mTotalAmbient, mTransp, LLVector3::mV, LLColor4U::setAlpha(), LLColor4::setAlpha(), LLColor3::setToBlack(), LLColor4::setToBlack(), sNighttimeBrightness, and TRUE.

Referenced by calcBrightnessScaleAndColors(), and updateSky().

LLVector3 LLVOSky::calcUpVec ( const LLVector3 pos  )  const [inline]

Definition at line 594 of file llvosky.h.

References mEarthCenter, and v.

Referenced by calcInScatter(), calcRadianceAtPoint(), and calcSkyColorInDir().

void LLVOSky::cleanupGL (  ) 

Definition at line 612 of file llvosky.cpp.

References getCubeMap(), i, mSkyTex, and S32.

F32 LLVOSky::cosHorizon ( const F32  delta = 0  )  const [inline]

Definition at line 646 of file llvosky.h.

References EARTH_RADIUS, f, mCameraPosAgent, and LLVector3::mV.

Referenced by toHorizon(), updateGeometry(), and updateReflectionGeometry().

LLDrawable * LLVOSky::createDrawable ( LLPipeline pipeline  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 1301 of file llvosky.cpp.

References LLPipeline::allocDrawable(), FACE_BLOOM, FACE_MOON, FACE_SIDE0, FACE_SUN, FALSE, LLPipeline::getPool(), gPipeline, i, mBloomTexturep, LLViewerObject::mDrawable, mFace, mMoon, mMoonTexturep, mSkyTex, mSun, mSunTexturep, NULL, LLDrawPool::POOL_SKY, LLPipeline::RENDER_TYPE_SKY, S32, LLDrawPoolSky::setMoon(), LLDrawPoolSky::setSkyTex(), and LLDrawPoolSky::setSun().

void LLVOSky::createSkyTexture ( const S32  side,
const S32  tile 
)

Definition at line 758 of file llvosky.cpp.

References calcSkyColorInDir(), mSkyTex, NUM_TILES_X, S32, sTileResX, sTileResY, x, and y.

Referenced by init(), and updateSky().

void LLVOSky::generateScatterMap (  ) 

Definition at line 2354 of file llvosky.cpp.

References f, FALSE, LLKillerSky::getMieCoefficients(), LLSky::getMoonDiffuseColor(), LLKillerSky::getRaleighCoefficients(), LLSky::getSunDiffuseColor(), LLSky::getSunDirection(), gSky, lerp(), llclamp(), mScatterMap, mScatterMapRaw, LLColor4::mV, LLVector3::mV, sqrtf, VZ, x, and y.

LLViewerImage* LLVOSky::getBloomTex (  )  const [inline]

Definition at line 682 of file llvosky.h.

References mBloomTexturep.

const LLVector3& LLVOSky::getCameraPosAgent (  )  const [inline]

Definition at line 669 of file llvosky.h.

References mCameraPosAgent.

LLCubeMap* LLVOSky::getCubeMap (  )  const [inline]

Definition at line 672 of file llvosky.h.

References mCubeMap.

Referenced by cleanupGL(), and restoreGL().

S32 LLVOSky::getDrawRefl (  )  const [inline]

Definition at line 673 of file llvosky.h.

References mDrawRefl.

Referenced by LLDrawPoolWater::renderReflection().

LLVector3 LLVOSky::getEarthCenter (  )  const [inline]

Definition at line 670 of file llvosky.h.

References mEarthCenter.

LLColor4U LLVOSky::getFadeColor (  )  const [inline]

Definition at line 664 of file llvosky.h.

References mFadeColor.

LLColor4 LLVOSky::getFogColor (  )  const [inline]

Definition at line 591 of file llvosky.h.

References mFogColor.

F32 LLVOSky::getFogRatio (  )  const [inline]

Definition at line 665 of file llvosky.h.

References mFogRatio.

LLColor4 LLVOSky::getGLFogColor (  )  const [inline]

Definition at line 592 of file llvosky.h.

References mGLFogCol.

LLHaze& LLVOSky::getHaze (  )  [inline]

Definition at line 657 of file llvosky.h.

References mHaze.

const LLHaze& LLVOSky::getHaze (  )  const [inline]

Definition at line 656 of file llvosky.h.

References mHaze.

F32 LLVOSky::getHazeConcentration (  )  const [inline]

Definition at line 658 of file llvosky.h.

References mHazeConcentration.

const LLHeavenBody& LLVOSky::getMoon (  )  const [inline]

Definition at line 577 of file llvosky.h.

References mMoon.

LLColor4 LLVOSky::getMoonAmbientColor (  )  const [inline]

Definition at line 589 of file llvosky.h.

References mMoonAmbient.

LLColor3 LLVOSky::getMoonDiffuseColor (  )  const [inline]

Definition at line 587 of file llvosky.h.

References mMoonDiffuse.

LLViewerImage* LLVOSky::getMoonTex (  )  const [inline]

Definition at line 681 of file llvosky.h.

References mMoonTexturep.

LLFace* LLVOSky::getReflFace (  )  const [inline]

Definition at line 676 of file llvosky.h.

References FACE_REFLECTION, and mFace.

Referenced by LLDrawPoolWater::render(), and LLDrawPoolWater::renderShaderSimple().

LLImageGL* LLVOSky::getScatterMap (  )  [inline]

Definition at line 685 of file llvosky.h.

References mScatterMap.

const LLHeavenBody& LLVOSky::getSun (  )  const [inline]

Definition at line 576 of file llvosky.h.

References mSun.

LLColor4 LLVOSky::getSunAmbientColor (  )  const [inline]

Definition at line 588 of file llvosky.h.

References mSunAmbient.

LLColor3 LLVOSky::getSunDiffuseColor (  )  const [inline]

Definition at line 586 of file llvosky.h.

References mSunDiffuse.

Referenced by updateFog().

LLViewerImage* LLVOSky::getSunTex (  )  const [inline]

Definition at line 680 of file llvosky.h.

References mSunTexturep.

const LLVector3& LLVOSky::getToMoon (  )  const [inline]

Definition at line 581 of file llvosky.h.

References LLHeavenBody::getDirection(), and mMoon.

const LLVector3& LLVOSky::getToMoonLast (  )  const [inline]

Definition at line 582 of file llvosky.h.

References LLHeavenBody::getDirectionCached(), and mMoon.

Referenced by calcBrightnessScaleAndColors(), and calculateColors().

const LLVector3& LLVOSky::getToSun (  )  const [inline]

Definition at line 580 of file llvosky.h.

References LLHeavenBody::getDirection(), and mSun.

const LLVector3& LLVOSky::getToSunLast (  )  const [inline]

Definition at line 579 of file llvosky.h.

References LLHeavenBody::getDirectionCached(), and mSun.

Referenced by calcBrightnessScaleAndColors(), calcInScatter(), calcRadianceAtPoint(), calcSkyColorInDir(), calculateColors(), updateBrightestDir(), and updateFog().

const LLColor4& LLVOSky::getTotalAmbientColor (  )  const [inline]

Definition at line 590 of file llvosky.h.

References mTotalAmbient.

const LLTranspMapSet& LLVOSky::getTransp (  )  const [inline]

Definition at line 537 of file llvosky.h.

References mTransp.

F32 LLVOSky::getWorldScale (  )  const [inline]

Definition at line 660 of file llvosky.h.

References mWorldScale.

BOOL LLVOSky::idleUpdate ( LLAgent agent,
LLWorld world,
const F64 time 
) [virtual]

Reimplemented from LLViewerObject.

Definition at line 1170 of file llvosky.cpp.

References TRUE.

void LLVOSky::init (  ) 

Reimplemented from LLXform.

Definition at line 568 of file llvosky.cpp.

References LLHaze::calcAirSca(), calcBrightnessScaleAndColors(), LLHaze::calcSigSca(), color_intens(), createSkyTexture(), FIRST_STEP, LLTranspMapSet::init(), initCubeMap(), initSkyTextureDirs(), mAtmHeight, mBrightnessScaleNew, mHaze, mHazeConcentration, mTransp, NO_STEPS, NUM_TILES, and S32.

Referenced by initSunDirection(), LLVOSky(), and setSunDirection().

void LLVOSky::initClass (  )  [static]

Definition at line 562 of file llvosky.cpp.

References LLHaze::initClass().

Referenced by LLViewerObject::initVOClasses().

void LLVOSky::initCubeMap (  ) 

Definition at line 593 of file llvosky.cpp.

References LLControlGroup::getBOOL(), LLSkyTex::getImageRaw(), gFeatureManagerp, gGLManager, gSavedSettings, LLFeatureList::isFeatureAvailable(), mCubeMap, LLGLManager::mHasCubeMap, mSkyTex, and S32.

Referenced by init().

void LLVOSky::initEmpty (  ) 

void LLVOSky::initSkyTextureDirs ( const S32  side,
const S32  tile 
)

Definition at line 727 of file llvosky.cpp.

References f, mSkyTex, LLVector3::normVec(), NUM_TILES_X, S32, LLSkyTex::setDir(), sResolution, sTileResX, sTileResY, x, and y.

Referenced by init().

void LLVOSky::initSunDirection ( const LLVector3 sun_dir,
const LLVector3 sun_ang_velocity 
) [inline]

Definition at line 616 of file llvosky.h.

References LLHeavenBody::getDirection(), init(), isReady(), LLVector3::magVec(), mLastLightingDirection, mMoon, mSun, LLVector3::normVec(), LLHeavenBody::renewDirection(), LLHeavenBody::setAngularVelocity(), LLHeavenBody::setDirection(), LLSkyTex::stepCurrent(), and LLVector3::x_axis.

Referenced by LLVOSky().

BOOL LLVOSky::isReady (  )  const [inline]

Definition at line 536 of file llvosky.h.

References LLTranspMapSet::isReady(), and mTransp.

Referenced by initSunDirection().

BOOL LLVOSky::isReflFace ( const LLFace face  )  const [inline]

Definition at line 675 of file llvosky.h.

References face, FACE_REFLECTION, and mFace.

Referenced by LLDrawPoolWater::render(), LLDrawPoolWater::renderShaderSimple(), and LLDrawPoolWater::shade().

BOOL LLVOSky::isSameFace ( S32  idx,
const LLFace face 
) const [inline]

Definition at line 614 of file llvosky.h.

References face, and mFace.

Referenced by LLDrawPoolSky::render().

BOOL LLVOSky::isSunUp (  )  const [inline]

Definition at line 583 of file llvosky.h.

References LLHeavenBody::getDirectionCached(), mSun, and LLVector3::mV.

void LLVOSky::restoreGL (  ) 

Definition at line 625 of file llvosky.cpp.

References calcBrightnessScaleAndColors(), LLControlGroup::getBOOL(), getCubeMap(), LLViewerImageList::getImage(), LLSkyTex::getImageRaw(), gFeatureManagerp, gGLManager, gImageList, gMoonTextureID, gPipeline, gSavedSettings, gSunTextureID, i, IMG_BLOOM1, LLCubeMap::init(), LLFeatureList::isFeatureAvailable(), LLPipeline::markRebuild(), mBloomTexturep, LLViewerObject::mDrawable, mForceUpdate, LLGLManager::mHasCubeMap, mMoonTexturep, mSkyTex, mSunTexturep, LLDrawable::REBUILD_VOLUME, S32, and TRUE.

void LLVOSky::setCloudDensity ( F32  cloud_density  )  [inline]

Definition at line 666 of file llvosky.h.

References mCloudDensity.

void LLVOSky::setDrawRefl ( const S32  r  )  [inline]

Definition at line 674 of file llvosky.h.

References mDrawRefl.

Referenced by updateGeometry().

void LLVOSky::setFogRatio ( const F32  fog_ratio  )  [inline]

Definition at line 663 of file llvosky.h.

References mFogRatio.

void LLVOSky::setHaze ( const LLHaze h  )  [inline]

Definition at line 659 of file llvosky.h.

References mHaze.

void LLVOSky::setSunDirection ( const LLVector3 sun_dir,
const LLVector3 sun_ang_velocity 
)

Definition at line 2291 of file llvosky.cpp.

References f, FALSE, LLHeavenBody::getDirection(), init(), LLVector3::magVec(), mForceUpdate, mMoon, mSun, LLVector3::mV, mWeatherChange, LLVector3::normVec(), LLHeavenBody::setAngularVelocity(), LLHeavenBody::setDirection(), TRUE, updateHaze(), VZ, and LLVector3::x_axis.

void LLVOSky::setWind ( const LLVector3 wind  )  [inline]

Definition at line 667 of file llvosky.h.

References LLVector3::magVec(), and mWind.

void LLVOSky::setWorldScale ( const F32  s  )  [inline]

Definition at line 661 of file llvosky.h.

References mWorldScale.

LLVector3 LLVOSky::toHorizon ( const LLVector3 dir,
F32  delta = 0 
) const [inline]

Definition at line 642 of file llvosky.h.

References cosHorizon(), and move_vec().

Referenced by calcBrightnessScaleAndColors().

void LLVOSky::updateBrightestDir (  ) 

Definition at line 970 of file llvosky.cpp.

References calcSkyColorInDir(), color_max(), F_PI_BY_TWO, getToSunLast(), i, mBrightestPointGuess, mBrightnessScaleGuess, move_vec(), and S32.

Referenced by calcBrightnessScaleAndColors().

void LLVOSky::updateFog ( const F32  distance  ) 

Definition at line 2068 of file llvosky.cpp.

References calcSkyColorInDir(), color_gamma_correct(), color_norm(), depth, f, gAgent, gCamera, LLCoordFrame::getAtAxis(), LLAgent::getCameraPositionAgent(), LLCamera::getNear(), LLAgent::getRegion(), getSunDiffuseColor(), getToSunLast(), LLViewerRegion::getWaterHeight(), glFogf, glFogi, glHint, gPipeline, LLPipeline::hasRenderDebugFeatureMask(), i, llclamp(), llmax(), llmin(), LLColor3::magVec(), mFogColor, mFogRatio, mGLFogCol, LLColor4::mV, LLColor3::mV, LLVector3::mV, LLVector3::normVec(), LLPipeline::RENDER_DEBUG_FEATURE_FOG, S32, LLColor4::setAlpha(), stop_glerror, TRUE, VX, VY, VZ, LLColor3::white, and LLColor4::white.

Referenced by updateSky().

BOOL LLVOSky::updateGeometry ( LLDrawable drawable  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 1324 of file llvosky.cpp.

References LLDrawable::addFace(), cosHorizon(), f, face, FACE_MOON, FACE_REFLECTION, FACE_SIDE0, FACE_SUN, FALSE, gAgent, gCamera, LLCoordFrame::getAtAxis(), LLHeavenBody::getDirection(), LLPipeline::getPool(), LLDrawable::getPositionAgent(), LLAgent::getRegion(), LLDrawPool::getVertexShaderLevel(), LLViewerRegion::getWaterHeight(), gPipeline, HORIZON_DIST, i, LLHeavenBody::isVisible(), mCameraPosAgent, mEarthCenter, mFace, mMoon, mSun, LLVector3::mV, LLVector3::normVec(), NULL, LLDrawPool::POOL_WATER, right, S32, LLPipeline::sCompiles, LLHeavenBody::setDraw(), setDrawRefl(), LLDrawPoolWater::SHADER_LEVEL_RIPPLE, sResolution, TEX00, TEX01, TEX10, TEX11, TRUE, updateHeavenlyBodyGeometry(), updateReflectionGeometry(), LLDrawPoolSky::VERTEX_DATA_MASK, and LLVector3::z_axis.

void LLVOSky::updateHaze (  ) 

Definition at line 667 of file llvosky.cpp.

References AIR_SCA_AVG, f, LLControlGroup::getBOOL(), LLUUID::getRandomSeed(), gFastLn, gSavedSettings, LLFastLn::ln(), mCloudDensity, mHaze, LLColor3::mV, LLHaze::setFalloff(), LLHaze::setG(), and LLHaze::setSigSca().

Referenced by LLVOSky(), and setSunDirection().

BOOL LLVOSky::updateHeavenlyBodyGeometry ( LLDrawable drawable,
const S32  side,
const BOOL  is_sun,
LLHeavenBody hb,
const F32  sin_max_angle,
const LLVector3 up,
const LLVector3 right 
)

Definition at line 1463 of file llvosky.cpp.

References clip_quad_to_horizon(), LLHeavenBody::corner(), LLHeavenBody::corners(), F_PI, FALSE, LLHeavenBody::getDirection(), LLHeavenBody::getDiskRadius(), LLFace::getGeomCount(), LLFace::getGeometry(), LLFace::getIndicesCount(), LLHeavenBody::getU(), LLHeavenBody::getV(), HEAVENLY_BODY_DIST, HEAVENLY_BODY_FACTOR, LLPointer< Type >::isNull(), mCameraPosAgent, mFace, mSun, LLVector3::mV, LLFace::mVertexBuffer, LLVector3::normVec(), S32, LLFace::setGeomIndex(), LLHeavenBody::setHorizonVisibility(), LLFace::setIndicesIndex(), LLFace::setSize(), LLHeavenBody::setU(), LLHeavenBody::setV(), LLHeavenBody::setVisible(), t, TEX00, TEX01, TEX10, TEX11, TRUE, updateSunHaloGeometry(), LLDrawPoolWater::VERTEX_DATA_MASK, and LLVector3::z_axis.

Referenced by updateGeometry().

void LLVOSky::updateReflectionGeometry ( LLDrawable drawable,
F32  H,
const LLHeavenBody HB 
)

Definition at line 1750 of file llvosky.cpp.

References LLColor3::clamp(), clip_side_to_horizon(), cosHorizon(), dtClip(), dtReflection(), f, face, FACE_REFLECTION, gCamera, LLCoordFrame::getAtAxis(), LLHeavenBody::getDirection(), LLHeavenBody::getDiskRadius(), LLHeavenBody::getInterpColor(), HEAVENLY_BODY_SCALE, HORIZON_DIST, left, llmax(), llmin(), lltrunc(), LLVector3::magVec(), mCameraPosAgent, mFace, mFogColor, LLVector3::mV, LLVector3::normVec(), right, S32, sResolution, TEX00, TEX01, TEX10, TEX11, TRUE, LLDrawPoolWater::VERTEX_DATA_MASK, VZ, z, and LLVector3::z_axis.

Referenced by updateGeometry().

BOOL LLVOSky::updateSky (  ) 

Definition at line 1175 of file llvosky.cpp.

References calcBrightnessScaleAndColors(), calculateColors(), LLImageRaw::copy(), LLSkyTex::createGLImage(), createSkyTexture(), DEG_TO_RAD, f, FALSE, gCamera, LLHeavenBody::getDirection(), LLCamera::getFar(), LLSkyTex::getImageRaw(), gGLManager, gPipeline, gSky, LLPipeline::hasRenderType(), LLVector3::isExactlyZero(), LLColor3::magVec(), LLPipeline::markRebuild(), mCubeMap, LLViewerObject::mDead, LLViewerObject::mDrawable, mForceUpdate, mInitialized, LLGLManager::mIsDisabled, mLastLightingDirection, mLastTotalAmbient, mSkyTex, mSun, mTotalAmbient, mUpdateTimer, LLColor4::mV, LLColor3::mV, LLSky::mVOGroundp, LLSky::mVOStarsp, LLVector3::normVec(), NUM_TILES, LLDrawable::REBUILD_ALL, LLDrawable::REBUILD_VOLUME, LLPipeline::RENDER_TYPE_SKY, LLFrameTimer::reset(), S32, LLHeavenBody::setInterpVal(), LLSkyTex::setInterpVal(), LLColor3::setVec(), sInterpVal, LLSkyTex::stepCurrent(), TRUE, and updateFog().

void LLVOSky::updateSunHaloGeometry ( LLDrawable drawable  ) 

Definition at line 1649 of file llvosky.cpp.

References LLHeavenBody::corners(), face, FACE_BLOOM, mCameraPosAgent, mFace, mSun, LLVector3::normVec(), right, S32, size, TEX00, TEX01, TEX10, TEX11, TRUE, and LLDrawPoolWater::VERTEX_DATA_MASK.

Referenced by updateHeavenlyBodyGeometry().

void LLVOSky::updateTextures ( LLAgent agent  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 1291 of file llvosky.cpp.

References MAX_IMAGE_AREA, mBloomTexturep, mMoonTexturep, and mSunTexturep.


Member Data Documentation

F32 LLVOSky::mAmbientScale [protected]

Definition at line 726 of file llvosky.h.

Referenced by calculateColors(), and LLVOSky().

F32 LLVOSky::mAtmHeight [protected]

Definition at line 706 of file llvosky.h.

Referenced by calcHitsAtmEdge(), init(), and LLVOSky().

LLPointer<LLViewerImage> LLVOSky::mBloomTexturep [protected]

Definition at line 696 of file llvosky.h.

Referenced by createDrawable(), getBloomTex(), LLVOSky(), restoreGL(), and updateTextures().

LLColor3 LLVOSky::mBrightestPoint [protected]

Definition at line 710 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors().

LLColor3 LLVOSky::mBrightestPointGuess [protected]

Definition at line 714 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), calculateColors(), and updateBrightestDir().

LLColor3 LLVOSky::mBrightestPointNew [protected]

Definition at line 712 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), and calcSkyColorInDir().

F32 LLVOSky::mBrightnessScale [protected]

Definition at line 709 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors().

F32 LLVOSky::mBrightnessScaleGuess [protected]

Definition at line 713 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), calcInScatter(), calcRadianceAtPoint(), calculateColors(), and updateBrightestDir().

F32 LLVOSky::mBrightnessScaleNew [protected]

Definition at line 711 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), calcSkyColorInDir(), and init().

LLVector3 LLVOSky::mCameraPosAgent [protected]

Definition at line 708 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), calcInScatter(), calcSkyColorInDir(), cosHorizon(), getCameraPosAgent(), LLVOSky(), updateGeometry(), updateHeavenlyBodyGeometry(), updateReflectionGeometry(), and updateSunHaloGeometry().

F32 LLVOSky::mCloudDensity [protected]

Definition at line 719 of file llvosky.h.

Referenced by setCloudDensity(), and updateHaze().

LLPointer<LLCubeMap> LLVOSky::mCubeMap [protected]

Definition at line 743 of file llvosky.h.

Referenced by getCubeMap(), initCubeMap(), updateSky(), and ~LLVOSky().

S32 LLVOSky::mDrawRefl [protected]

Definition at line 744 of file llvosky.h.

Referenced by getDrawRefl(), and setDrawRefl().

LLVector3 LLVOSky::mEarthCenter [protected]

Definition at line 707 of file llvosky.h.

Referenced by calcHeight(), calcHitsAtmEdge(), calcHitsEarth(), calcUpVec(), getEarthCenter(), LLVOSky(), and updateGeometry().

LLFace* LLVOSky::mFace[FACE_COUNT]

Definition at line 689 of file llvosky.h.

Referenced by createDrawable(), getReflFace(), isReflFace(), isSameFace(), LLVOSky(), updateGeometry(), updateHeavenlyBodyGeometry(), updateReflectionGeometry(), and updateSunHaloGeometry().

LLColor4U LLVOSky::mFadeColor [protected]

Definition at line 741 of file llvosky.h.

Referenced by calculateColors(), and getFadeColor().

LLColor4 LLVOSky::mFogColor [protected]

Definition at line 730 of file llvosky.h.

Referenced by calcSkyColorInDir(), getFogColor(), LLVOSky(), updateFog(), and updateReflectionGeometry().

F32 LLVOSky::mFogRatio [protected]

Definition at line 733 of file llvosky.h.

Referenced by getFogRatio(), LLVOSky(), setFogRatio(), and updateFog().

BOOL LLVOSky::mForceUpdate [protected]

Definition at line 723 of file llvosky.h.

Referenced by restoreGL(), setSunDirection(), and updateSky().

LLColor4 LLVOSky::mGLFogCol [protected]

Definition at line 731 of file llvosky.h.

Referenced by getGLFogColor(), and updateFog().

LLHaze LLVOSky::mHaze [protected]

Definition at line 716 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), calcInScatter(), calcSkyColorInDir(), getHaze(), init(), setHaze(), and updateHaze().

F32 LLVOSky::mHazeConcentration [protected]

Definition at line 717 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), getHazeConcentration(), and init().

BOOL LLVOSky::mInitialized [protected]

Definition at line 722 of file llvosky.h.

Referenced by LLVOSky(), and updateSky().

LLVector3 LLVOSky::mLastLightingDirection [protected]

Definition at line 724 of file llvosky.h.

Referenced by initSunDirection(), and updateSky().

LLColor3 LLVOSky::mLastTotalAmbient [protected]

Definition at line 725 of file llvosky.h.

Referenced by updateSky().

LLHeavenBody LLVOSky::mMoon [protected]

Definition at line 703 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), createDrawable(), getMoon(), getToMoon(), getToMoonLast(), initSunDirection(), LLVOSky(), setSunDirection(), and updateGeometry().

LLColor4 LLVOSky::mMoonAmbient [protected]

Definition at line 737 of file llvosky.h.

Referenced by calculateColors(), and getMoonAmbientColor().

LLColor3 LLVOSky::mMoonDiffuse [protected]

Definition at line 740 of file llvosky.h.

Referenced by calculateColors(), and getMoonDiffuseColor().

LLPointer<LLViewerImage> LLVOSky::mMoonTexturep [protected]

Definition at line 695 of file llvosky.h.

Referenced by createDrawable(), getMoonTex(), LLVOSky(), restoreGL(), and updateTextures().

LLColor3 LLVOSky::mNightColorShift [protected]

Definition at line 727 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), calculateColors(), and LLVOSky().

LLPointer<LLImageGL> LLVOSky::mScatterMap [protected]

Definition at line 748 of file llvosky.h.

Referenced by generateScatterMap(), and getScatterMap().

LLPointer<LLImageRaw> LLVOSky::mScatterMapRaw [protected]

Definition at line 749 of file llvosky.h.

Referenced by generateScatterMap().

LLSkyTex LLVOSky::mSkyTex[6] [protected]

Definition at line 701 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), cleanupGL(), createDrawable(), createSkyTexture(), initCubeMap(), initSkyTextureDirs(), LLVOSky(), restoreGL(), and updateSky().

LLHeavenBody LLVOSky::mSun [protected]

Definition at line 702 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), calcInScatter(), calcRadianceAtPoint(), calcSkyColorInDir(), calculateColors(), createDrawable(), getSun(), getToSun(), getToSunLast(), initSunDirection(), isSunUp(), LLVOSky(), setSunDirection(), updateGeometry(), updateHeavenlyBodyGeometry(), updateSky(), and updateSunHaloGeometry().

LLColor4 LLVOSky::mSunAmbient [protected]

Definition at line 736 of file llvosky.h.

Referenced by calculateColors(), and getSunAmbientColor().

LLVector3 LLVOSky::mSunAngVel [protected]

Definition at line 705 of file llvosky.h.

LLVector3 LLVOSky::mSunDefaultPosition [protected]

Definition at line 704 of file llvosky.h.

Referenced by LLVOSky().

LLColor3 LLVOSky::mSunDiffuse [protected]

Definition at line 739 of file llvosky.h.

Referenced by calculateColors(), and getSunDiffuseColor().

LLPointer<LLViewerImage> LLVOSky::mSunTexturep [protected]

Definition at line 694 of file llvosky.h.

Referenced by createDrawable(), getSunTex(), LLVOSky(), restoreGL(), and updateTextures().

LLColor4 LLVOSky::mTotalAmbient [protected]

Definition at line 738 of file llvosky.h.

Referenced by calculateColors(), getTotalAmbientColor(), and updateSky().

LLTranspMapSet LLVOSky::mTransp [protected]

Definition at line 715 of file llvosky.h.

Referenced by calcBrightnessScaleAndColors(), calcInScatter(), calcRadianceAtPoint(), calcSkyColorInDir(), calculateColors(), getTransp(), init(), and isReady().

LLFrameTimer LLVOSky::mUpdateTimer [protected]

Definition at line 746 of file llvosky.h.

Referenced by LLVOSky(), and updateSky().

BOOL LLVOSky::mWeatherChange [protected]

Definition at line 718 of file llvosky.h.

Referenced by setSunDirection().

F32 LLVOSky::mWind [protected]

Definition at line 720 of file llvosky.h.

Referenced by setWind().

F32 LLVOSky::mWorldScale [protected]

Definition at line 734 of file llvosky.h.

Referenced by getWorldScale(), and setWorldScale().

F32 LLVOSky::sInterpVal [protected]

Definition at line 728 of file llvosky.h.

Referenced by updateSky().

F32 LLVOSky::sNighttimeBrightness = 1.5f [static]

Definition at line 688 of file llvosky.h.

Referenced by calculateColors(), LLNightBrightnessListener::handleEvent(), and saved_settings_to_globals().

S32 LLVOSky::sResolution = LLSkyTex::getResolution() [static, protected]

Definition at line 698 of file llvosky.h.

Referenced by initSkyTextureDirs(), updateGeometry(), and updateReflectionGeometry().

S32 LLVOSky::sTileResX = sResolution/NUM_TILES_X [static, protected]

Definition at line 699 of file llvosky.h.

Referenced by createSkyTexture(), and initSkyTextureDirs().

S32 LLVOSky::sTileResY = sResolution/NUM_TILES_Y [static, protected]

Definition at line 700 of file llvosky.h.

Referenced by createSkyTexture(), and initSkyTextureDirs().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:12:02 2010 for Second Life Viewer by  doxygen 1.4.7