llvosky.h File Reference

LLVOSky class header file. More...

#include "stdtypes.h"
#include "v3color.h"
#include "v4coloru.h"
#include "llviewerimage.h"
#include "llviewerobject.h"
#include "llframetimer.h"

Include dependency graph for llvosky.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LLSkyTex
class  LLHeavenBody
class  LLHaze
class  LLTranspMap
class  LLTranspMapSet
class  LLVOSky

Functions

LL_FORCE_INLINE LLColor3 color_div (const LLColor3 &col1, const LLColor3 &col2)
LLColor3 color_norm (const LLColor3 &col)
LLVector3 move_vec (const LLVector3 &v, 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 color_intens (const LLColor3 &col)
F32 color_max (const LLColor3 &col)
F32 color_max (const LLColor4 &col)
F32 color_min (const LLColor3 &col)
LLColor3 color_norm_abs (const LLColor3 &col)
LL_FORCE_INLINE LLColor3 refr_ind_calc (const LLColor3 &wave_length)
LL_FORCE_INLINE LLColor3 calc_air_sca_sea_level ()
F32 azimuth (const LLVector3 &v)
F32 color_norm_pow (LLColor3 &col, F32 e, BOOL postmultiply=FALSE)

Variables

const F32 HORIZON_DIST = 1024.0f
const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 10.f
const F32 HEAVENLY_BODY_FACTOR = 0.1f
const F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR
const F32 EARTH_RADIUS = 6.4e6f
const F32 ATM_EXP_FALLOFF = 0.000126f
const F32 ATM_SEA_LEVEL_NDENS = 2.55e25f
const F32 ATM_HEIGHT = 100000.f
const F32 FIRST_STEP = 5000.f
const F32 INV_FIRST_STEP = 1.f/FIRST_STEP
const S32 NO_STEPS = 15
const F32 INV_NO_STEPS = 1.f/NO_STEPS
const F32 sigma = 0.035f
const F32 fsigma = (6.f + 3.f * sigma) / (6.f-7.f*sigma)
const F64 Ndens = 2.55e25
const F64 Ndens2 = Ndens*Ndens
const LLColor3 gAirScaSeaLevel = calc_air_sca_sea_level()
const F32 AIR_SCA_INTENS = color_intens(gAirScaSeaLevel)
const F32 AIR_SCA_AVG = AIR_SCA_INTENS / 3


Detailed Description

LLVOSky class header file.

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


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().

LL_FORCE_INLINE LLColor3 calc_air_sca_sea_level (  ) 

Definition at line 325 of file llvosky.h.

References ATM_SEA_LEVEL_NDENS, color_div(), e, f, F_PI, fsigma, and refr_ind_calc().

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().

LL_FORCE_INLINE LLColor3 color_div ( const LLColor3 col1,
const LLColor3 col2 
)

Definition at line 73 of file llvosky.h.

References LLColor3::mV.

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

F32 color_intens ( const LLColor3 col  )  [inline]

Definition at line 87 of file llvosky.h.

References LLColor3::mV.

F32 color_max ( const LLColor4 col  )  [inline]

Definition at line 97 of file llvosky.h.

References llmax(), and LLColor4::mV.

F32 color_max ( const LLColor3 col  )  [inline]

Definition at line 92 of file llvosky.h.

References llmax(), and LLColor3::mV.

Referenced by LLVOSky::calcBrightnessScaleAndColors(), LLVOSky::calcSkyColorInDir(), color_norm(), color_norm_abs(), color_norm_fog(), color_norm_pow(), and LLVOSky::updateBrightestDir().

F32 color_min ( const LLColor3 col  )  [inline]

Definition at line 103 of file llvosky.h.

References llmin(), and LLColor3::mV.

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().

LLColor3 color_norm_abs ( const LLColor3 col  )  [inline]

Definition at line 108 of file llvosky.h.

References color_max(), e, and m.

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

Definition at line 2230 of file llvosky.cpp.

References color_max(), and color_pow().

Referenced by LLVOSky::calculateColors().

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

Definition at line 235 of file llvosky.cpp.

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

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

LL_FORCE_INLINE LLColor3 refr_ind_calc ( const LLColor3 wave_length  ) 

Definition at line 311 of file llvosky.h.

References e, f, i, LLColor3::mV, and S32.

Referenced by calc_air_sca_sea_level().


Variable Documentation

const F32 AIR_SCA_AVG = AIR_SCA_INTENS / 3

Definition at line 340 of file llvosky.h.

Referenced by LLVOSky::updateHaze().

const F32 AIR_SCA_INTENS = color_intens(gAirScaSeaLevel)

Definition at line 339 of file llvosky.h.

const F32 ATM_EXP_FALLOFF = 0.000126f

Definition at line 55 of file llvosky.h.

Referenced by LLHaze::calcFalloff().

const F32 ATM_HEIGHT = 100000.f

Definition at line 58 of file llvosky.h.

Referenced by LLVOSky::LLVOSky().

const F32 ATM_SEA_LEVEL_NDENS = 2.55e25f

Definition at line 56 of file llvosky.h.

Referenced by calc_air_sca_sea_level().

const F32 EARTH_RADIUS = 6.4e6f

Definition at line 54 of file llvosky.h.

Referenced by LLTranspMap::calcAirTranspDir(), LLVOSky::calcHeight(), LLTranspMap::calcHeight(), LLVOSky::calcHitsAtmEdge(), LLVOSky::calcHitsEarth(), LLVOSky::cosHorizon(), LLTranspMap::hitsAtmEdge(), LLTranspMap::init(), and LLVOSky::LLVOSky().

const F32 FIRST_STEP = 5000.f

Definition at line 60 of file llvosky.h.

Referenced by LLTranspMap::calcAirTranspDir(), LLVOSky::calcSkyColorInDir(), and LLVOSky::init().

const F32 fsigma = (6.f + 3.f * sigma) / (6.f-7.f*sigma)

Definition at line 68 of file llvosky.h.

Referenced by calc_air_sca_sea_level().

const LLColor3 gAirScaSeaLevel = calc_air_sca_sea_level()

Definition at line 338 of file llvosky.h.

Referenced by LLHaze::calcAirScaSeaLevel().

const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 10.f

Definition at line 51 of file llvosky.h.

Referenced by LLVOSky::updateHeavenlyBodyGeometry().

const F32 HEAVENLY_BODY_FACTOR = 0.1f

Definition at line 52 of file llvosky.h.

Referenced by LLVOSky::updateHeavenlyBodyGeometry().

const F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR

Definition at line 53 of file llvosky.h.

Referenced by LLVOSky::updateReflectionGeometry().

const F32 HORIZON_DIST = 1024.0f

Definition at line 50 of file llvosky.h.

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

const F32 INV_FIRST_STEP = 1.f/FIRST_STEP

Definition at line 61 of file llvosky.h.

Referenced by LLTranspMap::calcAirTranspDir().

const F32 INV_NO_STEPS = 1.f/NO_STEPS

Definition at line 63 of file llvosky.h.

Referenced by LLTranspMap::calcAirTranspDir().

const F64 Ndens = 2.55e25

Definition at line 69 of file llvosky.h.

const F64 Ndens2 = Ndens*Ndens

Definition at line 70 of file llvosky.h.

const S32 NO_STEPS = 15

Definition at line 62 of file llvosky.h.

Referenced by LLTranspMap::calcAirTranspDir(), LLVOSky::calcSkyColorInDir(), LLTranspMapSet::calcTransp(), and LLVOSky::init().

const F32 sigma = 0.035f

Definition at line 67 of file llvosky.h.


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