Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SH::ShAttrib< N, Binding, T, Swizzled > Class Template Reference

A generic attribute (or parameter) holding N values. More...

#include <ShAttrib.hpp>

Inheritance diagram for SH::ShAttrib< N, Binding, T, Swizzled >:

Inheritance graph
[legend]
Collaboration diagram for SH::ShAttrib< N, Binding, T, Swizzled >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T ValueType
typedef ShAttrib< N, SH_INPUT,
T > 
InputType
typedef ShAttrib< N, SH_OUTPUT,
T > 
OutputType
typedef ShAttrib< N, SH_INOUT,
T > 
InOutType
typedef ShAttrib< N, SH_TEMP,
T > 
TempType
typedef ShAttrib< N, SH_CONST,
T > 
ConstType

Public Member Functions

 ShAttrib (const ShGeneric< N, T > &other)
 ShAttrib (const ShAttrib< N, Binding, T, Swizzled > &other)
 ShAttrib (const ShVariableNodePtr &node, const ShSwizzle &swizzle, bool neg)
 ShAttrib (T data[N])
ShAttriboperator= (const ShGeneric< N, T > &other)
ShAttriboperator= (const ShAttrib< N, Binding, T, Swizzled > &other)
ShAttriboperator= (const ShProgram &prg)
ShAttriboperator+= (const ShGeneric< N, T > &right)
ShAttriboperator-= (const ShGeneric< N, T > &right)
ShAttriboperator *= (const ShGeneric< N, T > &right)
ShAttriboperator/= (const ShGeneric< N, T > &right)
ShAttriboperator%= (const ShGeneric< N, T > &right)
ShAttriboperator *= (T)
ShAttriboperator/= (T)
ShAttriboperator%= (T)
ShAttriboperator+= (T)
ShAttriboperator-= (T)
ShAttriboperator+= (const ShGeneric< 1, T > &)
ShAttriboperator-= (const ShGeneric< 1, T > &)
ShAttriboperator *= (const ShGeneric< 1, T > &)
ShAttriboperator/= (const ShGeneric< 1, T > &)
ShAttriboperator%= (const ShGeneric< 1, T > &)
ShAttrib< 1, Binding, T, true > operator() (int) const
ShAttrib< 2, Binding, T, true > operator() (int, int) const
ShAttrib< 3, Binding, T, true > operator() (int, int, int) const
ShAttrib< 4, Binding, T, true > operator() (int, int, int, int) const
ShAttrib< 1, Binding, T, true > operator[] (int) const
template<int N2> ShAttrib< N2, Binding, T,
true > 
swiz (int indices[]) const
ShAttrib operator- () const

Static Public Attributes

const int typesize
const ShBindingType binding_type
const ShSemanticType semantic_type

Detailed Description

template<int N, ShBindingType Binding, typename T = float, bool Swizzled = false>
class SH::ShAttrib< N, Binding, T, Swizzled >

A generic attribute (or parameter) holding N values.

The reason we have the Swizzle template argument is so that swizzled variables, which need to be copied (i.e. have an ASN statement generated) when another variable is initialized through them, may otherwise be simply placed into new variables (through copy constructor eliding, as per paragraph 12.8.15 of the C++ standard), causing variables to share ShVariableNodes when they shouldn't. By making swizzled variables separate types we enforce calling a conversion constructor instead, which cannot be elided. If this paragraph confuses you, and you're not modifying Sh internals, you may safely ignore it.

Definition at line 61 of file ShAttrib.hpp.


The documentation for this class was generated from the following files:
Generated on Mon Oct 18 14:17:54 2004 for Sh by doxygen 1.3.7