SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
Template for a single GLSL uniform variable. More...
#include <SLGLUniform.h>
Public Member Functions | |
SLGLUniform (SLUniformType type, const SLchar *name, T value, T inc=0.0f, T min=0.0f, T max=0.0f, SLKey keyInc=K_none) | |
SLGLUniform (const SLchar *name, function< T(void)> getFunc) | |
const SLchar * | name () |
T | value () |
SLbool | onKeyPress (const SLKey key, const SLKey mod) override |
Key press event-handler. More... | |
Public Member Functions inherited from SLEventHandler | |
SLEventHandler () | |
virtual | ~SLEventHandler () |
virtual SLbool | onMouseDown (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod) |
virtual SLbool | onMouseUp (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod) |
virtual SLbool | onMouseMove (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod) |
virtual SLbool | onDoubleClick (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod) |
virtual SLbool | onMouseWheel (const SLint delta, const SLKey mod) |
virtual SLbool | onTouch2Down (const SLint x1, const SLint y1, const SLint x2, const SLint y2) |
virtual SLbool | onTouch2Move (const SLint x1, const SLint y1, const SLint x2, const SLint y2) |
virtual SLbool | onTouch2Up (const SLint x1, const SLint y1, const SLint x2, const SLint y2) |
virtual SLbool | onTouch3Down (const SLint x1, const SLint y1) |
virtual SLbool | onTouch3Move (const SLint x1, const SLint y1) |
virtual SLbool | onTouch3Up (const SLint x1, const SLint y1) |
virtual SLbool | onKeyRelease (const SLKey key, const SLKey mod) |
virtual SLbool | onRotationPYR (const SLfloat pitchRAD, const SLfloat yawRAD, const SLfloat rollRAD) |
void | mouseRotationFactor (SLfloat rf) |
SLfloat | mouseRotationFactor () |
Private Attributes | |
SLstring | _name |
Name of the variable. More... | |
T | _value |
Current value. More... | |
T | _max |
Max. value for IncInc, IncDec & random types. More... | |
T | _min |
Min. value for IncInc, IncDec & random types. More... | |
T | _inc |
Increment value for IncInc, IncDec & Inc types. More... | |
SLUniformType | _type |
Uniform1f type. More... | |
SLKey | _keyInc |
keyboard key incrementing const values More... | |
function< T(void)> | getValue |
lambda getter function More... | |
Additional Inherited Members | |
Protected Attributes inherited from SLEventHandler | |
SLfloat | _mouseRotationFactor |
Mouse rotation sensibility. More... | |
SLfloat | _keyboardDeltaPos |
Delta dist. for keyboard translation. More... | |
Template for a single GLSL uniform variable.
Class for GLSL uniform variables that change per frame. An SLGLProgram holds a list of this type of uniform variables that are applied within the beginUse method.
Definition at line 23 of file SLGLUniform.h.
|
inline |
Definition at line 26 of file SLGLUniform.h.
|
inline |
Definition at line 43 of file SLGLUniform.h.
|
inline |
Definition at line 51 of file SLGLUniform.h.
|
inlineoverridevirtual |
Key press event-handler.
Reimplemented from SLEventHandler.
Definition at line 103 of file SLGLUniform.h.
|
inline |
calculates the current value & returns it. This method is called on every frame.
Definition at line 57 of file SLGLUniform.h.
|
private |
Increment value for IncInc, IncDec & Inc types.
Definition at line 143 of file SLGLUniform.h.
|
private |
keyboard key incrementing const values
Definition at line 145 of file SLGLUniform.h.
|
private |
Max. value for IncInc, IncDec & random types.
Definition at line 141 of file SLGLUniform.h.
|
private |
Min. value for IncInc, IncDec & random types.
Definition at line 142 of file SLGLUniform.h.
|
private |
Name of the variable.
Definition at line 139 of file SLGLUniform.h.
|
private |
Uniform1f type.
Definition at line 144 of file SLGLUniform.h.
|
private |
Current value.
Definition at line 140 of file SLGLUniform.h.
|
private |
lambda getter function
Definition at line 146 of file SLGLUniform.h.