TDME2 1.9.121
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ShaderParameter Class Reference

Shader parameter model class. More...

#include <tdme/engine/ShaderParameter.h>

Collaboration diagram for ShaderParameter:
Collaboration graph

Public Types

enum  Type {
  TYPE_NONE , TYPE_BOOLEAN , TYPE_INTEGER , TYPE_FLOAT ,
  TYPE_VECTOR2 , TYPE_VECTOR3 , TYPE_VECTOR4
}
 

Public Member Functions

 ShaderParameter ()
 Public default constructor. More...
 
 ShaderParameter (bool booleanValue)
 Public constructor for boolean value. More...
 
 ShaderParameter (int integerValue)
 Public constructor for int value. More...
 
 ShaderParameter (float floatValue)
 Public constructor for float value. More...
 
 ShaderParameter (const Vector2 &vector2Value)
 Public constructor for Vector2 value. More...
 
 ShaderParameter (const Vector3 &vector3Value)
 Public constructor for Vector3 value. More...
 
 ShaderParameter (const Vector4 &vector4Value)
 Public constructor for Vector4 value. More...
 
Type getType () const
 
bool getBooleanValue () const
 
float getIntegerValue () const
 
float getFloatValue () const
 
const Vector2 getVector2Value () const
 
const Vector3 getVector3Value () const
 
const Vector4 getVector4Value () const
 
const string toString () const
 

Private Member Functions

const string toString (float value) const
 

Private Attributes

Type type { TYPE_NONE }
 
int integerValue { 0 }
 
array< float, 4 > floatValues { 0.0f, 0.0f, 0.0f, 0.0f }
 

Detailed Description

Shader parameter model class.

Definition at line 23 of file ShaderParameter.h.

Member Enumeration Documentation

◆ Type

enum Type
Enumerator
TYPE_NONE 
TYPE_BOOLEAN 
TYPE_INTEGER 
TYPE_FLOAT 
TYPE_VECTOR2 
TYPE_VECTOR3 
TYPE_VECTOR4 

Definition at line 25 of file ShaderParameter.h.

Constructor & Destructor Documentation

◆ ShaderParameter() [1/7]

ShaderParameter ( )
inline

Public default constructor.

Definition at line 44 of file ShaderParameter.h.

◆ ShaderParameter() [2/7]

ShaderParameter ( bool  booleanValue)
inline

Public constructor for boolean value.

Parameters
booleanValueboolean value

Definition at line 51 of file ShaderParameter.h.

◆ ShaderParameter() [3/7]

ShaderParameter ( int  integerValue)
inline

Public constructor for int value.

Parameters
integerValueint value

Definition at line 58 of file ShaderParameter.h.

◆ ShaderParameter() [4/7]

ShaderParameter ( float  floatValue)
inline

Public constructor for float value.

Parameters
floatValuefloat value

Definition at line 65 of file ShaderParameter.h.

◆ ShaderParameter() [5/7]

ShaderParameter ( const Vector2 vector2Value)
inline

Public constructor for Vector2 value.

Parameters
vector2ValueVector2 value

Definition at line 72 of file ShaderParameter.h.

◆ ShaderParameter() [6/7]

ShaderParameter ( const Vector3 vector3Value)
inline

Public constructor for Vector3 value.

Parameters
vector3ValueVector3 value

Definition at line 79 of file ShaderParameter.h.

◆ ShaderParameter() [7/7]

ShaderParameter ( const Vector4 vector4Value)
inline

Public constructor for Vector4 value.

Parameters
vector4ValueVector4 value

Definition at line 86 of file ShaderParameter.h.

Member Function Documentation

◆ getBooleanValue()

bool getBooleanValue ( ) const
inline
Returns
boolean value

Definition at line 99 of file ShaderParameter.h.

◆ getFloatValue()

float getFloatValue ( ) const
inline
Returns
float value

Definition at line 113 of file ShaderParameter.h.

◆ getIntegerValue()

float getIntegerValue ( ) const
inline
Returns
integer value

Definition at line 106 of file ShaderParameter.h.

◆ getType()

Type getType ( ) const
inline
Returns
type

Definition at line 92 of file ShaderParameter.h.

◆ getVector2Value()

const Vector2 getVector2Value ( ) const
inline
Returns
Vector2 value

Definition at line 120 of file ShaderParameter.h.

◆ getVector3Value()

const Vector3 getVector3Value ( ) const
inline
Returns
Vector3 value

Definition at line 127 of file ShaderParameter.h.

◆ getVector4Value()

const Vector4 getVector4Value ( ) const
inline
Returns
Vector4 value

Definition at line 134 of file ShaderParameter.h.

◆ toString() [1/2]

const string toString ( ) const
inline
Returns
string representation

Definition at line 141 of file ShaderParameter.h.

◆ toString() [2/2]

const string toString ( float  value) const
inlineprivate
Returns
value as string

Definition at line 35 of file ShaderParameter.h.

Member Data Documentation

◆ floatValues

array<float, 4> floatValues { 0.0f, 0.0f, 0.0f, 0.0f }
private

Definition at line 30 of file ShaderParameter.h.

◆ integerValue

int integerValue { 0 }
private

Definition at line 29 of file ShaderParameter.h.

◆ type

Type type { TYPE_NONE }
private

Definition at line 28 of file ShaderParameter.h.


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