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

Miscellaneous operations
[Library Functions]


Functions

template<int M, int N, typename T> ShGeneric< M, T > SH::cast (const ShGeneric< N, T > &a)
 Casting.

template<int M> ShGeneric< M, float > cast (float a)
template<int M, int N, typename T> ShGeneric< M, T > SH::fillcast (const ShGeneric< N, T > &a)
 Fill Casting.

template<int M> ShGeneric< M, float > fillcast (float a)
template<int M, int N, typename T> ShGeneric< M+N, T > SH::join (const ShGeneric< M, T > &a, const ShGeneric< N, T > &b)
 Join two tuples Creates an M+N tuple with components of a first then b.

template<int N, typename T> void SH::discard (const ShGeneric< N, T > &c)
 Fragment discard.

template<int N, typename T> void SH::kill (const ShGeneric< N, T > &c)
 Fragment killing.

template<typename T> ShProgram SH::freeze (const ShProgram &p, const T &uniform)
 Uniform freezing.


Detailed Description

Some special versions of type-cast operators are defined to be able to deal with tuple size changes in various useful ways.

Function Documentation

template<int M, int N, typename T>
ShGeneric< M, T > SH::cast const ShGeneric< N, T > &  a  )  [inline]
 

Casting.

Casts ShGeneric<N, T> to ShGeneric<M, T>. If M > N, pads remaining components with 0s (on right). Otherwise, discards extra components.

Definition at line 38 of file ShLibMiscImpl.hpp.

template<int N, typename T>
void SH::discard const ShGeneric< N, T > &  c  )  [inline]
 

Fragment discard.

Only for fragment programs. Discards the current fragment if any(c) > 0.

Definition at line 94 of file ShLibMiscImpl.hpp.

Referenced by SH::kill().

template<int M, int N, typename T>
ShGeneric< M, T > SH::fillcast const ShGeneric< N, T > &  a  )  [inline]
 

Fill Casting.

Casts ShGeneric<N, T> to ShGeneric<M, T>. If M > N, copies last component to fill extra slots. Otherwise, discards extra components.

Definition at line 65 of file ShLibMiscImpl.hpp.

template<typename T>
ShProgram SH::freeze const ShProgram &  p,
const T &  uniform
 

Uniform freezing.

Replace uses of the given uniform in the given program with a constant containing its current value, and return the resulting program.

Definition at line 107 of file ShLibMiscImpl.hpp.

template<int N, typename T>
void SH::kill const ShGeneric< N, T > &  c  )  [inline]
 

Fragment killing.

Deprecated:
Use discard instead.

Definition at line 101 of file ShLibMiscImpl.hpp.

References SH::discard().


Generated on Fri Nov 5 16:51:41 2004 for Sh by doxygen 1.3.7