ImFusion C++ SDK 4.5.0
ImFusion::ImageMath::internal::GlExprInterface Class Referenceabstract

#include <ImFusion/ImageMath/OpenGL/GlExprInterface.h>

Base class for all expressions which provides an interface to automatically create shaders from an expression. More...

Inheritance diagram for ImFusion::ImageMath::internal::GlExprInterface:

Detailed Description

Base class for all expressions which provides an interface to automatically create shaders from an expression.

Public Member Functions

virtual std::string evalString (bool tagAndAssign=true) const =0
 Print expression.
virtual void tagAndAssignNames (std::unordered_map< internal::TaggingIndex, const void * > &taggedLeaves, std::unordered_map< std::type_index, int > &countPerLeafType, const std::string &prefix) const =0
 We need to tag leaves and tell unique leaves that they are responsible to define the uniforms and set the shader arguments.
virtual void getUniformDefinitionList (std::string &definitionList, const std::vector< int > &indices, const std::string &prefix) const =0
 Collect uniform/sampler definitions.
virtual void getVariableDefinitionList (std::string &definitionList, const std::vector< int > &indices, const std::string &prefix) const =0
 Collect variable definitions.
virtual int setArguments (GL::Program &p, const std::vector< int > &indices, const std::string &prefix) const =0
 Set uniform/sampler arguments.
ExprInterface & exprInterface ()
 Get image descriptor of the wrapped expression.
const ExprInterface & exprInterface () const
virtual std::vector< GlExprInterface * > children ()=0
 Used for traversing the expression tree. Contains the immediate children of node.
virtual std::vector< const GlExprInterface * > children () const =0
 Used for traversing the expression tree. Contains the immediate children of node.
virtual bool setMagFilter (ImageMath::MagFilter mag)
 Set interpolation behaviour of the current leaf (only).
virtual bool setWrap (ImageMath::Wrap wrap)
 Set interpolation behaviour of the current leaf (only).
bool setMagFilterRecursive (ImageMath::MagFilter mag)
 Set interpolation behaviour of the current leaf and all of its children.
bool setWrapRecursive (ImageMath::Wrap wrap)
 Set wrap behaviour of the current leaf and all of its children.

Member Function Documentation

◆ evalString()

◆ tagAndAssignNames()

virtual void ImFusion::ImageMath::internal::GlExprInterface::tagAndAssignNames ( std::unordered_map< internal::TaggingIndex, const void * > & taggedLeaves,
std::unordered_map< std::type_index, int > & countPerLeafType,
const std::string & prefix ) const
pure virtual

We need to tag leaves and tell unique leaves that they are responsible to define the uniforms and set the shader arguments.

The names for uniforms and variables will also be assigned during this stage

Implemented in ImFusion::ImageMath::internal::ArrayGl< ImplType >, ImFusion::ImageMath::internal::ArrayGl< Array< T, ImgType, BlockAccessEnabled > >, ImFusion::ImageMath::internal::BinaryOpGl, ImFusion::ImageMath::internal::CastWrapperGl, ImFusion::ImageMath::internal::ChannelReductionGl, ImFusion::ImageMath::internal::ChannelSwizzleViewGl, ImFusion::ImageMath::internal::ChannelWiseScalarGl< ImplType >, ImFusion::ImageMath::internal::ChannelWiseScalarGl< ChannelWiseScalar< T, Dim > >, ImFusion::ImageMath::internal::CombineChannelsGl, ImFusion::ImageMath::internal::CoordinatesGl, ImFusion::ImageMath::internal::DeformationLeafGl, ImFusion::ImageMath::internal::DeviceStrategyWrapperGl, ImFusion::ImageMath::internal::MaskLeafGl, ImFusion::ImageMath::internal::NoiseGl< ImplType >, ImFusion::ImageMath::internal::NoiseGl< Noise< imf_img_typeT, Scalar< float >, Scalar< float > > >, ImFusion::ImageMath::internal::PolyWrapper< ExprT >, ImFusion::ImageMath::internal::ResampleGl, ImFusion::ImageMath::internal::ScalarGl< ImplType >, ImFusion::ImageMath::internal::ScalarGl< Scalar< float > >, ImFusion::ImageMath::internal::ScalarGl< Scalar< T > >, ImFusion::ImageMath::internal::SelectGl, ImFusion::ImageMath::internal::StashGl, ImFusion::ImageMath::internal::UnaryOpGl, ImFusion::ImageMath::internal::VariableGl, and ImFusion::ImageMath::StringLeaf.

◆ getUniformDefinitionList()

virtual void ImFusion::ImageMath::internal::GlExprInterface::getUniformDefinitionList ( std::string & definitionList,
const std::vector< int > & indices,
const std::string & prefix ) const
pure virtual

◆ getVariableDefinitionList()

virtual void ImFusion::ImageMath::internal::GlExprInterface::getVariableDefinitionList ( std::string & definitionList,
const std::vector< int > & indices,
const std::string & prefix ) const
pure virtual

◆ setArguments()

virtual int ImFusion::ImageMath::internal::GlExprInterface::setArguments ( GL::Program & p,
const std::vector< int > & indices,
const std::string & prefix ) const
pure virtual

◆ children() [1/2]

virtual std::vector< GlExprInterface * > ImFusion::ImageMath::internal::GlExprInterface::children ( )
pure virtual

◆ children() [2/2]

◆ setMagFilter()

virtual bool ImFusion::ImageMath::internal::GlExprInterface::setMagFilter ( ImageMath::MagFilter mag)
virtual

Set interpolation behaviour of the current leaf (only).

Returns
true if the interpolation mode changed

Reimplemented in ImFusion::ImageMath::internal::ArrayGl< ImplType >, and ImFusion::ImageMath::internal::ArrayGl< Array< T, ImgType, BlockAccessEnabled > >.

◆ setWrap()

virtual bool ImFusion::ImageMath::internal::GlExprInterface::setWrap ( ImageMath::Wrap wrap)
virtual

Set interpolation behaviour of the current leaf (only).

Returns
true if the interpolation mode changed

Reimplemented in ImFusion::ImageMath::internal::ArrayGl< ImplType >, and ImFusion::ImageMath::internal::ArrayGl< Array< T, ImgType, BlockAccessEnabled > >.

◆ setMagFilterRecursive()

bool ImFusion::ImageMath::internal::GlExprInterface::setMagFilterRecursive ( ImageMath::MagFilter mag)

Set interpolation behaviour of the current leaf and all of its children.

Returns
true if the wrap mode changed

◆ setWrapRecursive()

bool ImFusion::ImageMath::internal::GlExprInterface::setWrapRecursive ( ImageMath::Wrap wrap)

Set wrap behaviour of the current leaf and all of its children.

Returns
true if the wrap mode changed

The documentation for this class was generated from the following file:
  • ImFusion/ImageMath/OpenGL/GlExprInterface.h
Search Tab / S to search, Esc to close