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 "viewer.h"

Include dependency graph for llvosky.cpp:

Go to the source code of this file.

Classes

class  LLFastLn
class  LLKillerSky

Defines

#define INV_WAVELENGTH_R_POW4   (1.f/0.2401f)
#define INV_WAVELENGTH_G_POW4   (1.f/0.0789f)
#define INV_WAVELENGTH_B_POW4   (1.f/0.03748f)

Functions

void color_pow (LLColor3 &col, const F32 e)
LLColor3 color_norm (const LLColor3 &col)
LLColor3 color_norm_fog (const LLColor3 &col)
LLColor4 color_norm_abs (const LLColor4 &col)
F32 color_intens (const LLColor4 &col)
F32 color_avg (const LLColor3 &col)
void color_gamma_correct (LLColor3 &col)
F32 min_intens_factor (LLColor3 &col, F32 min_intens, BOOL postmultiply=FALSE)
LLVector3 move_vec (const LLVector3 &v, const F32 cos_max_angle)
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

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


Detailed Description

LLVOSky class implementation.

LicenseInfo
firstyear=2001&license=viewergpl

Copyright (c) 2001-2007, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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.


Define Documentation

#define INV_WAVELENGTH_B_POW4   (1.f/0.03748f)

Definition at line 2318 of file llvosky.cpp.

Referenced by LLKillerSky::getRaleighCoefficients().

#define INV_WAVELENGTH_G_POW4   (1.f/0.0789f)

Definition at line 2317 of file llvosky.cpp.

Referenced by LLKillerSky::getRaleighCoefficients().

#define INV_WAVELENGTH_R_POW4   (1.f/0.2401f)

Definition at line 2316 of file llvosky.cpp.

Referenced by LLKillerSky::getRaleighCoefficients().


Function Documentation

F32 azimuth ( const LLVector3 v  ) 

Definition at line 2250 of file llvosky.cpp.

References azimuth(), F_PI, v, VX, and VY.

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

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 1577 of file llvosky.cpp.

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

Referenced by LLVOSky::updateHeavenlyBodyGeometry().

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

Definition at line 1612 of file llvosky.cpp.

References B, e, and LLVector3::mV.

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

F32 color_avg ( const LLColor3 col  )  [inline]

Definition at line 194 of file llvosky.cpp.

References color_intens().

Referenced by LLVOSky::calcInScatter().

void color_gamma_correct ( LLColor3 col  )  [inline]

Definition at line 199 of file llvosky.cpp.

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

Referenced by LLSkyTex::create(), and LLVOSky::updateFog().

F32 color_intens ( const LLColor4 col  )  [inline]

Definition at line 188 of file llvosky.cpp.

References LLColor4::mV.

Referenced by LLVOSky::calcBrightnessScaleAndColors(), color_avg(), LLVOSky::init(), LLHaze::LLHaze(), min_intens_factor(), and LLHaze::setSigSca().

LLColor3 color_norm ( const LLColor3 col  )  [inline]

Definition at line 153 of file llvosky.cpp.

References color_max(), f, and m.

Referenced by LLVOSky::calculateColors(), and LLVOSky::updateFog().

LLColor4 color_norm_abs ( const LLColor4 col  )  [inline]

Definition at line 174 of file llvosky.cpp.

References color_max(), e, and m.

Referenced by LLVOSky::calcBrightnessScaleAndColors().

LLColor3 color_norm_fog ( const LLColor3 col  )  [inline]

Definition at line 163 of file llvosky.cpp.

References color_max(), f, and m.

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

Definition at line 2230 of file llvosky.cpp.

References color_max(), and color_pow().

Referenced by LLVOSky::calculateColors().

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

Definition at line 146 of file llvosky.cpp.

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

Referenced by LLVOSky::calcInScatter(), and color_norm_pow().

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

Definition at line 1735 of file llvosky.cpp.

References B, LLVector3::magVecSquared(), and v1.

Referenced by LLVOSky::updateReflectionGeometry().

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

Definition at line 1711 of file llvosky.cpp.

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

Referenced by LLVOSky::updateReflectionGeometry().

F32 min_intens_factor ( LLColor3 col,
F32  min_intens,
BOOL  postmultiply = FALSE 
) [inline]

Definition at line 217 of file llvosky.cpp.

References color_intens(), and factor.

Referenced by LLVOSky::calculateColors().

LLVector3 move_vec ( const LLVector3 v,
const F32  cos_max_angle 
) [inline]

Definition at line 235 of file llvosky.cpp.

References LLVector2::magVecSquared(), LLVector3::mV, LLVector2::mV, LLVector3::normVec(), and v.

Referenced by LLVOSky::toHorizon(), and LLVOSky::updateBrightestDir().


Variable Documentation

LLFastLn gFastLn

Definition at line 134 of file llvosky.cpp.

Referenced by LLTranspMap::calcAirTranspDir(), LLHaze::calcPhase(), LLVOSky::calcSkyColorInDir(), color_gamma_correct(), color_pow(), and LLVOSky::updateHaze().

const F32 MOON_DISK_RADIUS = SUN_DISK_RADIUS * 0.9f

Definition at line 64 of file llvosky.cpp.

const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y

Definition at line 60 of file llvosky.cpp.

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

const S32 NUM_TILES_X = 8

Definition at line 58 of file llvosky.cpp.

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

const S32 NUM_TILES_Y = 4

Definition at line 59 of file llvosky.cpp.

const F32 SUN_DISK_INTENSITY = 24.f

Definition at line 66 of file llvosky.cpp.

const F32 SUN_DISK_RADIUS = 0.5f

Definition at line 63 of file llvosky.cpp.

const F32 SUN_INTENSITY = 1e5

Definition at line 65 of file llvosky.cpp.

Referenced by LLVOSky::LLVOSky().

const LLVector2 TEX00 = LLVector2(0.f, 0.f)

Definition at line 70 of file llvosky.cpp.

Referenced by LLVOSky::updateGeometry(), LLVOSky::updateHeavenlyBodyGeometry(), LLVOSky::updateReflectionGeometry(), and LLVOSky::updateSunHaloGeometry().

const LLVector2 TEX01 = LLVector2(0.f, 1.f)

Definition at line 71 of file llvosky.cpp.

Referenced by LLVOSky::updateGeometry(), LLVOSky::updateHeavenlyBodyGeometry(), LLVOSky::updateReflectionGeometry(), and LLVOSky::updateSunHaloGeometry().

const LLVector2 TEX10 = LLVector2(1.f, 0.f)

Definition at line 72 of file llvosky.cpp.

Referenced by LLVOSky::updateGeometry(), LLVOSky::updateHeavenlyBodyGeometry(), LLVOSky::updateReflectionGeometry(), and LLVOSky::updateSunHaloGeometry().

const LLVector2 TEX11 = LLVector2(1.f, 1.f)

Definition at line 73 of file llvosky.cpp.

Referenced by LLVOSky::updateGeometry(), LLVOSky::updateHeavenlyBodyGeometry(), LLVOSky::updateReflectionGeometry(), and LLVOSky::updateSunHaloGeometry().


Generated on Thu Jul 1 06:10:50 2010 for Second Life Viewer by  doxygen 1.4.7