#include <ShGeneric.hpp>
Inheritance diagram for SH::ShGeneric< N, T >:
Public Types | |
typedef T | ValueType |
Public Member Functions | |
ShGeneric (const ShVariableNodePtr &node, ShSwizzle swizzle, bool neg) | |
ShGeneric & | operator= (const ShGeneric &other) |
ShGeneric & | operator= (const ShProgram &other) |
ShGeneric & | operator+= (const ShGeneric &right) |
ShGeneric & | operator-= (const ShGeneric &right) |
ShGeneric & | operator *= (const ShGeneric &right) |
ShGeneric & | operator/= (const ShGeneric &right) |
ShGeneric & | operator%= (const ShGeneric &right) |
ShGeneric & | operator+= (const ShGeneric< 1, T > &right) |
ShGeneric & | operator-= (const ShGeneric< 1, T > &right) |
ShGeneric & | operator *= (const ShGeneric< 1, T > &right) |
ShGeneric & | operator/= (const ShGeneric< 1, T > &right) |
ShGeneric & | operator%= (const ShGeneric< 1, T > &right) |
ShGeneric & | operator+= (T) |
ShGeneric & | operator-= (T) |
ShGeneric & | operator *= (T) |
ShGeneric & | operator/= (T) |
ShGeneric & | operator%= (T) |
ShGeneric | operator- () const |
ShGeneric | operator() () const |
Identity swizzle. | |
ShGeneric< 1, T > | operator() (int) const |
ShGeneric< 1, T > | operator[] (int) const |
ShGeneric< 2, T > | operator() (int, int) const |
ShGeneric< 3, T > | operator() (int, int, int) const |
ShGeneric< 4, T > | operator() (int, int, int, int) const |
template<int N2> ShGeneric< N2, T > | swiz (int indices[]) const |
Static Public Attributes | |
const int | typesize |
Protected Member Functions | |
ShGeneric (const ShVariableNodePtr &node) |
This class is provided to make definition of functions that work over n-tuples of particular types easier.
ShAttrib derives from ShGeneric. Unlike ShGeneric, which only has two template parameters, ShAttrib has four template parameters. This would make writing functions quite ugly. E.g.:
Without Generic:
template<int N, typename T, ShBindingType B1, ShBindingType B2, bool S1, bool S2> ShAttrib<N, SH_TEMP, T> add(const ShAttrib<N, B1, T, S1>& a, const ShAttrib<N, B2, T, S2>& b);
With Generic:
template<int N, typename T> ShAttrib<N, SH_TEMP, T> add(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b);
This class is explicitly instantiated for T = float with 1 <= N <= 4.
Definition at line 61 of file ShGeneric.hpp.