MDL SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IFunction_definition Class Referenceabstract

This interface represents a function definition. More...

#include <ifunction_definition.h>

Inheritance diagram for mi::neuraylib::IFunction_definition:

Public Types

enum  Semantics {
  DS_UNKNOWN = 0 ,
  DS_CONV_CONSTRUCTOR ,
  DS_ELEM_CONSTRUCTOR ,
  DS_COLOR_SPECTRUM_CONSTRUCTOR ,
  DS_MATRIX_ELEM_CONSTRUCTOR ,
  DS_MATRIX_DIAG_CONSTRUCTOR ,
  DS_INVALID_REF_CONSTRUCTOR ,
  DS_DEFAULT_STRUCT_CONSTRUCTOR ,
  DS_TEXTURE_CONSTRUCTOR ,
  DS_CONV_OPERATOR ,
  DS_COPY_CONSTRUCTOR ,
  DS_BITWISE_COMPLEMENT = 0x0200 ,
  DS_UNARY_FIRST = DS_BITWISE_COMPLEMENT ,
  DS_OPERATOR_FIRST = DS_UNARY_FIRST ,
  DS_LOGICAL_NOT ,
  DS_POSITIVE ,
  DS_NEGATIVE ,
  DS_PRE_INCREMENT ,
  DS_PRE_DECREMENT ,
  DS_POST_INCREMENT ,
  DS_POST_DECREMENT ,
  DS_CAST ,
  DS_UNARY_LAST = DS_CAST ,
  DS_SELECT ,
  DS_BINARY_FIRST = DS_SELECT ,
  DS_ARRAY_INDEX ,
  DS_MULTIPLY ,
  DS_DIVIDE ,
  DS_MODULO ,
  DS_PLUS ,
  DS_MINUS ,
  DS_SHIFT_LEFT ,
  DS_SHIFT_RIGHT ,
  DS_UNSIGNED_SHIFT_RIGHT ,
  DS_LESS ,
  DS_LESS_OR_EQUAL ,
  DS_GREATER_OR_EQUAL ,
  DS_GREATER ,
  DS_EQUAL ,
  DS_NOT_EQUAL ,
  DS_BITWISE_AND ,
  DS_BITWISE_XOR ,
  DS_BITWISE_OR ,
  DS_LOGICAL_AND ,
  DS_LOGICAL_OR ,
  DS_ASSIGN ,
  DS_MULTIPLY_ASSIGN ,
  DS_DIVIDE_ASSIGN ,
  DS_MODULO_ASSIGN ,
  DS_PLUS_ASSIGN ,
  DS_MINUS_ASSIGN ,
  DS_SHIFT_LEFT_ASSIGN ,
  DS_SHIFT_RIGHT_ASSIGN ,
  DS_UNSIGNED_SHIFT_RIGHT_ASSIGN ,
  DS_BITWISE_OR_ASSIGN ,
  DS_BITWISE_XOR_ASSIGN ,
  DS_BITWISE_AND_ASSIGN ,
  DS_BINARY_LAST = DS_BITWISE_AND_ASSIGN ,
  DS_TERNARY ,
  DS_OPERATOR_LAST = DS_TERNARY ,
  DS_INTRINSIC_MATH_ABS = 0x0300 ,
  DS_INTRINSIC_MATH_FIRST = DS_INTRINSIC_MATH_ABS ,
  DS_INTRINSIC_MATH_ACOS ,
  DS_INTRINSIC_MATH_ALL ,
  DS_INTRINSIC_MATH_ANY ,
  DS_INTRINSIC_MATH_ASIN ,
  DS_INTRINSIC_MATH_ATAN ,
  DS_INTRINSIC_MATH_ATAN2 ,
  DS_INTRINSIC_MATH_AVERAGE ,
  DS_INTRINSIC_MATH_CEIL ,
  DS_INTRINSIC_MATH_CLAMP ,
  DS_INTRINSIC_MATH_COS ,
  DS_INTRINSIC_MATH_CROSS ,
  DS_INTRINSIC_MATH_DEGREES ,
  DS_INTRINSIC_MATH_DISTANCE ,
  DS_INTRINSIC_MATH_DOT ,
  DS_INTRINSIC_MATH_EVAL_AT_WAVELENGTH ,
  DS_INTRINSIC_MATH_EXP ,
  DS_INTRINSIC_MATH_EXP2 ,
  DS_INTRINSIC_MATH_FLOOR ,
  DS_INTRINSIC_MATH_FMOD ,
  DS_INTRINSIC_MATH_FRAC ,
  DS_INTRINSIC_MATH_ISNAN ,
  DS_INTRINSIC_MATH_ISFINITE ,
  DS_INTRINSIC_MATH_LENGTH ,
  DS_INTRINSIC_MATH_LERP ,
  DS_INTRINSIC_MATH_LOG ,
  DS_INTRINSIC_MATH_LOG2 ,
  DS_INTRINSIC_MATH_LOG10 ,
  DS_INTRINSIC_MATH_LUMINANCE ,
  DS_INTRINSIC_MATH_MAX ,
  DS_INTRINSIC_MATH_MAX_VALUE ,
  DS_INTRINSIC_MATH_MAX_VALUE_WAVELENGTH ,
  DS_INTRINSIC_MATH_MIN ,
  DS_INTRINSIC_MATH_MIN_VALUE ,
  DS_INTRINSIC_MATH_MIN_VALUE_WAVELENGTH ,
  DS_INTRINSIC_MATH_MODF ,
  DS_INTRINSIC_MATH_NORMALIZE ,
  DS_INTRINSIC_MATH_POW ,
  DS_INTRINSIC_MATH_RADIANS ,
  DS_INTRINSIC_MATH_ROUND ,
  DS_INTRINSIC_MATH_RSQRT ,
  DS_INTRINSIC_MATH_SATURATE ,
  DS_INTRINSIC_MATH_SIGN ,
  DS_INTRINSIC_MATH_SIN ,
  DS_INTRINSIC_MATH_SINCOS ,
  DS_INTRINSIC_MATH_SMOOTHSTEP ,
  DS_INTRINSIC_MATH_SQRT ,
  DS_INTRINSIC_MATH_STEP ,
  DS_INTRINSIC_MATH_TAN ,
  DS_INTRINSIC_MATH_TRANSPOSE ,
  DS_INTRINSIC_MATH_BLACKBODY ,
  DS_INTRINSIC_MATH_EMISSION_COLOR ,
  DS_INTRINSIC_MATH_COSH ,
  DS_INTRINSIC_MATH_SINH ,
  DS_INTRINSIC_MATH_TANH ,
  DS_INTRINSIC_MATH_INT_BITS_TO_FLOAT ,
  DS_INTRINSIC_MATH_FLOAT_BITS_TO_INT ,
  DS_INTRINSIC_MATH_DX ,
  DS_INTRINSIC_MATH_DY ,
  DS_INTRINSIC_MATH_LAST = DS_INTRINSIC_MATH_DY ,
  DS_INTRINSIC_STATE_POSITION = 0x0400 ,
  DS_INTRINSIC_STATE_FIRST = DS_INTRINSIC_STATE_POSITION ,
  DS_INTRINSIC_STATE_NORMAL ,
  DS_INTRINSIC_STATE_GEOMETRY_NORMAL ,
  DS_INTRINSIC_STATE_MOTION ,
  DS_INTRINSIC_STATE_TEXTURE_SPACE_MAX ,
  DS_INTRINSIC_STATE_TEXTURE_COORDINATE ,
  DS_INTRINSIC_STATE_TEXTURE_TANGENT_U ,
  DS_INTRINSIC_STATE_TEXTURE_TANGENT_V ,
  DS_INTRINSIC_STATE_TANGENT_SPACE ,
  DS_INTRINSIC_STATE_GEOMETRY_TANGENT_U ,
  DS_INTRINSIC_STATE_GEOMETRY_TANGENT_V ,
  DS_INTRINSIC_STATE_DIRECTION ,
  DS_INTRINSIC_STATE_ANIMATION_TIME ,
  DS_INTRINSIC_STATE_WAVELENGTH_BASE ,
  DS_INTRINSIC_STATE_TRANSFORM ,
  DS_INTRINSIC_STATE_TRANSFORM_POINT ,
  DS_INTRINSIC_STATE_TRANSFORM_VECTOR ,
  DS_INTRINSIC_STATE_TRANSFORM_NORMAL ,
  DS_INTRINSIC_STATE_TRANSFORM_SCALE ,
  DS_INTRINSIC_STATE_ROUNDED_CORNER_NORMAL ,
  DS_INTRINSIC_STATE_METERS_PER_SCENE_UNIT ,
  DS_INTRINSIC_STATE_SCENE_UNITS_PER_METER ,
  DS_INTRINSIC_STATE_OBJECT_ID ,
  DS_INTRINSIC_STATE_WAVELENGTH_MIN ,
  DS_INTRINSIC_STATE_WAVELENGTH_MAX ,
  DS_INTRINSIC_STATE_LAST = DS_INTRINSIC_STATE_WAVELENGTH_MAX ,
  DS_INTRINSIC_TEX_WIDTH = 0x0500 ,
  DS_INTRINSIC_TEX_FIRST = DS_INTRINSIC_TEX_WIDTH ,
  DS_INTRINSIC_TEX_HEIGHT ,
  DS_INTRINSIC_TEX_DEPTH ,
  DS_INTRINSIC_TEX_LOOKUP_FLOAT ,
  DS_INTRINSIC_TEX_LOOKUP_FLOAT2 ,
  DS_INTRINSIC_TEX_LOOKUP_FLOAT3 ,
  DS_INTRINSIC_TEX_LOOKUP_FLOAT4 ,
  DS_INTRINSIC_TEX_LOOKUP_COLOR ,
  DS_INTRINSIC_TEX_TEXEL_FLOAT ,
  DS_INTRINSIC_TEX_TEXEL_FLOAT2 ,
  DS_INTRINSIC_TEX_TEXEL_FLOAT3 ,
  DS_INTRINSIC_TEX_TEXEL_FLOAT4 ,
  DS_INTRINSIC_TEX_TEXEL_COLOR ,
  DS_INTRINSIC_TEX_TEXTURE_ISVALID ,
  DS_INTRINSIC_TEX_WIDTH_OFFSET ,
  DS_INTRINSIC_TEX_HEIGHT_OFFSET ,
  DS_INTRINSIC_TEX_DEPTH_OFFSET ,
  DS_INTRINSIC_TEX_FIRST_FRAME ,
  DS_INTRINSIC_TEX_LAST_FRAME ,
  DS_INTRINSIC_TEX_GRID_TO_OBJECT_SPACE ,
  DS_INTRINSIC_TEX_LAST = DS_INTRINSIC_TEX_GRID_TO_OBJECT_SPACE ,
  DS_INTRINSIC_DF_DIFFUSE_REFLECTION_BSDF = 0x0600 ,
  DS_INTRINSIC_DF_FIRST = DS_INTRINSIC_DF_DIFFUSE_REFLECTION_BSDF ,
  DS_INTRINSIC_DF_DUSTY_DIFFUSE_REFLECTION_BSDF ,
  DS_INTRINSIC_DF_DIFFUSE_TRANSMISSION_BSDF ,
  DS_INTRINSIC_DF_SPECULAR_BSDF ,
  DS_INTRINSIC_DF_SIMPLE_GLOSSY_BSDF ,
  DS_INTRINSIC_DF_BACKSCATTERING_GLOSSY_REFLECTION_BSDF ,
  DS_INTRINSIC_DF_MEASURED_BSDF ,
  DS_INTRINSIC_DF_DIFFUSE_EDF ,
  DS_INTRINSIC_DF_MEASURED_EDF ,
  DS_INTRINSIC_DF_SPOT_EDF ,
  DS_INTRINSIC_DF_ANISOTROPIC_VDF ,
  DS_INTRINSIC_DF_FOG_VDF ,
  DS_INTRINSIC_DF_NORMALIZED_MIX ,
  DS_INTRINSIC_DF_CLAMPED_MIX ,
  DS_INTRINSIC_DF_WEIGHTED_LAYER ,
  DS_INTRINSIC_DF_FRESNEL_LAYER ,
  DS_INTRINSIC_DF_CUSTOM_CURVE_LAYER ,
  DS_INTRINSIC_DF_MEASURED_CURVE_LAYER ,
  DS_INTRINSIC_DF_THIN_FILM ,
  DS_INTRINSIC_DF_TINT ,
  DS_INTRINSIC_DF_DIRECTIONAL_FACTOR ,
  DS_INTRINSIC_DF_MEASURED_CURVE_FACTOR ,
  DS_INTRINSIC_DF_LIGHT_PROFILE_POWER ,
  DS_INTRINSIC_DF_LIGHT_PROFILE_MAXIMUM ,
  DS_INTRINSIC_DF_LIGHT_PROFILE_ISVALID ,
  DS_INTRINSIC_DF_BSDF_MEASUREMENT_ISVALID ,
  DS_INTRINSIC_DF_MICROFACET_BECKMANN_SMITH_BSDF ,
  DS_INTRINSIC_DF_MICROFACET_GGX_SMITH_BSDF ,
  DS_INTRINSIC_DF_MICROFACET_BECKMANN_VCAVITIES_BSDF ,
  DS_INTRINSIC_DF_MICROFACET_GGX_VCAVITIES_BSDF ,
  DS_INTRINSIC_DF_WARD_GEISLER_MORODER_BSDF ,
  DS_INTRINSIC_DF_COLOR_NORMALIZED_MIX ,
  DS_INTRINSIC_DF_COLOR_CLAMPED_MIX ,
  DS_INTRINSIC_DF_COLOR_WEIGHTED_LAYER ,
  DS_INTRINSIC_DF_COLOR_FRESNEL_LAYER ,
  DS_INTRINSIC_DF_COLOR_CUSTOM_CURVE_LAYER ,
  DS_INTRINSIC_DF_COLOR_MEASURED_CURVE_LAYER ,
  DS_INTRINSIC_DF_FRESNEL_FACTOR ,
  DS_INTRINSIC_DF_MEASURED_FACTOR ,
  DS_INTRINSIC_DF_CHIANG_HAIR_BSDF ,
  DS_INTRINSIC_DF_SHEEN_BSDF ,
  DS_INTRINSIC_DF_UNBOUNDED_MIX ,
  DS_INTRINSIC_DF_COLOR_UNBOUNDED_MIX ,
  DS_INTRINSIC_DF_LAST = DS_INTRINSIC_DF_COLOR_UNBOUNDED_MIX ,
  DS_INTRINSIC_NVIDIA_DF_ASHIKHMIN_SHIRLEY_GLOSSY_BSDF = 0x0700 ,
  DS_INTRINSIC_NVIDIA_DF_FIRST = DS_INTRINSIC_NVIDIA_DF_ASHIKHMIN_SHIRLEY_GLOSSY_BSDF ,
  DS_INTRINSIC_NVIDIA_DF_SIMPLE_GLOSSY_BSDF_LEGACY ,
  DS_INTRINSIC_NVIDIA_DF_LEGACY_MCP_GLOSSY_BSDF ,
  DS_INTRINSIC_NVIDIA_DF_COAT_ABSORPTION ,
  DS_INTRINSIC_NVIDIA_DF_SHEEN_LTC_BSDF ,
  DS_INTRINSIC_NVIDIA_DF_LAST = DS_INTRINSIC_NVIDIA_DF_SHEEN_LTC_BSDF ,
  DS_INTRINSIC_SCENE_DATA_ISVALID = 0x0800 ,
  DS_INTRINSIC_SCENE_FIRST = DS_INTRINSIC_SCENE_DATA_ISVALID ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_INT ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_INT2 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_INT3 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_INT4 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT2 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT3 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT4 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_COLOR ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_INT ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_INT2 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_INT3 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_INT4 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT2 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT3 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT4 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_COLOR ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT4X4 ,
  DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT4X4 ,
  DS_INTRINSIC_SCENE_LAST = DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT4X4 ,
  DS_INTRINSIC_DEBUG_BREAKPOINT = 0x0900 ,
  DS_INTRINSIC_DEBUG_FIRST = DS_INTRINSIC_DEBUG_BREAKPOINT ,
  DS_INTRINSIC_DEBUG_ASSERT ,
  DS_INTRINSIC_DEBUG_PRINT ,
  DS_INTRINSIC_DEBUG_LAST = DS_INTRINSIC_DEBUG_PRINT ,
  DS_INTRINSIC_DAG_FIELD_ACCESS = 0x0A00 ,
  DS_INTRINSIC_DAG_FIRST = DS_INTRINSIC_DAG_FIELD_ACCESS ,
  DS_INTRINSIC_DAG_ARRAY_CONSTRUCTOR ,
  DS_INTRINSIC_DAG_ARRAY_LENGTH ,
  DS_INTRINSIC_DAG_LAST = DS_INTRINSIC_DAG_ARRAY_LENGTH ,
  DS_FORCE_32_BIT = 0xffffffffU
}
 All known semantics of functions definitions. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x3504744d, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x8a2a4da9, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x1bcb8d48, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 

Public Member Functions

virtual const char * get_module () const =0
 Returns the DB name of the module containing this function definition. More...
 
virtual const char * get_mdl_name () const =0
 Returns the MDL name of the function definition. More...
 
virtual const char * get_mdl_module_name () const =0
 Returns the MDL name of the module containing this function definition. More...
 
virtual const char * get_mdl_simple_name () const =0
 Returns the simple MDL name of the function definition. More...
 
virtual const char * get_mdl_parameter_type_name (Size index) const =0
 Returns the type name of the parameter at index. More...
 
virtual const char * get_prototype () const =0
 Returns the DB name of the prototype, or NULL if this function definition is not a variant. More...
 
virtual void get_mdl_version (Mdl_version &since, Mdl_version &removed) const =0
 Returns the MDL version when this function definition was added and removed. More...
 
virtual Semantics get_semantic () const =0
 Returns the semantic of this function definition. More...
 
bool is_array_constructor () const
 Indicates whether this definition represents the array constructor. More...
 
virtual bool is_exported () const =0
 Indicates whether the function definition is exported by its module. More...
 
virtual bool is_uniform () const =0
 Indicates whether the function definition is uniform. More...
 
virtual bool is_material () const =0
 Indicates whether the definition represents a material. More...
 
virtual const ITypeget_return_type () const =0
 Returns the return type. More...
 
template<class T>
const T * get_return_type () const
 Returns the return type. More...
 
virtual Size get_parameter_count () const =0
 Returns the number of parameters. More...
 
virtual const char * get_parameter_name (Size index) const =0
 Returns the name of the parameter at index. More...
 
virtual Size get_parameter_index (const char *name) const =0
 Returns the index position of a parameter. More...
 
virtual const IType_listget_parameter_types () const =0
 Returns the types of all parameters. More...
 
virtual const IExpression_listget_defaults () const =0
 Returns the defaults of all parameters. More...
 
virtual const IExpression_listget_enable_if_conditions () const =0
 Returns the enable_if conditions of all parameters. More...
 
virtual Size get_enable_if_users (Size index) const =0
 Returns the number of other parameters whose enable_if condition might depend on the argument of the given parameter. More...
 
virtual Size get_enable_if_user (Size index, Size u_index) const =0
 Returns the index of a parameter whose enable_if condition might depend on the argument of the given parameter. More...
 
virtual const IAnnotation_blockget_annotations () const =0
 Returns the annotations of the function definition itself, or NULL if there are no such annotations. More...
 
virtual const IAnnotation_blockget_return_annotations () const =0
 Returns the annotations of the return type of this function definition, or NULL if there are no such annotations. More...
 
virtual const IAnnotation_listget_parameter_annotations () const =0
 Returns the annotations of all parameters. More...
 
virtual const char * get_thumbnail () const =0
 Returns the resolved file name of the thumbnail image for this function definition. More...
 
virtual bool is_valid (IMdl_execution_context *context) const =0
 Returns true if the definition is valid, false otherwise. More...
 
virtual const IExpressionget_body () const =0
 Returns the expression that represents the body of the function (if possible). More...
 
virtual Size get_temporary_count () const =0
 Returns the number of temporaries used by this function. More...
 
virtual const IExpressionget_temporary (Size index) const =0
 Returns the expression of a temporary. More...
 
virtual const char * get_temporary_name (Size index) const =0
 Returns the name of a temporary. More...
 
template<class T>
const T * get_temporary (Size index) const
 Returns the expression of a temporary. More...
 
virtual IFunction_callcreate_function_call (const IExpression_list *arguments, Sint32 *errors=0) const =0
 Creates a new function call. More...
 
virtual const char * get_mdl_mangled_name () const =0
 Returns the mangled name of the function. More...
 
- Public Member Functions inherited from mi::neuraylib::IScene_element
virtual Element_type get_element_type () const =0
 Indicates the actual scene element represented by interfaces derived from this interface. More...
 
- Public Member Functions inherited from mi::neuraylib::IAttribute_set
virtual IDatacreate_attribute (const char *name, const char *type)=0
 Creates a new attribute name of the type type. More...
 
template<class T>
T * create_attribute (const char *name, const char *type)
 Creates a new attribute name of the type type. More...
 
template<class T>
T * create_attribute (const char *name)
 Creates a new attribute name of the type T. More...
 
virtual bool destroy_attribute (const char *name)=0
 Destroys the attribute name. More...
 
virtual const IDataaccess_attribute (const char *name) const =0
 Returns a const pointer to the attribute name. More...
 
template<class T>
const T * access_attribute (const char *name) const
 Returns a const pointer to the attribute name. More...
 
virtual IDataedit_attribute (const char *name)=0
 Returns a mutable pointer to the attribute name. More...
 
template<class T>
T * edit_attribute (const char *name)
 Returns a mutable pointer to the attribute name. More...
 
virtual bool is_attribute (const char *name) const =0
 Indicates existence of an attribute. More...
 
virtual const char * get_attribute_type_name (const char *name) const =0
 Returns the type of an attribute. More...
 
virtual Sint32 set_attribute_propagation (const char *name, Propagation_type value)=0
 Sets the propagation type of the attribute name. More...
 
virtual Propagation_type get_attribute_propagation (const char *name) const =0
 Returns the propagation type of the attribute name. More...
 
virtual const char * enumerate_attributes (Sint32 index) const =0
 Returns the name of the attribute indicated by index. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mi::base::Interface_declare< 0x3504744d, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x8a2a4da9, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x1bcb8d48, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed Description

This interface represents a function definition.

A function definition describes the formal structure of a function call, i.e. the number, types, names, and defaults of its parameters, as well as its return type. The create_function_call() method allows to create function calls based on this function definition.

Note
This interface also supports materials, which are considered as a special kind of functions, namely functions with the return type "material".
See Template-like function definitions for function definitions with special semantics.
See also
mi::neuraylib::IFunction_call, mi::neuraylib::IModule, mi::neuraylib::Definition_wrapper

Member Enumeration Documentation

 Semantics

All known semantics of functions definitions.

Material definitions always have the semantic DS_UNKNOWN.

Note
Do not rely on the numeric values of the enumerators since they may change without further notice.
Enumerator
DS_UNKNOWN 

Unknown semantics.

DS_CONV_CONSTRUCTOR 

The conversion constructor.

DS_ELEM_CONSTRUCTOR 

The elemental constructor.

DS_COLOR_SPECTRUM_CONSTRUCTOR 

The color from spectrum constructor.

DS_MATRIX_ELEM_CONSTRUCTOR 

The matrix elemental constructor.

DS_MATRIX_DIAG_CONSTRUCTOR 

The matrix diagonal constructor.

DS_INVALID_REF_CONSTRUCTOR 

The invalid reference constructor.

DS_DEFAULT_STRUCT_CONSTRUCTOR 

The default constructor for a struct.

DS_TEXTURE_CONSTRUCTOR 

The texture constructor.

DS_CONV_OPERATOR 

The type conversion operator.

DS_COPY_CONSTRUCTOR 

The copy constructor.

DS_BITWISE_COMPLEMENT 

The bitwise complement operator.

DS_LOGICAL_NOT 

The unary logical negation operator.

DS_POSITIVE 

The unary arithmetic positive operator.

DS_NEGATIVE 

The unary arithmetic negation operator.

DS_PRE_INCREMENT 

The pre-increment operator.

DS_PRE_DECREMENT 

The pre-decrement operator.

DS_POST_INCREMENT 

The post-increment operator.

DS_POST_DECREMENT 

The post-decrement operator.

DS_CAST 

The cast operator. See Cast operator.

DS_SELECT 

The select operator.

DS_ARRAY_INDEX 

The array index operator. See Array index operator.

DS_MULTIPLY 

The multiplication operator.

DS_DIVIDE 

The division operator.

DS_MODULO 

The modulus operator.

DS_PLUS 

The addition operator.

DS_MINUS 

The subtraction operator.

DS_SHIFT_LEFT 

The shift-left operator.

DS_SHIFT_RIGHT 

The arithmetic shift-right operator.

DS_UNSIGNED_SHIFT_RIGHT 

The unsigned shift-right operator.

DS_LESS 

The less operator.

DS_LESS_OR_EQUAL 

The less-or-equal operator.

DS_GREATER_OR_EQUAL 

The greater-or-equal operator.

DS_GREATER 

The greater operator.

DS_EQUAL 

The equal operator.

DS_NOT_EQUAL 

The not-equal operator.

DS_BITWISE_AND 

The bitwise and operator.

DS_BITWISE_XOR 

The bitwise xor operator.

DS_BITWISE_OR 

The bitwise or operator.

DS_LOGICAL_AND 

The logical and operator.

DS_LOGICAL_OR 

The logical or operator.

DS_ASSIGN 

The assign operator.

DS_MULTIPLY_ASSIGN 

The multiplication-assign operator.

DS_DIVIDE_ASSIGN 

The division-assign operator.

DS_MODULO_ASSIGN 

The modulus-assign operator.

DS_PLUS_ASSIGN 

The plus-assign operator.

DS_MINUS_ASSIGN 

The minus-assign operator.

DS_SHIFT_LEFT_ASSIGN 

The shift-left-assign operator.

DS_SHIFT_RIGHT_ASSIGN 

The arithmetic shift-right-assign operator.

DS_UNSIGNED_SHIFT_RIGHT_ASSIGN 

The unsigned shift-right-assign operator.

DS_BITWISE_OR_ASSIGN 

The bitwise or-assign operator.

DS_BITWISE_XOR_ASSIGN 

The bitwise xor-assign operator.

DS_BITWISE_AND_ASSIGN 

The bitwise and-assign operator.

DS_TERNARY 

The ternary operator (conditional). See Ternary operator.

DS_INTRINSIC_MATH_ABS 

The math::abs() intrinsic function.

DS_INTRINSIC_MATH_ACOS 

The math::acos() intrinsic function.

DS_INTRINSIC_MATH_ALL 

The math::all() intrinsic function.

DS_INTRINSIC_MATH_ANY 

The math::any() intrinsic function.

DS_INTRINSIC_MATH_ASIN 

The math::asin() intrinsic function.

DS_INTRINSIC_MATH_ATAN 

The math::atan() intrinsic function.

DS_INTRINSIC_MATH_ATAN2 

The math::atan2() intrinsic function.

DS_INTRINSIC_MATH_AVERAGE 

The math::average() intrinsic function.

DS_INTRINSIC_MATH_CEIL 

The math::ceil() intrinsic function.

DS_INTRINSIC_MATH_CLAMP 

The math::clamp() intrinsic function.

DS_INTRINSIC_MATH_COS 

The math::cos() intrinsic function.

DS_INTRINSIC_MATH_CROSS 

The math::cross() intrinsic function.

DS_INTRINSIC_MATH_DEGREES 

The math::degrees() intrinsic function.

DS_INTRINSIC_MATH_DISTANCE 

The math::distance() intrinsic function.

DS_INTRINSIC_MATH_DOT 

The math::dot() intrinsic function.

DS_INTRINSIC_MATH_EVAL_AT_WAVELENGTH 

The math::eval_at_wavelength() intrinsic function.

DS_INTRINSIC_MATH_EXP 

The math::exp() intrinsic function.

DS_INTRINSIC_MATH_EXP2 

The math::exp2() intrinsic function.

DS_INTRINSIC_MATH_FLOOR 

The math::floor() intrinsic function.

DS_INTRINSIC_MATH_FMOD 

The math::fmod() intrinsic function.

DS_INTRINSIC_MATH_FRAC 

The math::frac() intrinsic function.

DS_INTRINSIC_MATH_ISNAN 

The math::isnan() intrinsic function.

DS_INTRINSIC_MATH_ISFINITE 

The math::isfinite() intrinsic function.

DS_INTRINSIC_MATH_LENGTH 

The math::length() intrinsic function.

DS_INTRINSIC_MATH_LERP 

The math::lerp() intrinsic function.

DS_INTRINSIC_MATH_LOG 

The math::log() intrinsic function.

DS_INTRINSIC_MATH_LOG2 

The math::log2() intrinsic function.

DS_INTRINSIC_MATH_LOG10 

The math::log10() intrinsic function.

DS_INTRINSIC_MATH_LUMINANCE 

The math::luminance() intrinsic function.

DS_INTRINSIC_MATH_MAX 

The math::max() intrinsic function.

DS_INTRINSIC_MATH_MAX_VALUE 

The math::max_value() intrinsic function.

DS_INTRINSIC_MATH_MAX_VALUE_WAVELENGTH 

The math::max_value_wavelength() intrinsic function.

DS_INTRINSIC_MATH_MIN 

The math::min() intrinsic function.

DS_INTRINSIC_MATH_MIN_VALUE 

The math::min_value() intrinsic function.

DS_INTRINSIC_MATH_MIN_VALUE_WAVELENGTH 

The math::min_value_wavelength() intrinsic function.

DS_INTRINSIC_MATH_MODF 

The math::modf() intrinsic function.

DS_INTRINSIC_MATH_NORMALIZE 

The math::normalize() intrinsic function.

DS_INTRINSIC_MATH_POW 

The math::pow() intrinsic function.

DS_INTRINSIC_MATH_RADIANS 

The math::radians() intrinsic function.

DS_INTRINSIC_MATH_ROUND 

The math::round() intrinsic function.

DS_INTRINSIC_MATH_RSQRT 

The math::rsqrt() intrinsic function.

DS_INTRINSIC_MATH_SATURATE 

The math::saturate() intrinsic function.

DS_INTRINSIC_MATH_SIGN 

The math::sign() intrinsic function.

DS_INTRINSIC_MATH_SIN 

The math::sin() intrinsic function.

DS_INTRINSIC_MATH_SINCOS 

The math::sincos() intrinsic function.

DS_INTRINSIC_MATH_SMOOTHSTEP 

The math::smoothstep() intrinsic function.

DS_INTRINSIC_MATH_SQRT 

The math::sqrt() intrinsic function.

DS_INTRINSIC_MATH_STEP 

The math::step() intrinsic function.

DS_INTRINSIC_MATH_TAN 

The math::tan() intrinsic function.

DS_INTRINSIC_MATH_TRANSPOSE 

The math::transpose() intrinsic function.

DS_INTRINSIC_MATH_BLACKBODY 

The math::blackbody() intrinsic function.

DS_INTRINSIC_MATH_EMISSION_COLOR 

The math::emission_color() intrinsic function.

DS_INTRINSIC_MATH_COSH 

The math::cosh() intrinsic function.

DS_INTRINSIC_MATH_SINH 

The math::sinh() intrinsic function.

DS_INTRINSIC_MATH_TANH 

The math::tanh() intrinsic function.

DS_INTRINSIC_MATH_INT_BITS_TO_FLOAT 

The math::int_bits_to_float() intrinsic function.

DS_INTRINSIC_MATH_FLOAT_BITS_TO_INT 

The math::float_bits_to_int() intrinsic function.

DS_INTRINSIC_MATH_DX 

The math::DX() intrinsic function.

DS_INTRINSIC_MATH_DY 

The math::DY() intrinsic function.

DS_INTRINSIC_STATE_POSITION 

The state::position() function.

DS_INTRINSIC_STATE_NORMAL 

The state::normal() function.

DS_INTRINSIC_STATE_GEOMETRY_NORMAL 

The state::geometry_normal() function.

DS_INTRINSIC_STATE_MOTION 

The state::motion() function.

DS_INTRINSIC_STATE_TEXTURE_SPACE_MAX 

The state::texture_space_max() function.

DS_INTRINSIC_STATE_TEXTURE_COORDINATE 

The state::texture_coordinate() function.

DS_INTRINSIC_STATE_TEXTURE_TANGENT_U 

The state::texture_tangent_u() function.

DS_INTRINSIC_STATE_TEXTURE_TANGENT_V 

The state::texture_tangent_v() function.

DS_INTRINSIC_STATE_TANGENT_SPACE 

The state::tangent_space() function.

DS_INTRINSIC_STATE_GEOMETRY_TANGENT_U 

The state::geometry_tangent_u() function.

DS_INTRINSIC_STATE_GEOMETRY_TANGENT_V 

The state::geometry_tangent_v() function.

DS_INTRINSIC_STATE_DIRECTION 

The state::direction() function.

DS_INTRINSIC_STATE_ANIMATION_TIME 

The state::animation_time() function.

DS_INTRINSIC_STATE_WAVELENGTH_BASE 

The state::wavelength_base() function.

DS_INTRINSIC_STATE_TRANSFORM 

The state::transform() function.

DS_INTRINSIC_STATE_TRANSFORM_POINT 

The state::transform_point() function.

DS_INTRINSIC_STATE_TRANSFORM_VECTOR 

The state::transform_vector() function.

DS_INTRINSIC_STATE_TRANSFORM_NORMAL 

The state::transform_normal() function.

DS_INTRINSIC_STATE_TRANSFORM_SCALE 

The state::transform_scale() function.

DS_INTRINSIC_STATE_ROUNDED_CORNER_NORMAL 

The state::rounded_corner_normal() function.

DS_INTRINSIC_STATE_METERS_PER_SCENE_UNIT 

The state::meters_per_scene_unit() function.

DS_INTRINSIC_STATE_SCENE_UNITS_PER_METER 

The state::scene_units_per_meter() function.

DS_INTRINSIC_STATE_OBJECT_ID 

The state::object_id() function.

DS_INTRINSIC_STATE_WAVELENGTH_MIN 

The state::wavelength_min() function.

DS_INTRINSIC_STATE_WAVELENGTH_MAX 

The state::wavelength_max() function.

DS_INTRINSIC_TEX_WIDTH 

The tex::width() function.

DS_INTRINSIC_TEX_HEIGHT 

The tex::height() function.

DS_INTRINSIC_TEX_DEPTH 

The tex::depth() function.

DS_INTRINSIC_TEX_LOOKUP_FLOAT 

The tex::lookup_float() function.

DS_INTRINSIC_TEX_LOOKUP_FLOAT2 

The tex::lookup_float2() function.

DS_INTRINSIC_TEX_LOOKUP_FLOAT3 

The tex::lookup_float3() function.

DS_INTRINSIC_TEX_LOOKUP_FLOAT4 

The tex::lookup_float4() function.

DS_INTRINSIC_TEX_LOOKUP_COLOR 

The tex::lookup_color() function.

DS_INTRINSIC_TEX_TEXEL_FLOAT 

The tex::texel_float() function.

DS_INTRINSIC_TEX_TEXEL_FLOAT2 

The tex::texel_float2() function.

DS_INTRINSIC_TEX_TEXEL_FLOAT3 

The tex::texel_float3() function.

DS_INTRINSIC_TEX_TEXEL_FLOAT4 

The tex::texel_float4() function.

DS_INTRINSIC_TEX_TEXEL_COLOR 

The tex::texel_color() function.

DS_INTRINSIC_TEX_TEXTURE_ISVALID 

The tex::texture_isvalid() function.

DS_INTRINSIC_TEX_WIDTH_OFFSET 

The tex::width_offset() function.

DS_INTRINSIC_TEX_HEIGHT_OFFSET 

The tex::height_offset() function.

DS_INTRINSIC_TEX_DEPTH_OFFSET 

The tex::depth_offset() function.

DS_INTRINSIC_TEX_FIRST_FRAME 

The tex::first_frame() function.

DS_INTRINSIC_TEX_LAST_FRAME 

The tex::last_frame() function.

DS_INTRINSIC_TEX_GRID_TO_OBJECT_SPACE 

The tex::grid_to_object_space() function.

DS_INTRINSIC_DF_DIFFUSE_REFLECTION_BSDF 

The df::diffuse_reflection_bsdf() function.

DS_INTRINSIC_DF_DUSTY_DIFFUSE_REFLECTION_BSDF 

The df::dusty_diffuse_reflection_bsdf() function.

DS_INTRINSIC_DF_DIFFUSE_TRANSMISSION_BSDF 

The df::diffuse_transmission_bsdf() function.

DS_INTRINSIC_DF_SPECULAR_BSDF 

The df::specular_bsdf() function.

DS_INTRINSIC_DF_SIMPLE_GLOSSY_BSDF 

The df::simple_glossy_bsdf() function.

DS_INTRINSIC_DF_BACKSCATTERING_GLOSSY_REFLECTION_BSDF 

The df::backscattering_glossy_reflection_bsdf() function.

DS_INTRINSIC_DF_MEASURED_BSDF 

The df::measured_bsdf() function.

DS_INTRINSIC_DF_DIFFUSE_EDF 

The df::diffuse_edf() function.

DS_INTRINSIC_DF_MEASURED_EDF 

The df::measured_edf() function.

DS_INTRINSIC_DF_SPOT_EDF 

The df::spot_edf() function.

DS_INTRINSIC_DF_ANISOTROPIC_VDF 

The df::anisotropic_vdf() function.

DS_INTRINSIC_DF_FOG_VDF 

The df::fog_vdf() function.

DS_INTRINSIC_DF_NORMALIZED_MIX 

The df::normalized_mix() function.

DS_INTRINSIC_DF_CLAMPED_MIX 

The df::clamped_mix() function.

DS_INTRINSIC_DF_WEIGHTED_LAYER 

The df::weighted_layer() function.

DS_INTRINSIC_DF_FRESNEL_LAYER 

The df::fresnel_layer() function.

DS_INTRINSIC_DF_CUSTOM_CURVE_LAYER 

The df::custom_curve_layer() function.

DS_INTRINSIC_DF_MEASURED_CURVE_LAYER 

The df::measured_curve_layer() function.

DS_INTRINSIC_DF_THIN_FILM 

The df::thin_film() function.

DS_INTRINSIC_DF_TINT 

The df::tint() function.

DS_INTRINSIC_DF_DIRECTIONAL_FACTOR 

The df::directional_factor() function.

DS_INTRINSIC_DF_MEASURED_CURVE_FACTOR 

The df::measured_curve_factor() function.

DS_INTRINSIC_DF_LIGHT_PROFILE_POWER 

The df::light_profile_power() function.

DS_INTRINSIC_DF_LIGHT_PROFILE_MAXIMUM 

The df::light_profile_maximum() function.

DS_INTRINSIC_DF_LIGHT_PROFILE_ISVALID 

The df::light_profile_isvalid() function.

DS_INTRINSIC_DF_BSDF_MEASUREMENT_ISVALID 

The df::bsdf_measurement_is_valid() function.

DS_INTRINSIC_DF_MICROFACET_BECKMANN_SMITH_BSDF 

The df::microfacet_beckmann_smith_bsdf() function.

DS_INTRINSIC_DF_MICROFACET_GGX_SMITH_BSDF 

The df::microfacet_ggx_smith_bsdf() function.

DS_INTRINSIC_DF_MICROFACET_BECKMANN_VCAVITIES_BSDF 

The df::microfacet_beckmann_vcavities() function.

DS_INTRINSIC_DF_MICROFACET_GGX_VCAVITIES_BSDF 

The df::microfacet_ggx_vcavities() function.

DS_INTRINSIC_DF_WARD_GEISLER_MORODER_BSDF 

The df::ward_geisler_moroder_bsdf() function.

DS_INTRINSIC_DF_COLOR_NORMALIZED_MIX 

The df::color_normalized_mix() function.

DS_INTRINSIC_DF_COLOR_CLAMPED_MIX 

The df::color_clamped_mix() function.

DS_INTRINSIC_DF_COLOR_WEIGHTED_LAYER 

The df::color_weighted_layer() function.

DS_INTRINSIC_DF_COLOR_FRESNEL_LAYER 

The df::color_fresnel_layer() function.

DS_INTRINSIC_DF_COLOR_CUSTOM_CURVE_LAYER 

The df::color_custom_curve_layer() function.

DS_INTRINSIC_DF_COLOR_MEASURED_CURVE_LAYER 

The df::color_measured_curve_layer() function.

DS_INTRINSIC_DF_FRESNEL_FACTOR 

The df::fresnel_factor() function.

DS_INTRINSIC_DF_MEASURED_FACTOR 

The df::measured_factor() function.

DS_INTRINSIC_DF_CHIANG_HAIR_BSDF 

The df::chiang_hair_bsdf() function.

DS_INTRINSIC_DF_SHEEN_BSDF 

The df::sheen_bsdf() function.

DS_INTRINSIC_DF_UNBOUNDED_MIX 

The df::unbounded_mix() function.

DS_INTRINSIC_DF_COLOR_UNBOUNDED_MIX 

The df::color_unbounded() function.

DS_INTRINSIC_NVIDIA_DF_ASHIKHMIN_SHIRLEY_GLOSSY_BSDF 

The nvidia::df::ashikhmin_shirley_glossy_bsdf() function.

DS_INTRINSIC_NVIDIA_DF_SIMPLE_GLOSSY_BSDF_LEGACY 

The nvidia::df::simple_glossy_bsdf_legacy() function.

DS_INTRINSIC_NVIDIA_DF_LEGACY_MCP_GLOSSY_BSDF 

The nvidia::df::legacy_mcp_glossy_bsdf() function.

DS_INTRINSIC_NVIDIA_DF_COAT_ABSORPTION 

The nvidia::df::coat_absorption() function.

DS_INTRINSIC_NVIDIA_DF_SHEEN_LTC_BSDF 

The nvidia::df::sheen_ltc_bsdf() function.

DS_INTRINSIC_SCENE_DATA_ISVALID 

The scene::data_is_valid() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_INT 

The scene::data_lookup_int() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_INT2 

The scene::data_lookup_int2() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_INT3 

The scene::data_lookup_int3() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_INT4 

The scene::data_lookup_int4() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT 

The scene::data_lookup_float() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT2 

The scene::data_lookup_float2() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT3 

The scene::data_lookup_float3() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT4 

The scene::data_lookup_float4() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_COLOR 

The scene::data_lookup_color() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_INT 

The scene::data_lookup_uniform_int() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_INT2 

The scene::data_lookup_uniform_int2() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_INT3 

The scene::data_lookup_uniform_int3() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_INT4 

The scene::data_lookup_uniform_int4() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT 

The scene::data_lookup_uniform_float() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT2 

The scene::data_lookup_uniform_float2() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT3 

The scene::data_lookup_uniform_float3() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT4 

The scene::data_lookup_uniform_float4() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_COLOR 

The scene::data_lookup_uniform_color() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_FLOAT4X4 

The scene::data_lookup_float4x4() function.

DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT4X4 

The scene::data_lookup_uniform_float4x4() function.

DS_INTRINSIC_DEBUG_BREAKPOINT 

The debug::breakpoint() function.

DS_INTRINSIC_DEBUG_ASSERT 

The debug::assert() function.

DS_INTRINSIC_DEBUG_PRINT 

The debug::print() function.

DS_INTRINSIC_DAG_FIELD_ACCESS 

The structure field access function.

DS_INTRINSIC_DAG_ARRAY_CONSTRUCTOR 

The array constructor. See Array constructor.

DS_INTRINSIC_DAG_ARRAY_LENGTH 

The array length operator. See Array length operator.

Member Function Documentation

 create_function_call()

virtual IFunction_call * mi::neuraylib::IFunction_definition::create_function_call ( const IExpression_list arguments,
Sint32 errors = 0 
) const
pure virtual

Creates a new function call.

Parameters
argumentsThe arguments of the created function call.
Arguments for parameters without default are mandatory, otherwise optional. The type of an argument must match the corresponding parameter type. Any argument missing in arguments will be set to the default of the corresponding parameter.
Note that the expressions in arguments are copied. This copy operation is a deep copy, e.g., DB elements referenced in call expressions are also copied.
NULL is a valid argument which is handled like an empty expression list.
[out]errorsAn optional pointer to an mi::Sint32 to which an error code will be written. The error codes have the following meaning:
  • 0: Success.
  • -1: An argument for a non-existing parameter was provided in arguments.
  • -2: The type of an argument in arguments does not have the correct type, see get_parameter_types().
  • -3: A parameter that has no default was not provided with an argument value.
  • -4: The definition can not be instantiated because it is not exported.
  • -5: A parameter type is uniform, but the corresponding argument has a varying return type.
  • -6: An argument expression is not a constant nor a call.
  • -8: One of the parameter types is uniform, but the corresponding argument or default is a call expression and the return type of the called function definition is effectively varying since the function definition itself is varying.
  • -9: The function definition is invalid due to a module reload, see is_valid() for diagnostics.
Returns
The created function call, or NULL in case of errors.

 get_annotations()

virtual const IAnnotation_block * mi::neuraylib::IFunction_definition::get_annotations ( ) const
pure virtual

Returns the annotations of the function definition itself, or NULL if there are no such annotations.

 get_body()

virtual const IExpression * mi::neuraylib::IFunction_definition::get_body ( ) const
pure virtual

Returns the expression that represents the body of the function (if possible).

Note
Functions bodies with control flow can not be represented by an expression. For such functions, this method always returns NULL. For all other functions, i.e., for functions, whose body is an expression or a plain return statement, the method never returns NULL (unless there is no body at all, see below).
Functions with a known semantic, i.e., different from mi::neuraylib::IFunction_definition::DS_UNKNOWN, do not have a body as such, and the method returns NULL for such functions.

 get_defaults()

virtual const IExpression_list * mi::neuraylib::IFunction_definition::get_defaults ( ) const
pure virtual

Returns the defaults of all parameters.

Note
Not all parameters have defaults. Hence, the indices in the returned expression list do not necessarily coincide with the parameter indices of this definition. Therefore, defaults should be retrieved via the name of the parameter instead of its index.

 get_enable_if_conditions()

virtual const IExpression_list * mi::neuraylib::IFunction_definition::get_enable_if_conditions ( ) const
pure virtual

Returns the enable_if conditions of all parameters.

Note
Not all parameters have a condition. Hence, the indices in the returned expression list do not necessarily coincide with the parameter indices of this definition. Therefore, conditions should be retrieved via the name of the parameter instead of its index.

 get_enable_if_user()

virtual Size mi::neuraylib::IFunction_definition::get_enable_if_user ( Size  index,
Size  u_index 
) const
pure virtual

Returns the index of a parameter whose enable_if condition might depend on the argument of the given parameter.

Parameters
indexThe index of the parameter.
u_indexThe index of the enable_if user.
Returns
The index of a parameter whose enable_if condition depends on this parameter argument, or ~0 if indexes are out of range.

 get_enable_if_users()

virtual Size mi::neuraylib::IFunction_definition::get_enable_if_users ( Size  index) const
pure virtual

Returns the number of other parameters whose enable_if condition might depend on the argument of the given parameter.

Parameters
indexThe index of the parameter.
Returns
The number of other parameters whose enable_if condition depends on this parameter argument.

 get_mdl_mangled_name()

virtual const char * mi::neuraylib::IFunction_definition::get_mdl_mangled_name ( ) const
pure virtual

Returns the mangled name of the function.

Note
: The mangled name is computed for real MDL functions only, for materials it is equal to get_mdl_simple_name()
Returns
The mangled MDL name of the function definition.

 get_mdl_module_name()

virtual const char * mi::neuraylib::IFunction_definition::get_mdl_module_name ( ) const
pure virtual

Returns the MDL name of the module containing this function definition.

 get_mdl_name()

virtual const char * mi::neuraylib::IFunction_definition::get_mdl_name ( ) const
pure virtual

Returns the MDL name of the function definition.

Note
The MDL name of the function definition is different from the name of the DB element. Use mi::neuraylib::ITransaction::name_of() to obtain the name of the DB element.
Returns
The MDL name of the function definition.

 get_mdl_parameter_type_name()

virtual const char * mi::neuraylib::IFunction_definition::get_mdl_parameter_type_name ( Size  index) const
pure virtual

Returns the type name of the parameter at index.

Note
The type names provided here are substrings of the MDL name returned by get_mdl_name(). They are provided here such that parsing of the MDL name is not necessary. Their main use case is one variant of overload resolution if no actual arguments are given (see mi::neuraylib::IModule::get_function_overloads(const char*,const IArray*)const. For almost all other use cases it is strongly recommended to use get_parameter_types() instead.
Parameters
indexThe index of the parameter.
Returns
The type name of the parameter, or NULL if index is out of range.

 get_mdl_simple_name()

virtual const char * mi::neuraylib::IFunction_definition::get_mdl_simple_name ( ) const
pure virtual

Returns the simple MDL name of the function definition.

The simple name is the last component of the MDL name, i.e., without any packages and scope qualifiers, and without the parameter type names.

Returns
The simple MDL name of the function definition.

 get_mdl_version()

virtual void mi::neuraylib::IFunction_definition::get_mdl_version ( Mdl_version since,
Mdl_version removed 
) const
pure virtual

Returns the MDL version when this function definition was added and removed.

Parameters
[out]sinceThe MDL version in which this function definition was added. If the function definition does not belong to the standard library, the MDL version of the corresponding module is returned.
[out]removedThe MDL version in which this function definition was removed, or mi::neuraylib::MDL_VERSION_INVALID if the function has not been removed so far or does not belong to the standard library.

 get_module()

virtual const char * mi::neuraylib::IFunction_definition::get_module ( ) const
pure virtual

Returns the DB name of the module containing this function definition.

The type of the module is mi::neuraylib::IModule.

 get_parameter_annotations()

virtual const IAnnotation_list * mi::neuraylib::IFunction_definition::get_parameter_annotations ( ) const
pure virtual

Returns the annotations of all parameters.

Note
Not all parameters have annotations. Hence, the indices in the returned annotation list do not necessarily coincide with the parameter indices of this definition. Therefore, annotation blocks should be retrieved via the name of the parameter instead of its index.

 get_parameter_count()

virtual Size mi::neuraylib::IFunction_definition::get_parameter_count ( ) const
pure virtual

Returns the number of parameters.

 get_parameter_index()

virtual Size mi::neuraylib::IFunction_definition::get_parameter_index ( const char *  name) const
pure virtual

Returns the index position of a parameter.

Parameters
nameThe name of the parameter.
Returns
The index of the parameter, or -1 if name is invalid.

 get_parameter_name()

virtual const char * mi::neuraylib::IFunction_definition::get_parameter_name ( Size  index) const
pure virtual

Returns the name of the parameter at index.

Parameters
indexThe index of the parameter.
Returns
The name of the parameter, or NULL if index is out of range.

 get_parameter_types()

virtual const IType_list * mi::neuraylib::IFunction_definition::get_parameter_types ( ) const
pure virtual

Returns the types of all parameters.

 get_prototype()

virtual const char * mi::neuraylib::IFunction_definition::get_prototype ( ) const
pure virtual

Returns the DB name of the prototype, or NULL if this function definition is not a variant.

 get_return_annotations()

virtual const IAnnotation_block * mi::neuraylib::IFunction_definition::get_return_annotations ( ) const
pure virtual

Returns the annotations of the return type of this function definition, or NULL if there are no such annotations.

 get_return_type() [1/2]

template<class T>
const T * mi::neuraylib::IFunction_definition::get_return_type ( ) const
inline

Returns the return type.

This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid &) on the returned pointer, since the return type already is a pointer to the type T specified as template parameter.

Template Parameters
TThe interface type of the requested element
Returns
The return type.

 get_return_type() [2/2]

virtual const IType * mi::neuraylib::IFunction_definition::get_return_type ( ) const
pure virtual

Returns the return type.

Returns
The return type.

 get_semantic()

virtual Semantics mi::neuraylib::IFunction_definition::get_semantic ( ) const
pure virtual

Returns the semantic of this function definition.

 get_temporary() [1/2]

template<class T>
const T * mi::neuraylib::IFunction_definition::get_temporary ( Size  index) const
inline

Returns the expression of a temporary.

This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid &) on the returned pointer, since the return type already is a pointer to the type T specified as template parameter.

Template Parameters
TThe interface type of the requested element.
Parameters
indexThe index of the temporary.
Returns
The expression of the temporary, or NULL if index is out of range.

 get_temporary() [2/2]

virtual const IExpression * mi::neuraylib::IFunction_definition::get_temporary ( Size  index) const
pure virtual

Returns the expression of a temporary.

Parameters
indexThe index of the temporary.
Returns
The expression of the temporary, or NULL if index is out of range.

 get_temporary_count()

virtual Size mi::neuraylib::IFunction_definition::get_temporary_count ( ) const
pure virtual

Returns the number of temporaries used by this function.

 get_temporary_name()

virtual const char * mi::neuraylib::IFunction_definition::get_temporary_name ( Size  index) const
pure virtual

Returns the name of a temporary.

Note
Names of temporaries are not necessarily unique, e.g., due to inlining. Names are for informational purposes and should not be used to identify a particular temporary.
See also
mi::neuraylib::IMdl_configuration::set_expose_names_of_let_expressions()
Parameters
indexThe index of the temporary.
Returns
The name of the temporary, or NULL if the temporary has no name or index is out of range.

 get_thumbnail()

virtual const char * mi::neuraylib::IFunction_definition::get_thumbnail ( ) const
pure virtual

Returns the resolved file name of the thumbnail image for this function definition.

The function first checks for a thumbnail annotation. If the annotation is provided, it uses the 'name' argument of the annotation and resolves that in the MDL search path. If the annotation is not provided or file resolution fails, it checks for a file module_name.material_name.png next to the MDL module. In case this cannot be found either NULL is returned.

 is_array_constructor()

bool mi::neuraylib::IFunction_definition::is_array_constructor ( ) const
inline

Indicates whether this definition represents the array constructor.

See also
Arrays

 is_exported()

virtual bool mi::neuraylib::IFunction_definition::is_exported ( ) const
pure virtual

Indicates whether the function definition is exported by its module.

 is_material()

virtual bool mi::neuraylib::IFunction_definition::is_material ( ) const
pure virtual

Indicates whether the definition represents a material.

 is_uniform()

virtual bool mi::neuraylib::IFunction_definition::is_uniform ( ) const
pure virtual

Indicates whether the function definition is uniform.

Note
This includes, in addition to functions definitions that are explicitly marked as uniform, also function definitions that are not explicitly marked either uniform or varying and that have been analyzed by the MDL compiler to be uniform.

 is_valid()

virtual bool mi::neuraylib::IFunction_definition::is_valid ( IMdl_execution_context context) const
pure virtual

Returns true if the definition is valid, false otherwise.

A definition can become invalid if the module it has been defined in or another module imported by that module has been reloaded. In the first case, the definition can no longer be used. In the second case, the definition can be validated by reloading the module it has been defined in.

Parameters
contextExecution context that can be queried for error messages after the operation has finished. Can be NULL.
Returns
- true The definition is valid.
  • false The definition is invalid.