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

ShNibbles.hpp File Reference

A set of nibbles that are functions that return ShPrograms for basic operations. More...

#include "ShBaseTexture.hpp"
#include "ShProgram.hpp"
#include "ShMatrix.hpp"
#include "ShNibblesImpl.hpp"

Include dependency graph for ShNibbles.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  SH

Defines

#define SHNIBBLE_BINARY_OP_DECL(opname)

Functions

template<typename T>
ShProgram keep (const std::string &name="")
 Creates a keep nibble.
template<typename T>
ShProgram dup (const std::string &name="var")
 Creates a dup nibble.
template<typename T>
ShProgram lose (const std::string &name="")
 Creates a lose nibble.
template<typename T>
ShProgram access (const ShBaseTexture1D< T > &tex, const std::string &tcname="texcoord", const std::string &name="result")
 2D texture lookup nibble Inputs: IN(0) ShTexCoord1f texcoord Outputs: OUT(0) name = tex(tc)
template<typename T>
ShProgram access (const ShBaseTexture2D< T > &tex, const std::string &tcname="texcoord", const std::string &name="result")
 2D texture lookup nibble Inputs: IN(0) ShTexCoord2f texcoord Outputs: OUT(0) name = tex(tc)
template<typename T>
ShProgram access (const ShBaseTextureRect< T > &tex, const std::string &tcname="texcoord", const std::string &name="result")
 Rect texture lookup nibble Inputs: IN(0) ShTexCoord2f texcoord Outputs: OUT(0) name = tex(tc).
template<typename T>
ShProgram access (const ShBaseTexture3D< T > &tex, const std::string &tcname="texcoord", const std::string &name="result")
 3D texture lookup nibble Inputs: IN(0) ShTexCoord3f texcoord Outputs: OUT(0) name = tex(tc)
template<typename T>
ShProgram access (const ShBaseTextureCube< T > &tex, const std::string &tcname="texcoord", const std::string &name="result")
 Cube texture lookup nibble Inputs: IN(0) ShTexCoord3f texcoord Outputs: OUT(0) name = tex(tc).
template<typename T, int Rows, int Cols, ShBindingType Binding, typename T2>
ShProgram transform (const ShMatrix< Rows, Cols, Binding, T2 > &m, const std::string &name="result")
 transformation nibble Creates a nibble that transforms a variable of type T by a matrix of type ShMatrix<Rows, Cols, Binding, V> Inputs: IN(0) attrib Outputs: OUT(0) T name = m | attrib
template<typename T, typename T2>
ShProgram cast (const std::string &name="result")
 Casting nibble Casts from tuple type T to type T2 If T::typesize < T2::typesize, pads with 0 components at end.
template<typename T, typename T2>
ShProgram fillcast (const std::string &name="result")
 Fill-Casting nibble Casts from tuple type T to type T2 If T::typesize < T2::typesize, pads with repeated last component at end.
template<typename T>
ShProgram acos (const std::string &name="result")
template<typename T>
ShProgram asin (const std::string &name="result")
template<typename T>
ShProgram cos (const std::string &name="result")
template<typename T>
ShProgram frac (const std::string &name="result")
template<typename T>
ShProgram sin (const std::string &name="result")
template<typename T>
ShProgram sqrt (const std::string &name="result")
template<typename T>
ShProgram normalize (const std::string &name="result")
template<typename T>
ShProgram pos (const std::string &name="result")
 SHNIBBLE_BINARY_OP_DECL (add)
 SHNIBBLE_BINARY_OP_DECL (sub)
 SHNIBBLE_BINARY_OP_DECL (mul)
 SHNIBBLE_BINARY_OP_DECL (div)
 SHNIBBLE_BINARY_OP_DECL (pow)
 SHNIBBLE_BINARY_OP_DECL (slt)
 SHNIBBLE_BINARY_OP_DECL (sle)
 SHNIBBLE_BINARY_OP_DECL (sgt)
 SHNIBBLE_BINARY_OP_DECL (sge)
 SHNIBBLE_BINARY_OP_DECL (seq)
 SHNIBBLE_BINARY_OP_DECL (sne)
 SHNIBBLE_BINARY_OP_DECL (max)
 SHNIBBLE_BINARY_OP_DECL (min)
 SHNIBBLE_BINARY_OP_DECL (mod)
brief Nibble for dot product
operator *Inputs:IN(0) T a
*IN(1) T b *Outputs brief
Nibble for lerp 
operator *Inputs:IN (0) T1 a *IN(1) T1 b *IN(2) T2 alpha(T2
template<typename T1>
ShProgram lerp (const std::string &name="result")

Variables

brief Nibbles for unary operators * Inputs
brief Nibble for dot product
operator *Inputs:IN(0) T a
*IN(1) T b *Outputs brief
Nibble for lerp T2 ShProgram 
lerp (const std::string &name="result")


Detailed Description

A set of nibbles that are functions that return ShPrograms for basic operations.

Definition in file ShNibbles.hpp.


Function Documentation

template<typename T, typename T2>
ShProgram SH::cast const std::string &  name = "result"  ) 
 

Casting nibble Casts from tuple type T to type T2 If T::typesize < T2::typesize, pads with 0 components at end.

If T::typesize > T2::typesize, truncates components at end. Inputs: IN(0) T in Outputs: OUT(0) T2 name

Definition at line 121 of file ShNibblesImpl.hpp.

References SH_BEGIN_PROGRAM, and SH_NAMEDECL.

template<typename T>
ShProgram SH::dup const std::string &  name = "var"  ) 
 

Creates a dup nibble.

The dup nibble makes an extra copy of on input of type T named with the given name.

Definition at line 42 of file ShNibblesImpl.hpp.

References SH_BEGIN_PROGRAM, SH_END_PROGRAM, and SH_NAMEDECL.

template<typename T, typename T2>
ShProgram SH::fillcast const std::string &  name = "result"  ) 
 

Fill-Casting nibble Casts from tuple type T to type T2 If T::typesize < T2::typesize, pads with repeated last component at end.

If T::typesize > T2::typesize, truncates components at end. Inputs: IN(0) T in Outputs: OUT(0) T2 name

Definition at line 131 of file ShNibblesImpl.hpp.

References SH_BEGIN_PROGRAM, and SH_NAMEDECL.

template<typename T>
ShProgram SH::keep const std::string &  name = ""  ) 
 

Creates a keep nibble.

The keep nibble passes through one input of type T named with the given name.

Definition at line 33 of file ShNibblesImpl.hpp.

References SH_BEGIN_PROGRAM, SH_END_PROGRAM, and SH_NAMEDECL.

template<typename T>
ShProgram SH::lose const std::string &  name = ""  ) 
 

Creates a lose nibble.

The lose nibble discards through one input of type T named with the given name.

Definition at line 53 of file ShNibblesImpl.hpp.

References SH_BEGIN_PROGRAM, SH_END_PROGRAM, and SH_NAMEDECL.


Generated on Thu Apr 21 17:34:07 2005 for Sh by  doxygen 1.4.2