LLWLParamSet Class Reference

A class representing a set of parameter values for the WindLight shaders. More...

#include <llwlparamset.h>

Collaboration diagram for LLWLParamSet:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLWLParamSet ()
void update (LLGLSLShader *shader) const
 Update this set of shader uniforms from the parameter values.
void setAll (const LLSD &val)
 set the total llsd
const LLSDgetAll ()
 get the total llsd
void set (const char *paramName, float x)
void set (const char *paramName, float x, float y)
void set (const char *paramName, float x, float y, float z)
void set (const char *paramName, float x, float y, float z, float w)
void set (const char *paramName, const float *val)
void set (const char *paramName, const LLVector4 &val)
void set (const char *paramName, const LLColor4 &val)
LLVector4 getVector (const char *paramName, bool &error)
F32 getFloat (const char *paramName, bool &error)
void setStarBrightness (F32 val)
F32 getStarBrightness ()
 get the star brightness value;
void setSunAngle (F32 val)
F32 getSunAngle ()
void setEastAngle (F32 val)
F32 getEastAngle ()
void setEnableCloudScrollX (bool val)
bool getEnableCloudScrollX ()
 get the scroll x enable value;
void setEnableCloudScrollY (bool val)
bool getEnableCloudScrollY ()
 get the scroll enable y value;
void setCloudScrollX (F32 val)
F32 getCloudScrollX ()
 get the scroll x enable value;
void setCloudScrollY (F32 val)
F32 getCloudScrollY ()
 get the scroll enable y value;
void mix (LLWLParamSet &src, LLWLParamSet &dest, F32 weight)
void updateCloudScrolling (void)

Public Attributes

LLString mName

Private Attributes

LLSD mParamValues
float mCloudScrollXOffset
float mCloudScrollYOffset

Friends

class LLWLParamManager


Detailed Description

A class representing a set of parameter values for the WindLight shaders.

Definition at line 46 of file llwlparamset.h.


Constructor & Destructor Documentation

LLWLParamSet::LLWLParamSet ( void   ) 

Definition at line 46 of file llwlparamset.cpp.


Member Function Documentation

void LLWLParamSet::update ( LLGLSLShader shader  )  const

Update this set of shader uniforms from the parameter values.

Definition at line 77 of file llwlparamset.cpp.

References LLSD::beginMap(), LLSD::endMap(), i, mCloudScrollXOffset, mCloudScrollYOffset, mParamValues, LLVector4::mV, and LLGLSLShader::uniform4fv().

Referenced by LLWLParamManager::updateShaderUniforms().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::setAll ( const LLSD val  )  [inline]

set the total llsd

Definition at line 181 of file llwlparamset.h.

References LLSD::isMap(), and mParamValues.

Here is the call graph for this function:

const LLSD & LLWLParamSet::getAll (  )  [inline]

get the total llsd

Definition at line 188 of file llwlparamset.h.

References mParamValues.

void LLWLParamSet::set ( const char *  paramName,
float  x 
)

Set a float parameter.

Parameters:
paramName The name of the parameter to set.
x The float value to set.

Definition at line 133 of file llwlparamset.cpp.

References mParamValues.

Referenced by LLFloaterEnvSettings::onChangeCloudCoverage(), LLWLParamManager::propagateParameters(), WLFloatControl::update(), and WLColorControl::update().

Here is the caller graph for this function:

void LLWLParamSet::set ( const char *  paramName,
float  x,
float  y 
)

Set a float2 parameter.

Parameters:
paramName The name of the parameter to set.
x The x component's value to set.
y The y component's value to set.

Definition at line 149 of file llwlparamset.cpp.

References mParamValues.

void LLWLParamSet::set ( const char *  paramName,
float  x,
float  y,
float  z 
)

Set a float3 parameter.

Parameters:
paramName The name of the parameter to set.
x The x component's value to set.
y The y component's value to set.
z The z component's value to set.

Definition at line 154 of file llwlparamset.cpp.

References mParamValues.

void LLWLParamSet::set ( const char *  paramName,
float  x,
float  y,
float  z,
float  w 
)

Set a float4 parameter.

Parameters:
paramName The name of the parameter to set.
x The x component's value to set.
y The y component's value to set.
z The z component's value to set.
w The w component's value to set.

Definition at line 161 of file llwlparamset.cpp.

References mParamValues.

void LLWLParamSet::set ( const char *  paramName,
const float *  val 
)

Set a float4 parameter.

Parameters:
paramName The name of the parameter to set.
val An array of the 4 float values to set the parameter to.

Definition at line 169 of file llwlparamset.cpp.

References mParamValues.

void LLWLParamSet::set ( const char *  paramName,
const LLVector4 val 
)

Set a float4 parameter.

Parameters:
paramName The name of the parameter to set.
val A struct of the 4 float values to set the parameter to.

Definition at line 177 of file llwlparamset.cpp.

References mParamValues, and LLVector4::mV.

void LLWLParamSet::set ( const char *  paramName,
const LLColor4 val 
)

Set a float4 parameter.

Parameters:
paramName The name of the parameter to set.
val A struct of the 4 float values to set the parameter to.

Definition at line 185 of file llwlparamset.cpp.

References mParamValues, and LLColor4::mV.

LLVector4 LLWLParamSet::getVector ( const char *  paramName,
bool &  error 
)

Get a float4 parameter.

Parameters:
paramName The name of the parameter to set.
error A flag to set if it's not the proper return type

Definition at line 193 of file llwlparamset.cpp.

References LLSD::get(), LLSD::isArray(), mParamValues, and LLVector4::mV.

Referenced by LLVOSky::initAtmospherics(), and LLFloaterWindLight::syncMenu().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 LLWLParamSet::getFloat ( const char *  paramName,
bool &  error 
)

Get an integer parameter

Parameters:
paramName The name of the parameter to set.
error A flag to set if it's not the proper return type

Definition at line 214 of file llwlparamset.cpp.

References LLSD::asReal(), LLSD::get(), LLSD::isArray(), LLSD::isReal(), mParamValues, and LLSD::size().

Referenced by LLDrawPoolWLSky::renderStars(), and LLFloaterWindLight::syncMenu().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::setStarBrightness ( F32  val  )  [inline]

set the star's brightness

Parameters:
val brightness value

Definition at line 193 of file llwlparamset.h.

References mParamValues.

Referenced by mix(), and LLFloaterWindLight::onStarAlphaMoved().

Here is the caller graph for this function:

F32 LLWLParamSet::getStarBrightness (  )  [inline]

get the star brightness value;

Definition at line 197 of file llwlparamset.h.

References LLSD::asReal(), and mParamValues.

Referenced by mix(), and LLFloaterWindLight::syncMenu().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::setSunAngle ( F32  val  ) 

Definition at line 237 of file llwlparamset.cpp.

References F_TWO_PI, and mParamValues.

Referenced by mix(), and LLFloaterWindLight::onSunMoved().

Here is the caller graph for this function:

F32 LLWLParamSet::getSunAngle (  )  [inline]

Definition at line 201 of file llwlparamset.h.

References LLSD::asReal(), and mParamValues.

Referenced by mix(), LLFloaterWindLight::onSunMoved(), and LLWLParamManager::propagateParameters().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::setEastAngle ( F32  val  ) 

Definition at line 251 of file llwlparamset.cpp.

References F_TWO_PI, and mParamValues.

Referenced by mix(), and LLFloaterWindLight::onSunMoved().

Here is the caller graph for this function:

F32 LLWLParamSet::getEastAngle (  )  [inline]

Definition at line 205 of file llwlparamset.h.

References LLSD::asReal(), and mParamValues.

Referenced by mix(), LLFloaterWindLight::onSunMoved(), and LLWLParamManager::propagateParameters().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::setEnableCloudScrollX ( bool  val  )  [inline]

set the cloud scroll x enable value

Parameters:
val scroll x value

Definition at line 210 of file llwlparamset.h.

References mParamValues.

Referenced by LLFloaterWindLight::onCloudScrollXToggled().

Here is the caller graph for this function:

bool LLWLParamSet::getEnableCloudScrollX (  )  [inline]

get the scroll x enable value;

Definition at line 214 of file llwlparamset.h.

References LLSD::asBoolean(), and mParamValues.

Referenced by LLFloaterWindLight::syncMenu(), and updateCloudScrolling().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::setEnableCloudScrollY ( bool  val  )  [inline]

set the star's brightness

Parameters:
val scroll y bool value

Definition at line 218 of file llwlparamset.h.

References mParamValues.

Referenced by LLFloaterWindLight::onCloudScrollYToggled().

Here is the caller graph for this function:

bool LLWLParamSet::getEnableCloudScrollY (  )  [inline]

get the scroll enable y value;

Definition at line 222 of file llwlparamset.h.

References LLSD::asBoolean(), and mParamValues.

Referenced by LLFloaterWindLight::syncMenu(), and updateCloudScrolling().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::setCloudScrollX ( F32  val  )  [inline]

set the cloud scroll x enable value

Parameters:
val scroll x value

Definition at line 227 of file llwlparamset.h.

References mParamValues.

Referenced by LLFloaterWindLight::onCloudScrollXMoved().

Here is the caller graph for this function:

F32 LLWLParamSet::getCloudScrollX (  )  [inline]

get the scroll x enable value;

Definition at line 231 of file llwlparamset.h.

References LLSD::asReal(), and mParamValues.

Referenced by LLFloaterWindLight::syncMenu(), and updateCloudScrolling().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::setCloudScrollY ( F32  val  )  [inline]

set the star's brightness

Parameters:
val scroll y bool value

Definition at line 235 of file llwlparamset.h.

References mParamValues.

Referenced by LLFloaterWindLight::onCloudScrollYMoved().

Here is the caller graph for this function:

F32 LLWLParamSet::getCloudScrollY (  )  [inline]

get the scroll enable y value;

Definition at line 239 of file llwlparamset.h.

References LLSD::asReal(), and mParamValues.

Referenced by LLFloaterWindLight::syncMenu(), and updateCloudScrolling().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::mix ( LLWLParamSet src,
LLWLParamSet dest,
F32  weight 
)

interpolate two parameter sets

Parameters:
src The parameter set to start with
dest The parameter set to end with
weight The amount to interpolate

TODO masking will do this later

Definition at line 265 of file llwlparamset.cpp.

References LLSD::asReal(), LLSD::beginMap(), LLSD::endMap(), F_PI, getEastAngle(), getStarBrightness(), getSunAngle(), LLSD::has(), i, llassert, mParamValues, setEastAngle(), setStarBrightness(), setSunAngle(), and LLSD::size().

Referenced by LLWLAnimator::update().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamSet::updateCloudScrolling ( void   ) 

Definition at line 389 of file llwlparamset.cpp.

References getCloudScrollX(), getCloudScrollY(), LLTimer::getElapsedTimeAndResetF64(), getEnableCloudScrollX(), getEnableCloudScrollY(), mCloudScrollXOffset, and mCloudScrollYOffset.

Referenced by LLWLParamManager::update().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class LLWLParamManager [friend]

Definition at line 48 of file llwlparamset.h.


Member Data Documentation

Definition at line 57 of file llwlparamset.h.

Referenced by update(), and updateCloudScrolling().

Definition at line 57 of file llwlparamset.h.

Referenced by update(), and updateCloudScrolling().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:39:59 2008 for SecondLife by  doxygen 1.5.5