|
Beatmup
|
#include <variables_bundle.h>
Classes | |
| class | MatrixParameter |
Public Member Functions | |
| void | clear () |
| Removes all stored variables. More... | |
| void | setInteger (std::string name, int value) |
| Sets a scalar integer uniform value. More... | |
| void | setInteger (std::string name, int x, int y) |
| void | setInteger (std::string name, int x, int y, int z) |
| void | setInteger (std::string name, int x, int y, int z, int w) |
| void | setFloat (std::string name, float value) |
| Sets a scalar float uniform value. More... | |
| void | setFloat (std::string name, float x, float y) |
| void | setFloat (std::string name, float x, float y, float z) |
| void | setFloat (std::string name, float x, float y, float z, float w) |
| void | setFloatMatrix2 (std::string name, const float matrix[4]) |
| Sets a float 2*2 matrix variable value. More... | |
| void | setFloatMatrix3 (std::string name, const float matrix[9]) |
| Sets a float 3*3 matrix variable value. More... | |
| void | setFloatMatrix4 (std::string name, const float matrix[16]) |
| Sets a float 4*4 matrix variable value. More... | |
| void | setFloatMatrix4 (std::string name, const Color::Matrix &matrix) |
| Sets a float 4*4 matrix variable value from a Color::Matrix instance. More... | |
| void | setFloatArray (std::string name, const std::vector< float > &values) |
| Sets a float array variable value. More... | |
| float | getFloat (const std::string &name) const |
| Retrieves a value of a scalar float uniform variable by its name. More... | |
Public Member Functions inherited from Beatmup::LockableObject | |
| void | lock () |
| void | unlock () |
Public Member Functions inherited from Beatmup::Object | |
| virtual | ~Object () |
Protected Member Functions | |
| void | apply (Program &program) |
Private Attributes | |
| std::map< std::string, int > | integers |
| std::map< std::string, float > | floats |
| std::map< std::string, std::vector< float > > | floatArrays |
| std::map< std::string, MatrixParameter > | params |
Definition at line 33 of file variables_bundle.h.
|
protected |
Definition at line 170 of file variables_bundle.cpp.
| void VariablesBundle::clear | ( | ) |
Removes all stored variables.
Definition at line 268 of file variables_bundle.cpp.
| void VariablesBundle::setInteger | ( | std::string | name, |
| int | value | ||
| ) |
Sets a scalar integer uniform value.
| name | The uniform variable name |
| value | The variable value |
Definition at line 62 of file variables_bundle.cpp.
| void VariablesBundle::setInteger | ( | std::string | name, |
| int | x, | ||
| int | y | ||
| ) |
Definition at line 66 of file variables_bundle.cpp.
| void VariablesBundle::setInteger | ( | std::string | name, |
| int | x, | ||
| int | y, | ||
| int | z | ||
| ) |
Definition at line 74 of file variables_bundle.cpp.
| void VariablesBundle::setInteger | ( | std::string | name, |
| int | x, | ||
| int | y, | ||
| int | z, | ||
| int | w | ||
| ) |
Definition at line 83 of file variables_bundle.cpp.
| void VariablesBundle::setFloat | ( | std::string | name, |
| float | value | ||
| ) |
Sets a scalar float uniform value.
| name | The uniform variable name |
| value | The variable value |
Definition at line 93 of file variables_bundle.cpp.
| void VariablesBundle::setFloat | ( | std::string | name, |
| float | x, | ||
| float | y | ||
| ) |
| void VariablesBundle::setFloat | ( | std::string | name, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
| void VariablesBundle::setFloat | ( | std::string | name, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
| void VariablesBundle::setFloatMatrix2 | ( | std::string | name, |
| const float | matrix[4] | ||
| ) |
Sets a float 2*2 matrix variable value.
| name | The uniform variable name |
| matrix | The variable value |
Definition at line 124 of file variables_bundle.cpp.
| void VariablesBundle::setFloatMatrix3 | ( | std::string | name, |
| const float | matrix[9] | ||
| ) |
Sets a float 3*3 matrix variable value.
| name | The uniform variable name |
| matrix | The variable value |
Definition at line 132 of file variables_bundle.cpp.
| void VariablesBundle::setFloatMatrix4 | ( | std::string | name, |
| const float | matrix[16] | ||
| ) |
Sets a float 4*4 matrix variable value.
| name | The uniform variable name |
| matrix | The variable value |
Definition at line 140 of file variables_bundle.cpp.
| void VariablesBundle::setFloatMatrix4 | ( | std::string | name, |
| const Color::Matrix & | matrix | ||
| ) |
Sets a float 4*4 matrix variable value from a Color::Matrix instance.
| name | The uniform variable name |
| matrix | The color matrix to copy values from |
Definition at line 148 of file variables_bundle.cpp.
| void VariablesBundle::setFloatArray | ( | std::string | name, |
| const std::vector< float > & | values | ||
| ) |
Sets a float array variable value.
| name | The uniform variable name |
| values | The values |
Definition at line 159 of file variables_bundle.cpp.
| float VariablesBundle::getFloat | ( | const std::string & | name | ) | const |
Retrieves a value of a scalar float uniform variable by its name.
| name | The variable name |
Definition at line 163 of file variables_bundle.cpp.
|
private |
Definition at line 66 of file variables_bundle.h.
|
private |
Definition at line 67 of file variables_bundle.h.
|
private |
Definition at line 68 of file variables_bundle.h.
|
private |
Definition at line 69 of file variables_bundle.h.