#include <llwaterparamset.h>
Public Member Functions | |
LLWaterParamSet () | |
void | update (LLGLSLShader *shader) const |
Bind this set of parameter values to the uniforms of a particular shader. | |
void | setAll (const LLSD &val) |
set the total llsd | |
const LLSD & | getAll () |
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 | getVector4 (const char *paramName, bool &error) |
LLVector3 | getVector3 (const char *paramName, bool &error) |
LLVector2 | getVector2 (const char *paramName, bool &error) |
F32 | getFloat (const char *paramName, bool &error) |
void | mix (LLWaterParamSet &src, LLWaterParamSet &dest, F32 weight) |
Public Attributes | |
LLString | mName |
Private Attributes | |
LLSD | mParamValues |
Friends | |
class | LLWaterParamManager |
Definition at line 46 of file llwaterparamset.h.
LLWaterParamSet::LLWaterParamSet | ( | void | ) |
Definition at line 49 of file llwaterparamset.cpp.
References LLSD::append(), DEFAULT_WATER_NORMAL, LLSD::emptyArray(), LLSD::insert(), and mParamValues.
void LLWaterParamSet::update | ( | LLGLSLShader * | shader | ) | const |
Bind this set of parameter values to the uniforms of a particular shader.
void LLWaterParamSet::setAll | ( | const LLSD & | val | ) | [inline] |
set the total llsd
Definition at line 140 of file llwaterparamset.h.
References LLSD::beginMap(), LLSD::endMap(), LLSD::isMap(), and mParamValues.
const LLSD & LLWaterParamSet::getAll | ( | ) | [inline] |
void LLWaterParamSet::set | ( | const char * | paramName, | |
float | x | |||
) |
Set a float parameter.
paramName | The name of the parameter to set. | |
x | The float value to set. |
Definition at line 90 of file llwaterparamset.cpp.
References mParamValues.
Referenced by WaterExpFloatControl::update(), WaterFloatControl::update(), WaterVector2Control::update(), WaterVector3Control::update(), and WaterColorControl::update().
void LLWaterParamSet::set | ( | const char * | paramName, | |
float | x, | |||
float | y | |||
) |
Set a float2 parameter.
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 106 of file llwaterparamset.cpp.
References mParamValues.
void LLWaterParamSet::set | ( | const char * | paramName, | |
float | x, | |||
float | y, | |||
float | z | |||
) |
Set a float3 parameter.
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 111 of file llwaterparamset.cpp.
References mParamValues.
void LLWaterParamSet::set | ( | const char * | paramName, | |
float | x, | |||
float | y, | |||
float | z, | |||
float | w | |||
) |
Set a float4 parameter.
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 118 of file llwaterparamset.cpp.
References mParamValues.
void LLWaterParamSet::set | ( | const char * | paramName, | |
const float * | val | |||
) |
Set a float4 parameter.
paramName | The name of the parameter to set. | |
val | An array of the 4 float values to set the parameter to. |
Definition at line 126 of file llwaterparamset.cpp.
References mParamValues.
void LLWaterParamSet::set | ( | const char * | paramName, | |
const LLVector4 & | val | |||
) |
Set a float4 parameter.
paramName | The name of the parameter to set. | |
val | A struct of the 4 float values to set the parameter to. |
Definition at line 134 of file llwaterparamset.cpp.
References mParamValues, and LLVector4::mV.
void LLWaterParamSet::set | ( | const char * | paramName, | |
const LLColor4 & | val | |||
) |
Set a float4 parameter.
paramName | The name of the parameter to set. | |
val | A struct of the 4 float values to set the parameter to. |
Definition at line 142 of file llwaterparamset.cpp.
References mParamValues, and LLColor4::mV.
LLVector4 LLWaterParamSet::getVector4 | ( | const char * | paramName, | |
bool & | error | |||
) |
Get a float4 parameter.
paramName | The name of the parameter to set. | |
error | A flag to set if it's not the proper return type |
Definition at line 150 of file llwaterparamset.cpp.
References LLSD::get(), LLSD::isArray(), mParamValues, LLVector4::mV, and LLSD::size().
Referenced by LLWaterParamManager::getFogColor(), and LLFloaterWater::syncMenu().
LLVector3 LLWaterParamSet::getVector3 | ( | const char * | paramName, | |
bool & | error | |||
) |
Get a float3 parameter.
paramName | The name of the parameter to set. | |
error | A flag to set if it's not the proper return type |
Definition at line 171 of file llwaterparamset.cpp.
References LLSD::get(), LLSD::isArray(), mParamValues, LLVector3::mV, and LLSD::size().
Referenced by LLWaterParamManager::getNormalScale(), and LLFloaterWater::syncMenu().
LLVector2 LLWaterParamSet::getVector2 | ( | const char * | paramName, | |
bool & | error | |||
) |
Get a float2 parameter.
paramName | The name of the parameter to set. | |
error | A flag to set if it's not the proper return type |
Definition at line 191 of file llwaterparamset.cpp.
References LLSD::get(), LLSD::isArray(), mParamValues, LLVector2::mV, and LLSD::size().
Referenced by LLWaterParamManager::getWave1Dir(), LLWaterParamManager::getWave2Dir(), and LLFloaterWater::syncMenu().
F32 LLWaterParamSet::getFloat | ( | const char * | paramName, | |
bool & | error | |||
) |
Get an integer parameter
paramName | The name of the parameter to set. | |
error | A flag to set if it's not the proper return type |
Definition at line 211 of file llwaterparamset.cpp.
References LLSD::asReal(), LLSD::get(), LLSD::isArray(), LLSD::isReal(), mParamValues, and LLSD::size().
Referenced by LLWaterParamManager::getBlurMultiplier(), LLWaterParamManager::getFogDensity(), LLWaterParamManager::getFresnelOffset(), LLWaterParamManager::getFresnelScale(), LLWaterParamManager::getScaleAbove(), LLWaterParamManager::getScaleBelow(), LLWaterParamManager::propagateParameters(), and LLFloaterWater::syncMenu().
void LLWaterParamSet::mix | ( | LLWaterParamSet & | src, | |
LLWaterParamSet & | dest, | |||
F32 | weight | |||
) |
interpolate two parameter sets
src | The parameter set to start with | |
dest | The parameter set to end with | |
weight | The amount to interpolate |
friend class LLWaterParamManager [friend] |
Definition at line 48 of file llwaterparamset.h.
Definition at line 51 of file llwaterparamset.h.
Referenced by LLWaterParamManager::getParamSet(), LLFloaterWater::onSavePreset(), and LLFloaterWater::saveAlertCallback().
LLSD LLWaterParamSet::mParamValues [private] |
Definition at line 55 of file llwaterparamset.h.
Referenced by getAll(), getFloat(), LLWaterParamManager::getNormalMapID(), getVector2(), getVector3(), getVector4(), LLWaterParamSet(), set(), setAll(), and LLWaterParamManager::setNormalMapID().