Blender V5.0
Freestyle::UnaryFunction1D< T > Class Template Reference

#include <Functions1D.h>

Public Types

typedef T ReturnedValueType

Public Member Functions

 UnaryFunction1D ()
 UnaryFunction1D (IntegrationType iType)
virtual ~UnaryFunction1D ()
virtual string getName () const
virtual int operator() (Interface1D &inter)
void setIntegrationType (IntegrationType integration)
IntegrationType getIntegrationType () const

Public Attributes

T result
void * py_uf1D

Protected Attributes

IntegrationType _integration

Detailed Description

template<class T>
class Freestyle::UnaryFunction1D< T >

Base class for Unary Functions (functors) working on Interface1D. A unary function will be used by calling its operator() on an Interface1D.

Attention
In the scripting language, there exists several prototypes depending on the returned value type. For example, you would inherit from a UnaryFunction1DDouble if you wish to define a function that returns a double. The different existing prototypes are:
  • UnaryFunction1DDouble
  • UnaryFunction1DEdgeNature
  • UnaryFunction1DFloat
  • UnaryFunction1DUnsigned
  • UnaryFunction1DVec2f
  • UnaryFunction1DVec3f
  • UnaryFunction1DVectorViewShape
  • UnaryFunction1DVoid

Definition at line 45 of file Functions1D.h.

Member Typedef Documentation

◆ ReturnedValueType

template<class T>
typedef T Freestyle::UnaryFunction1D< T >::ReturnedValueType

The type of the value returned by the functor.

Definition at line 51 of file Functions1D.h.

Constructor & Destructor Documentation

◆ UnaryFunction1D() [1/2]

template<class T>
Freestyle::UnaryFunction1D< T >::UnaryFunction1D ( )
inline

Default constructor

Definition at line 54 of file Functions1D.h.

References _integration, and Freestyle::MEAN.

◆ UnaryFunction1D() [2/2]

template<class T>
Freestyle::UnaryFunction1D< T >::UnaryFunction1D ( IntegrationType iType)
inline

Builds a UnaryFunction1D from an integration type.

Parameters
iTypeIn case the result for the Interface1D would be obtained by evaluating a 0D function over the different Interface0D of the Interface1D, iType tells which integration method to use. The default integration method is the MEAN.

Definition at line 65 of file Functions1D.h.

References _integration.

◆ ~UnaryFunction1D()

template<class T>
virtual Freestyle::UnaryFunction1D< T >::~UnaryFunction1D ( )
inlinevirtual

destructor.

Definition at line 71 of file Functions1D.h.

Member Function Documentation

◆ getIntegrationType()

template<class T>
IntegrationType Freestyle::UnaryFunction1D< T >::getIntegrationType ( ) const
inline

Returns the integration method.

Definition at line 97 of file Functions1D.h.

References _integration.

◆ getName()

◆ operator()()

◆ setIntegrationType()

template<class T>
void Freestyle::UnaryFunction1D< T >::setIntegrationType ( IntegrationType integration)
inline

Sets the integration method

Definition at line 91 of file Functions1D.h.

References _integration.

Member Data Documentation

◆ _integration

template<class T>
IntegrationType Freestyle::UnaryFunction1D< T >::_integration
protected

◆ py_uf1D

template<class T>
void* Freestyle::UnaryFunction1D< T >::py_uf1D

Definition at line 48 of file Functions1D.h.

Referenced by operator()().

◆ result


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