llvosky.cpp File Reference

LLVOSky class implementation. More...

#include "llviewerprecompiledheaders.h"
#include "llvosky.h"
#include "imageids.h"
#include "llfeaturemanager.h"
#include "llviewercontrol.h"
#include "llframetimer.h"
#include "timing.h"
#include "llagent.h"
#include "lldrawable.h"
#include "llface.h"
#include "llcubemap.h"
#include "lldrawpoolsky.h"
#include "lldrawpoolwater.h"
#include "llglheaders.h"
#include "llsky.h"
#include "llviewercamera.h"
#include "llviewerimagelist.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llworld.h"
#include "pipeline.h"
#include "lldrawpoolwlsky.h"
#include "llwlparammanager.h"
#include "llwaterparammanager.h"

Include dependency graph for llvosky.cpp:

Go to the source code of this file.

Classes

class  LLFastLn

Functions

void color_pow (LLColor3 &col, const F32 e)
LLColor3 color_norm (const LLColor3 &col)
void color_gamma_correct (LLColor3 &col)
static LLColor3 componentDiv (LLColor3 const &left, LLColor3 const &right)
static LLColor3 componentMult (LLColor3 const &left, LLColor3 const &right)
static LLColor3 componentExp (LLColor3 const &v)
static LLColor3 componentPow (LLColor3 const &v, F32 exponent)
static LLColor3 componentSaturate (LLColor3 const &v)
static LLColor3 componentSqrt (LLColor3 const &v)
static void componentMultBy (LLColor3 &left, LLColor3 const &right)
static LLColor3 colorMix (LLColor3 const &left, LLColor3 const &right, F32 amount)
static F32 texture2D (LLPointer< LLImageRaw > const &tex, LLVector2 const &uv)
static LLColor3 smear (F32 val)
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)
F32 dtReflection (const LLVector3 &p, F32 cos_dir_from_top, F32 sin_dir_from_top, F32 diff_angl_dir)
F32 dtClip (const LLVector3 &v0, const LLVector3 &v1, F32 far_clip2)
F32 color_norm_pow (LLColor3 &col, F32 e, BOOL postmultiply)
F32 azimuth (const LLVector3 &v)

Variables

static const S32 NUM_TILES_X = 8
static const S32 NUM_TILES_Y = 4
static const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y
static const F32 SUN_DISK_RADIUS = 0.5f
static const F32 MOON_DISK_RADIUS = SUN_DISK_RADIUS * 0.9f
static const F32 SUN_INTENSITY = 1e5
static const F32 SUN_DISK_INTENSITY = 24.f
static const LLVector2 TEX00 = LLVector2(0.f, 0.f)
static const LLVector2 TEX01 = LLVector2(0.f, 1.f)
static const LLVector2 TEX10 = LLVector2(1.f, 0.f)
static const LLVector2 TEX11 = LLVector2(1.f, 1.f)
LLUUID gSunTextureID = IMG_SUN
LLUUID gMoonTextureID = IMG_MOON
static LLFastLn gFastLn


Detailed Description

LLVOSky class implementation.

LicenseInfo
firstyear=2001&license=viewergpl

Copyright (c) 2001-2008, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llvosky.cpp.


Function Documentation

F32 azimuth ( const LLVector3 v  ) 

Definition at line 2174 of file llvosky.cpp.

References azimuth(), F_PI, LLVector3::mV, VX, and VY.

Referenced by azimuth(), and LLVOAvatar::updateShadowFaces().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Definition at line 1518 of file llvosky.cpp.

References clip_side_to_horizon(), FALSE, S32, and TRUE.

Referenced by LLVOSky::updateHeavenlyBodyGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 clip_side_to_horizon ( const LLVector3 V0,
const LLVector3 V1,
const F32  cos_max_angle 
)

Definition at line 1553 of file llvosky.cpp.

References B, and LLVector3::mV.

Referenced by clip_quad_to_horizon(), and LLVOSky::updateReflectionGeometry().

Here is the caller graph for this function:

void color_gamma_correct ( LLColor3 col  )  [inline]

Definition at line 172 of file llvosky.cpp.

References LLColor3::mV, and LLFastLn::pow().

Referenced by LLVOSky::updateFog().

Here is the call graph for this function:

Here is the caller graph for this function:

LLColor3 color_norm ( const LLColor3 col  )  [inline]

Definition at line 162 of file llvosky.cpp.

References color_max().

Referenced by LLVOSky::updateFog().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 color_norm_pow ( LLColor3 col,
F32  e,
BOOL  postmultiply 
)

Definition at line 2154 of file llvosky.cpp.

References color_max(), and color_pow().

Here is the call graph for this function:

void color_pow ( LLColor3 col,
const F32  e 
) [inline]

Definition at line 155 of file llvosky.cpp.

References LLColor3::mV, and LLFastLn::pow().

Referenced by color_norm_pow().

Here is the call graph for this function:

Here is the caller graph for this function:

static LLColor3 colorMix ( LLColor3 const &  left,
LLColor3 const &  right,
F32  amount 
) [inline, static]

Definition at line 609 of file llvosky.cpp.

Referenced by LLVOSky::calcSkyColorWLVert().

Here is the caller graph for this function:

static LLColor3 componentDiv ( LLColor3 const &  left,
LLColor3 const &  right 
) [inline, static]

Definition at line 557 of file llvosky.cpp.

References LLColor3::mV.

Referenced by LLVOSky::calcAtmospherics(), and LLVOSky::calcSkyColorWLVert().

Here is the caller graph for this function:

static LLColor3 componentExp ( LLColor3 const &  v  )  [inline, static]

Definition at line 573 of file llvosky.cpp.

References LLColor3::mV.

Referenced by LLVOSky::calcAtmospherics(), and LLVOSky::calcSkyColorWLVert().

Here is the caller graph for this function:

static LLColor3 componentMult ( LLColor3 const &  left,
LLColor3 const &  right 
) [inline, static]

Definition at line 565 of file llvosky.cpp.

References LLColor3::mV.

Referenced by LLVOSky::calcAtmospherics(), LLVOSky::calcSkyColorWLVert(), LLVOSky::createAmbientFromWL(), and LLVOSky::createDiffuseFromWL().

Here is the caller graph for this function:

static void componentMultBy ( LLColor3 left,
LLColor3 const &  right 
) [inline, static]

Definition at line 602 of file llvosky.cpp.

References LLColor3::mV.

Referenced by LLVOSky::calcAtmospherics(), and LLVOSky::calcSkyColorWLVert().

Here is the caller graph for this function:

static LLColor3 componentPow ( LLColor3 const &  v,
F32  exponent 
) [inline, static]

Definition at line 580 of file llvosky.cpp.

References LLColor3::mV.

Referenced by LLVOSky::calcAtmospherics(), and LLVOSky::calcSkyColorWLFrag().

Here is the caller graph for this function:

static LLColor3 componentSaturate ( LLColor3 const &  v  )  [inline, static]

Definition at line 587 of file llvosky.cpp.

References LLColor3::mV.

Referenced by LLVOSky::calcSkyColorWLFrag().

Here is the caller graph for this function:

static LLColor3 componentSqrt ( LLColor3 const &  v  )  [inline, static]

Definition at line 595 of file llvosky.cpp.

References LLColor3::mV.

Referenced by LLVOSky::calcSkyColorWLVert().

Here is the caller graph for this function:

F32 dtClip ( const LLVector3 v0,
const LLVector3 v1,
F32  far_clip2 
)

Definition at line 1678 of file llvosky.cpp.

References B, and LLVector3::magVecSquared().

Referenced by LLVOSky::updateReflectionGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 dtReflection ( const LLVector3 p,
F32  cos_dir_from_top,
F32  sin_dir_from_top,
F32  diff_angl_dir 
)

Definition at line 1654 of file llvosky.cpp.

References LLVector3::mV, LLVector3::normVec(), and VZ.

Referenced by LLVOSky::updateReflectionGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

static LLColor3 smear ( F32  val  )  [inline, static]

Definition at line 629 of file llvosky.cpp.

Referenced by LLVOSky::calcAtmospherics(), LLVOSky::calcSkyColorInDir(), LLVOSky::calcSkyColorWLFrag(), and LLVOSky::calcSkyColorWLVert().

Here is the caller graph for this function:

static F32 texture2D ( LLPointer< LLImageRaw > const &  tex,
LLVector2 const &  uv 
) [inline, static]

Definition at line 614 of file llvosky.cpp.

References r.


Variable Documentation

LLFastLn gFastLn [static]

Definition at line 143 of file llvosky.cpp.

Definition at line 82 of file llvosky.cpp.

Referenced by idle_startup(), and LLDrawPoolWater::LLDrawPoolWater().

Definition at line 81 of file llvosky.cpp.

Referenced by idle_startup(), and LLDrawPoolWater::LLDrawPoolWater().

const F32 MOON_DISK_RADIUS = SUN_DISK_RADIUS * 0.9f [static]

Definition at line 69 of file llvosky.cpp.

const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y [static]

Definition at line 65 of file llvosky.cpp.

Referenced by LLVOSky::init(), and LLVOSky::updateSky().

const S32 NUM_TILES_X = 8 [static]

Definition at line 63 of file llvosky.cpp.

Referenced by LLVOSky::createSkyTexture(), and LLVOSky::initSkyTextureDirs().

const S32 NUM_TILES_Y = 4 [static]

Definition at line 64 of file llvosky.cpp.

const F32 SUN_DISK_INTENSITY = 24.f [static]

Definition at line 71 of file llvosky.cpp.

const F32 SUN_DISK_RADIUS = 0.5f [static]

Definition at line 68 of file llvosky.cpp.

const F32 SUN_INTENSITY = 1e5 [static]

Definition at line 70 of file llvosky.cpp.

Referenced by LLVOSky::LLVOSky().

const LLVector2 TEX00 = LLVector2(0.f, 0.f) [static]

Definition at line 75 of file llvosky.cpp.

const LLVector2 TEX01 = LLVector2(0.f, 1.f) [static]

Definition at line 76 of file llvosky.cpp.

const LLVector2 TEX10 = LLVector2(1.f, 0.f) [static]

Definition at line 77 of file llvosky.cpp.

const LLVector2 TEX11 = LLVector2(1.f, 1.f) [static]

Definition at line 78 of file llvosky.cpp.


Generated on Fri May 16 08:38:01 2008 for SecondLife by  doxygen 1.5.5