The Vish Visualization Shell 0.3
Vish
Typedefs | Functions
Render Context Operators

Syntactic sugar to ease coupling of uniform shader parameters with TypedSlots and functions. More...

Typedefs

using Wizt::Anemone_Context_t = std::tuple< Anemone &, VRenderContext & >
 Helper construct to remember an Anemone and a VRenderContext, which can be combined by operator<< .
 

Functions

Anemone_Context_t Wizt::operator<< (Anemone &A, VRenderContext &VC)
 Combine an Anemone and a VRenderContext, as syntactic sugar to be used in the render context operators.
 
Anemone_Context_String_t Wizt::operator<< (const Anemone_Context_Parameter_t &AC, const string &name)
 Create an Anemone context with identifier.
 
MemCore::WeakPtr< VRenderContext::RenderFlagWizt::operator<< (const Anemone_Context_String_t &ACS, bool Value)
 Enable/Disable an OpenGL State.
 
template<int M, typename T >
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<< (const Anemone_Context_String_t &ACS, const Eagle::FixedArray< T, M > &Value)
 Set a constant value as render parameter.
 
template<class Modifier >
std::tuple< Anemone &, VRenderContext &, std::string, Modifier > Wizt::operator<< (const Anemone_Context_String_t &ACS, const Modifier &M)
 Include a modifier in the Anemone stream.
 
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<< (const Anemone_Context_String_t &ACS, double V)
 Set a constant value as render parameter.
 
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<< (const Anemone_Context_String_t &ACS, int V)
 Set a constant value as render parameter.
 
template<class Type >
Anemone_Context_Parameter_t Wizt::operator<< (const Anemone_Context_String_t &Target, const TypedSlot< Type > &InputSlot)
 Couple a uniform variable with an object's input slot using and the name of the shader variable must be identical to the name of the input slot.
 
template<class Type >
Anemone_Context_Parameter_t Wizt::operator<< (const Anemone_Context_String_t &Target, const VObject::in< Type > &InputSlot)
 Couple a uniform variable with an object's input slot using the name of the input slot.
 
template<class Type >
Anemone_Context_Parameter_t Wizt::operator<< (const Anemone_Context_String_t &Target, const VObject::inout< Type > &InputSlot)
 Couple a uniform variable with an object's input slot using the name of the input slot.
 
Anemone_Context_String_t Wizt::operator<< (const Anemone_Context_t &AC, const string &name)
 Create an Anemone context with identifier.
 
template<class Type >
Anemone_Context_Parameter_t Wizt::operator<< (const std::tuple< Anemone &, VRenderContext & > &Target, const TypedSlot< Type > &InputSlot)
 Couple a uniform variable with an object's input slot using the name of the input slot.
 
template<class Type , class Modifier >
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<< (const std::tuple< Anemone &, VRenderContext &, std::string, Modifier > &Target, const TypedSlot< Type > &InputSlot)
 Couple a Vish Object's input slot with a uniform shader variable via some functor, allowing for the following syntax:
 
template<class Object , class ParameterType >
const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const ParameterType &, VRenderContext &Context) const, const Object * > Wizt::operator<< (const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const ParameterType &, VRenderContext &Context) const > &Target, const Object *theObject)
 Couple an Anemone's updateValues() function with an VObject's member function.
 
template<class Object , class ParameterType >
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<< (const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const ParameterType &, VRenderContext &Context) const, const Object * > &Target, const ParameterType &Value)
 Couple an Anemone's updateValues() function with an VObject's member function.
 
template<class Object , class ParameterType , class Type >
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<< (const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const Type &, VRenderContext &Context) const, const Object * > &Target, const VObject::in< Type > &InputSlot)
 Couple an Anemone's updateValues() function with an VObject's member function via a modifier function on a slot.
 
template<class Object , class ParameterType , class Type >
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<< (const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const Type &, VRenderContext &Context) const, const Object * > &Target, const VObject::inout< Type > &InputSlot)
 Couple an Anemone's updateValues() function with an VObject's member function via a modifier function on a slot.
 
template<class Object , class ParameterType >
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<< (const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(VRenderContext &Context) const > &Target, const Object *theObject)
 Couple an Anemone's updateValues() function with an VObject's member function.
 
template<class Value >
MemCore::WeakPtr< VRenderContext::RenderParameterWizt::operator<<= (const Anemone_Context_String_t &ACS, const Value &V)
 Set a constant value as render parameter.
 
template<typename Type >
MemCore::RefPtr< RenderBasin::RenderParameterWizt::operator>> (const Anemone_Context_String_t &ACS, const Type &Functor)
 Couple an Anemone's updateValues() function with functor, in particular a lambda function:
 

Detailed Description

Syntactic sugar to ease coupling of uniform shader parameters with TypedSlots and functions.

This works by coupling the Anemone::updateValues(VRenderContext&Context) function with the context-relative evaluation of a TypedSlot.

Function Documentation

◆ operator<<() [1/11]

template<int M, typename T >
MemCore::WeakPtr< VRenderContext::RenderParameter > Wizt::operator<< ( const Anemone_Context_String_t &  ACS,
const Eagle::FixedArray< T, M > &  Value 
)
inline

Set a constant value as render parameter.

Anemone << Context << "shader_variable" << 3.0;
A set of variable names, with indices associated to each type.
Definition Context.hpp:18
Abstract object for elementary render objects.
Definition Anemone.hpp:39

◆ operator<<() [2/11]

template<class Type >
Anemone_Context_Parameter_t Wizt::operator<< ( const Anemone_Context_String_t &  Target,
const TypedSlot< Type > &  InputSlot 
)
inline

Couple a uniform variable with an object's input slot using and the name of the shader variable must be identical to the name of the input slot.

This allows for code such as:

RenderAnemone << Context << "MyColor" << inColor;

where inColor is an object's input

in<Color> inColor;

◆ operator<<() [3/11]

template<class Type >
Anemone_Context_Parameter_t Wizt::operator<< ( const Anemone_Context_String_t &  Target,
const VObject::in< Type > &  InputSlot 
)
inline

Couple a uniform variable with an object's input slot using the name of the input slot.

This allows for a syntax such as:

RenderAnemone << Context << "color" << inColor;

where inColor is an object's input

in<Color> inColor;

◆ operator<<() [4/11]

template<class Type >
Anemone_Context_Parameter_t Wizt::operator<< ( const Anemone_Context_String_t &  Target,
const VObject::inout< Type > &  InputSlot 
)
inline

Couple a uniform variable with an object's input slot using the name of the input slot.

This allows for a syntax such as:

RenderAnemone << Context << "color" << inColor;

where inColor is an object's input

inout<Color> inColor;

◆ operator<<() [5/11]

template<class Type >
Anemone_Context_Parameter_t Wizt::operator<< ( const std::tuple< Anemone &, VRenderContext & > &  Target,
const TypedSlot< Type > &  InputSlot 
)
inline

Couple a uniform variable with an object's input slot using the name of the input slot.

This allows for a syntax such as:

RenderAnemone << Context << inColor;

where inColor is an object's input

in<Color> inColor;

and the name of the shader variable must be identical to the name of the input slot.

Alternatively a name of the shader variable can be specified explictly:

RenderAnemone << Context << "MyColor" <<inColor;

◆ operator<<() [6/11]

template<class Type , class Modifier >
MemCore::WeakPtr< VRenderContext::RenderParameter > Wizt::operator<< ( const std::tuple< Anemone &, VRenderContext &, std::string, Modifier > &  Target,
const TypedSlot< Type > &  InputSlot 
)
inline

Couple a Vish Object's input slot with a uniform shader variable via some functor, allowing for the following syntax:

RenderAnemone << Context << "glPolygonMode" << &PolygonMode << inOptions;

whereas PolygonMode is a functor, for instance a function:

TypedSlot<Options> inOptions;
static int PolygonMode(const Options&Op)
{
if (Op("wireframe")) return 1;
else return 2;
}
A set of strings associated with a boolean, good to store true/false properties for each string.
Definition VFlagList.hpp:20
An input slot for VObjects, bound to a specific type.
Definition TypedSlot.hpp:57

The functor's return type must correspond to the uniform shader variable, the functor's parameter must correspond to the input slot's type.

◆ operator<<() [7/11]

template<class Object , class ParameterType >
const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const ParameterType &, VRenderContext &Context) const, const Object * > Wizt::operator<< ( const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const ParameterType &, VRenderContext &Context) const > &  Target,
const Object *  theObject 
)
inline

Couple an Anemone's updateValues() function with an VObject's member function.

Application code looks like this

RenderAnemone << Context << "glLineWidth" << &DisplayLines::adjustLineWidth << this << 5.0;

whereas

double DisplayLines::adjustLineWidth(const double&Value, VRenderContext&Context) const;
Base class for objects that may display something.
Definition VRenderContext.hpp:77

◆ operator<<() [8/11]

template<class Object , class ParameterType >
MemCore::WeakPtr< VRenderContext::RenderParameter > Wizt::operator<< ( const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const ParameterType &, VRenderContext &Context) const, const Object * > &  Target,
const ParameterType &  Value 
)
inline

Couple an Anemone's updateValues() function with an VObject's member function.

Application code looks like this

RenderAnemone << Context << "glLineWidth" << &DisplayLines::adjustLineWidth << this << 5.0;

whereas

double DisplayLines::adjustLineWidth(const double&Value, VRenderContext&Context) const;

◆ operator<<() [9/11]

template<class Object , class ParameterType , class Type >
MemCore::WeakPtr< VRenderContext::RenderParameter > Wizt::operator<< ( const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const Type &, VRenderContext &Context) const, const Object * > &  Target,
const VObject::in< Type > &  InputSlot 
)
inline

Couple an Anemone's updateValues() function with an VObject's member function via a modifier function on a slot.

RenderAnemone << Context << "glLineWidth" << &DisplayLines::adjustLineWidth << this << 5.0;

whereas

double DisplayLines::adjustLineWidth(const double&Value, VRenderContext&Context) const;

◆ operator<<() [10/11]

template<class Object , class ParameterType , class Type >
MemCore::WeakPtr< VRenderContext::RenderParameter > Wizt::operator<< ( const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(const Type &, VRenderContext &Context) const, const Object * > &  Target,
const VObject::inout< Type > &  InputSlot 
)
inline

Couple an Anemone's updateValues() function with an VObject's member function via a modifier function on a slot.

RenderAnemone << Context << "glLineWidth" << &DisplayLines::adjustLineWidth << this << 5.0;

whereas

double DisplayLines::adjustLineWidth(const double&Value, VRenderContext&Context) const;

◆ operator<<() [11/11]

template<class Object , class ParameterType >
MemCore::WeakPtr< VRenderContext::RenderParameter > Wizt::operator<< ( const std::tuple< Anemone &, VRenderContext &, std::string, ParameterType(Object::*)(VRenderContext &Context) const > &  Target,
const Object *  theObject 
)
inline

Couple an Anemone's updateValues() function with an VObject's member function.

Application code looks like this

RenderAnemone << ARC << "ColormapDataMax" << &DisplayFlatTriangles::setColormapDataMax << this;

whereas

double DisplayFlatTriangles::setColormapDataMin(VRenderContext&Context) const;

◆ operator>>()

template<typename Type >
MemCore::RefPtr< RenderBasin::RenderParameter > Wizt::operator>> ( const Anemone_Context_String_t &  ACS,
const Type &  Functor 
)
inline

Couple an Anemone's updateValues() function with functor, in particular a lambda function:

RenderAnemone << Context << "Observer" >>
[](const VRenderContext&C) { return C.CameraSettings.Observer; };

Note the special syntax >> used here. If "<<" is used, then it will try to set a constant value of type lambda, which fails.

References Wizt::Anemone::insert().