VTK-m  2.0
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes > Class Template Reference

Implicit function that can switch among different types. More...

#include <ImplicitFunction.h>

Inheritance diagram for vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >:
vtkm::cont::ExecutionAndControlObjectBase vtkm::cont::ExecutionObjectBase

Public Types

using Scalar = typename Superclass::Scalar
 
using Vector = typename Superclass::Vector
 

Public Member Functions

 ImplicitFunctionMultiplexer ()=default
 
template<typename FunctionType >
VTKM_EXEC_CONT ImplicitFunctionMultiplexer (const vtkm::internal::ImplicitFunctionBase< FunctionType > &function)
 
VTKM_EXEC_CONT Scalar Value (const Vector &point) const
 
VTKM_EXEC_CONT Vector Gradient (const Vector &point) const
 

Private Types

using Superclass = vtkm::internal::ImplicitFunctionBase< ImplicitFunctionMultiplexer< ImplicitFunctionTypes... > >
 

Private Attributes

vtkm::exec::Variant< ImplicitFunctionTypes... > Variant
 

Detailed Description

template<typename... ImplicitFunctionTypes>
class vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >

Implicit function that can switch among different types.

An ImplicitFunctionMultiplexer is a templated ImplicitFunction that takes as template arguments any number of other ImplicitFunctions that it can behave as. This allows you to decide at runtime which of these implicit functions to define and compute.

For example, let's say you want a filter that finds points either inside a sphere or inside a box. Rather than create 2 different filters, one for each type of implicit function, you can use ImplicitFunctionMultiplexer<Sphere, Box> and then set either a Sphere or a Box at runtime.

To use ImplicitFunctionMultiplexer, simply create the actual implicit function that you want to use, and then set the ImplicitFunctionMultiplexer to that concrete implicit function object.

Member Typedef Documentation

◆ Scalar

template<typename... ImplicitFunctionTypes>
using vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >::Scalar = typename Superclass::Scalar

◆ Superclass

template<typename... ImplicitFunctionTypes>
using vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >::Superclass = vtkm::internal::ImplicitFunctionBase<ImplicitFunctionMultiplexer<ImplicitFunctionTypes...> >
private

◆ Vector

template<typename... ImplicitFunctionTypes>
using vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >::Vector = typename Superclass::Vector

Constructor & Destructor Documentation

◆ ImplicitFunctionMultiplexer() [1/2]

template<typename... ImplicitFunctionTypes>
vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >::ImplicitFunctionMultiplexer ( )
default

◆ ImplicitFunctionMultiplexer() [2/2]

template<typename... ImplicitFunctionTypes>
template<typename FunctionType >
VTKM_EXEC_CONT vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >::ImplicitFunctionMultiplexer ( const vtkm::internal::ImplicitFunctionBase< FunctionType > &  function)
inline

Member Function Documentation

◆ Gradient()

template<typename... ImplicitFunctionTypes>
VTKM_EXEC_CONT Vector vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >::Gradient ( const Vector point) const
inline

◆ Value()

template<typename... ImplicitFunctionTypes>
VTKM_EXEC_CONT Scalar vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >::Value ( const Vector point) const
inline

Member Data Documentation

◆ Variant

template<typename... ImplicitFunctionTypes>
vtkm::exec::Variant<ImplicitFunctionTypes...> vtkm::ImplicitFunctionMultiplexer< ImplicitFunctionTypes >::Variant
private

The documentation for this class was generated from the following file: