mi::neuraylib::IFunction_definition Class Reference
[MDL-related elements]
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.
-
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
Public Enumerations
- 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_ROUND_AWAY_FROM_ZERO, 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_DECL_CAST, DS_INTRINSIC_DAG_LAST = DS_INTRINSIC_DAG_DECL_CAST, DS_FORCE_32_BIT = 0xffffffffU}
- All known semantics of functions definitions. More...
Public Member Functions
- virtual IFunction_call* create_function_call( const IExpression_list* arguments, Sint32* errors = 0) const =0
- Creates a new function call. More...
- virtual const IAnnotation_block* get_annotations() const =0
- Returns the annotations of the function definition itself, or NULL if there are no such annotations.
- virtual const IExpression* get_body() const =0
- Returns the expression that represents the body of the function (if possible). More...
- virtual const IExpression_list* get_defaults() const =0
- Returns the defaults of all parameters. More...
- virtual const IExpression_list* get_enable_if_conditions() const =0
- Returns the enable_if conditions of all parameters. 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 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 const char* get_mangled_name() const =0
- Returns the mangled name of the function. More...
- virtual const char* get_mdl_module_name() const =0
- Returns the MDL name of the module containing this function definition.
- virtual const char* get_mdl_name() const =0
- Returns the 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_mdl_simple_name() const =0
- Returns the simple MDL name of the function definition. 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 const char* get_module() const =0
- Returns the DB name of the module containing this function definition. More...
- virtual const IAnnotation_list* get_parameter_annotations() const =0
- Returns the annotations of all parameters. More...
- virtual Size get_parameter_count() const =0
- Returns the number of parameters.
- virtual Size get_parameter_index( const char* name) const =0
- Returns the index position of a parameter. More...
- virtual const char* get_parameter_name( Size index) const =0
- Returns the name of the parameter at index. More...
- virtual const IType_list* get_parameter_types() const =0
- Returns the types of all parameters.
- virtual const char* get_prototype() const =0
- Returns the DB name of the prototype, or NULL if this function definition is not a variant.
- virtual const IAnnotation_block* get_return_annotations() const =0
- Returns the annotations of the return type of this function definition, or NULL if there are no such annotations.
- virtual const IType* get_return_type() const =0
- Returns the return type. More...
- template< class T>const T* get_return_type() const
- Returns the return type. More...
- virtual Semantics get_semantic() const =0
- Returns the semantic of this function definition.
- virtual const IExpression* get_temporary( Size index) const =0
- Returns the expression of a temporary. More...
- template< class T>const T* get_temporary( Size index) const
- Returns the expression of a temporary. More...
- virtual Size get_temporary_count() const =0
- Returns the number of temporaries used by this function.
- virtual const char* get_temporary_name( Size index) const =0
- Returns the name of a temporary. More...
- virtual const char* get_thumbnail() const =0
- Returns the resolved file name of the thumbnail image for this function definition. More...
- bool is_array_constructor() const
- Indicates whether this definition represents the array constructor. More...
- virtual bool is_declarative() const =0
- Indicates whether the function definition is declarative. More...
- virtual bool is_exported() const =0
- Indicates whether the function definition is exported by its module.
- virtual bool is_material() const =0
- Indicates whether the definition represents a material.
- virtual bool is_uniform() const =0
- Indicates whether the function definition is uniform. More...
- virtual bool is_valid( IMdl_execution_context* context) const =0
- Returns true if the definition is valid, false otherwise. More...
Enums
- enum mi::neuraylib::IFunction_definition::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 = 0
- 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 = 0x0200
- The bitwise complement operator.
- DS_UNARY_FIRST = DS_BITWISE_COMPLEMENT
- DS_OPERATOR_FIRST = DS_UNARY_FIRST
- 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_UNARY_LAST = DS_CAST
- DS_SELECT
- The select operator.
- DS_BINARY_FIRST = DS_SELECT
- 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_BINARY_LAST = DS_BITWISE_AND_ASSIGN
- DS_TERNARY
- The ternary operator (conditional). See Ternary operator.
- DS_OPERATOR_LAST = DS_TERNARY
- DS_INTRINSIC_MATH_ABS = 0x0300
- The mathabs() intrinsic function.
- DS_INTRINSIC_MATH_FIRST = DS_INTRINSIC_MATH_ABS
- DS_INTRINSIC_MATH_ACOS
- The mathacos() intrinsic function.
- DS_INTRINSIC_MATH_ALL
- The mathall() intrinsic function.
- DS_INTRINSIC_MATH_ANY
- The mathany() intrinsic function.
- DS_INTRINSIC_MATH_ASIN
- The mathasin() intrinsic function.
- DS_INTRINSIC_MATH_ATAN
- The mathatan() intrinsic function.
- DS_INTRINSIC_MATH_ATAN2
- The mathatan2() intrinsic function.
- DS_INTRINSIC_MATH_AVERAGE
- The mathaverage() intrinsic function.
- DS_INTRINSIC_MATH_CEIL
- The mathceil() intrinsic function.
- DS_INTRINSIC_MATH_CLAMP
- The mathclamp() intrinsic function.
- DS_INTRINSIC_MATH_COS
- The mathcos() intrinsic function.
- DS_INTRINSIC_MATH_CROSS
- The mathcross() intrinsic function.
- DS_INTRINSIC_MATH_DEGREES
- The mathdegrees() intrinsic function.
- DS_INTRINSIC_MATH_DISTANCE
- The mathdistance() intrinsic function.
- DS_INTRINSIC_MATH_DOT
- The mathdot() intrinsic function.
- DS_INTRINSIC_MATH_EVAL_AT_WAVELENGTH
- The matheval_at_wavelength() intrinsic function.
- DS_INTRINSIC_MATH_EXP
- The mathexp() intrinsic function.
- DS_INTRINSIC_MATH_EXP2
- The mathexp2() intrinsic function.
- DS_INTRINSIC_MATH_FLOOR
- The mathfloor() intrinsic function.
- DS_INTRINSIC_MATH_FMOD
- The mathfmod() intrinsic function.
- DS_INTRINSIC_MATH_FRAC
- The mathfrac() intrinsic function.
- DS_INTRINSIC_MATH_ISNAN
- The mathisnan() intrinsic function.
- DS_INTRINSIC_MATH_ISFINITE
- The mathisfinite() intrinsic function.
- DS_INTRINSIC_MATH_LENGTH
- The mathlength() intrinsic function.
- DS_INTRINSIC_MATH_LERP
- The mathlerp() intrinsic function.
- DS_INTRINSIC_MATH_LOG
- The mathlog() intrinsic function.
- DS_INTRINSIC_MATH_LOG2
- The mathlog2() intrinsic function.
- DS_INTRINSIC_MATH_LOG10
- The mathlog10() intrinsic function.
- DS_INTRINSIC_MATH_LUMINANCE
- The mathluminance() intrinsic function.
- DS_INTRINSIC_MATH_MAX
- The mathmax() intrinsic function.
- DS_INTRINSIC_MATH_MAX_VALUE
- The mathmax_value() intrinsic function.
- DS_INTRINSIC_MATH_MAX_VALUE_WAVELENGTH
- The mathmax_value_wavelength() intrinsic function.
- DS_INTRINSIC_MATH_MIN
- The mathmin() intrinsic function.
- DS_INTRINSIC_MATH_MIN_VALUE
- The mathmin_value() intrinsic function.
- DS_INTRINSIC_MATH_MIN_VALUE_WAVELENGTH
- The mathmin_value_wavelength() intrinsic function.
- DS_INTRINSIC_MATH_MODF
- The mathmodf() intrinsic function.
- DS_INTRINSIC_MATH_NORMALIZE
- The mathnormalize() intrinsic function.
- DS_INTRINSIC_MATH_POW
- The mathpow() intrinsic function.
- DS_INTRINSIC_MATH_RADIANS
- The mathradians() intrinsic function.
- DS_INTRINSIC_MATH_ROUND
- The mathround() intrinsic function.
- DS_INTRINSIC_MATH_RSQRT
- The mathrsqrt() intrinsic function.
- DS_INTRINSIC_MATH_SATURATE
- The mathsaturate() intrinsic function.
- DS_INTRINSIC_MATH_SIGN
- The mathsign() intrinsic function.
- DS_INTRINSIC_MATH_SIN
- The mathsin() intrinsic function.
- DS_INTRINSIC_MATH_SINCOS
- The mathsincos() intrinsic function.
- DS_INTRINSIC_MATH_SMOOTHSTEP
- The mathsmoothstep() intrinsic function.
- DS_INTRINSIC_MATH_SQRT
- The mathsqrt() intrinsic function.
- DS_INTRINSIC_MATH_STEP
- The mathstep() intrinsic function.
- DS_INTRINSIC_MATH_TAN
- The mathtan() intrinsic function.
- DS_INTRINSIC_MATH_TRANSPOSE
- The mathtranspose() intrinsic function.
- DS_INTRINSIC_MATH_BLACKBODY
- The mathblackbody() intrinsic function.
- DS_INTRINSIC_MATH_EMISSION_COLOR
- The mathemission_color() intrinsic function.
- DS_INTRINSIC_MATH_COSH
- The mathcosh() intrinsic function.
- DS_INTRINSIC_MATH_SINH
- The mathsinh() intrinsic function.
- DS_INTRINSIC_MATH_TANH
- The mathtanh() intrinsic function.
- DS_INTRINSIC_MATH_INT_BITS_TO_FLOAT
- The mathint_bits_to_float() intrinsic function.
- DS_INTRINSIC_MATH_FLOAT_BITS_TO_INT
- The mathfloat_bits_to_int() intrinsic function.
- DS_INTRINSIC_MATH_ROUND_AWAY_FROM_ZERO
- The mathround_away_from_zero() intrinsic function.
- DS_INTRINSIC_MATH_DX
- The mathDX() intrinsic function.
- DS_INTRINSIC_MATH_DY
- The mathDY() intrinsic function.
- DS_INTRINSIC_MATH_LAST = DS_INTRINSIC_MATH_DY
- DS_INTRINSIC_STATE_POSITION = 0x0400
- The stateposition() function.
- DS_INTRINSIC_STATE_FIRST = DS_INTRINSIC_STATE_POSITION
- DS_INTRINSIC_STATE_NORMAL
- The statenormal() function.
- DS_INTRINSIC_STATE_GEOMETRY_NORMAL
- The stategeometry_normal() function.
- DS_INTRINSIC_STATE_MOTION
- The statemotion() function.
- DS_INTRINSIC_STATE_TEXTURE_SPACE_MAX
- The statetexture_space_max() function.
- DS_INTRINSIC_STATE_TEXTURE_COORDINATE
- The statetexture_coordinate() function.
- DS_INTRINSIC_STATE_TEXTURE_TANGENT_U
- The statetexture_tangent_u() function.
- DS_INTRINSIC_STATE_TEXTURE_TANGENT_V
- The statetexture_tangent_v() function.
- DS_INTRINSIC_STATE_TANGENT_SPACE
- The statetangent_space() function.
- DS_INTRINSIC_STATE_GEOMETRY_TANGENT_U
- The stategeometry_tangent_u() function.
- DS_INTRINSIC_STATE_GEOMETRY_TANGENT_V
- The stategeometry_tangent_v() function.
- DS_INTRINSIC_STATE_DIRECTION
- The statedirection() function.
- DS_INTRINSIC_STATE_ANIMATION_TIME
- The stateanimation_time() function.
- DS_INTRINSIC_STATE_WAVELENGTH_BASE
- The statewavelength_base() function.
- DS_INTRINSIC_STATE_TRANSFORM
- The statetransform() function.
- DS_INTRINSIC_STATE_TRANSFORM_POINT
- The statetransform_point() function.
- DS_INTRINSIC_STATE_TRANSFORM_VECTOR
- The statetransform_vector() function.
- DS_INTRINSIC_STATE_TRANSFORM_NORMAL
- The statetransform_normal() function.
- DS_INTRINSIC_STATE_TRANSFORM_SCALE
- The statetransform_scale() function.
- DS_INTRINSIC_STATE_ROUNDED_CORNER_NORMAL
- The staterounded_corner_normal() function.
- DS_INTRINSIC_STATE_METERS_PER_SCENE_UNIT
- The statemeters_per_scene_unit() function.
- DS_INTRINSIC_STATE_SCENE_UNITS_PER_METER
- The statescene_units_per_meter() function.
- DS_INTRINSIC_STATE_OBJECT_ID
- The stateobject_id() function.
- DS_INTRINSIC_STATE_WAVELENGTH_MIN
- The statewavelength_min() function.
- DS_INTRINSIC_STATE_WAVELENGTH_MAX
- The statewavelength_max() function.
- DS_INTRINSIC_STATE_LAST = DS_INTRINSIC_STATE_WAVELENGTH_MAX
- DS_INTRINSIC_TEX_WIDTH = 0x0500
- The tex::width() function.
- DS_INTRINSIC_TEX_FIRST = DS_INTRINSIC_TEX_WIDTH
- 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_TEX_LAST = DS_INTRINSIC_TEX_GRID_TO_OBJECT_SPACE
- DS_INTRINSIC_DF_DIFFUSE_REFLECTION_BSDF = 0x0600
- The df::diffuse_reflection_bsdf() function.
- DS_INTRINSIC_DF_FIRST = DS_INTRINSIC_DF_DIFFUSE_REFLECTION_BSDF
- 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_DF_LAST = DS_INTRINSIC_DF_COLOR_UNBOUNDED_MIX
- DS_INTRINSIC_NVIDIA_DF_ASHIKHMIN_SHIRLEY_GLOSSY_BSDF = 0x0700
- The nvidia::df::ashikhmin_shirley_glossy_bsdf() function.
- DS_INTRINSIC_NVIDIA_DF_FIRST = DS_INTRINSIC_NVIDIA_DF_ASHIKHMIN_SHIRLEY_GLOSSY_BSDF
- 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_NVIDIA_DF_LAST = DS_INTRINSIC_NVIDIA_DF_SHEEN_LTC_BSDF
- DS_INTRINSIC_SCENE_DATA_ISVALID = 0x0800
- The scene::data_is_valid() function.
- DS_INTRINSIC_SCENE_FIRST = DS_INTRINSIC_SCENE_DATA_ISVALID
- 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_SCENE_LAST = DS_INTRINSIC_SCENE_DATA_LOOKUP_UNIFORM_FLOAT4X4
- DS_INTRINSIC_DEBUG_BREAKPOINT = 0x0900
- The debug::breakpoint() function.
- DS_INTRINSIC_DEBUG_FIRST = DS_INTRINSIC_DEBUG_BREAKPOINT
- DS_INTRINSIC_DEBUG_ASSERT
- The debug::assert() function.
- DS_INTRINSIC_DEBUG_PRINT
- The debug::print() function.
- DS_INTRINSIC_DEBUG_LAST = DS_INTRINSIC_DEBUG_PRINT
- DS_INTRINSIC_DAG_FIELD_ACCESS = 0x0A00
- The structure field access function.
- DS_INTRINSIC_DAG_FIRST = DS_INTRINSIC_DAG_FIELD_ACCESS
- DS_INTRINSIC_DAG_ARRAY_CONSTRUCTOR
- The array constructor. See Array constructor.
- DS_INTRINSIC_DAG_ARRAY_LENGTH
- The array length operator. See Array length operator.
- DS_INTRINSIC_DAG_DECL_CAST
- The decl_cast operator. See Decl_cast operator.
- DS_INTRINSIC_DAG_LAST = DS_INTRINSIC_DAG_DECL_CAST
- DS_FORCE_32_BIT = 0xffffffffU
Member Functions
- 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
- arguments
- The 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.
- errors
- An 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.
- -10: The definition is non-declarative and at least one of the arguments is a declarative call.
Returns
The created function call, or NULL in case of errors.
- 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.
- 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.
-
- 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.
- 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.
- 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
- index
- The index of the parameter.
- u_index
- The 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.
- 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
- index
- The index of the parameter.
Returns
The number of other parameters whose enable_if condition depends on this parameter argument.
- virtual const char* mi::neuraylib::IFunction_definition::get_mangled_name() const [pure virtual]
-
Returns the mangled name of the function.
Note:For materials, the mangled name is equal to get_mdl_simple_name().
Returns
The mangled name of the function definition.
- 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.
- 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.
- 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
- index
- The index of the parameter.
Returns
The type name of the parameter, or NULL if index is out of range.
- 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.
- 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
- since
- The 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.
- removed
- The 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.
- 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.
- 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.
- virtual Size mi::neuraylib::IFunction_definition::get_parameter_count() const [pure virtual]
-
Returns the number of parameters.
- virtual Size mi::neuraylib::IFunction_definition::get_parameter_index( const char* name) const [pure virtual]
-
Returns the index position of a parameter.
Parameters
- name
- The name of the parameter.
Returns
The index of the parameter, or -1 if name is invalid.
- virtual const char* mi::neuraylib::IFunction_definition::get_parameter_name( Size index) const [pure virtual]
-
Returns the name of the parameter at index.
Parameters
- index
- The index of the parameter.
Returns
The name of the parameter, or NULL if index is out of range.
- virtual const IType_list* mi::neuraylib::IFunction_definition::get_parameter_types() const [pure virtual]
-
Returns the types of all parameters.
- 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.
- 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.
- virtual const IType* mi::neuraylib::IFunction_definition::get_return_type() const [pure virtual]
-
Returns the return type.
Returns
The return type.
-
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.
Returns
The return type.
- virtual Semantics mi::neuraylib::IFunction_definition::get_semantic() const [pure virtual]
-
Returns the semantic of this function definition.
- virtual const IExpression* mi::neuraylib::IFunction_definition::get_temporary( Size index) const [pure virtual]
-
Returns the expression of a temporary.
Parameters
- index
- The index of the temporary.
Returns
The expression of the temporary, or NULL if index is out of range.
-
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.
Parameters
- index
- The index of the temporary.
Returns
The expression of the temporary, or NULL if index is out of range.
- virtual Size mi::neuraylib::IFunction_definition::get_temporary_count() const [pure virtual]
-
Returns the number of temporaries used by this function.
- 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
- index
- The index of the temporary.
Returns
The name of the temporary, or NULL if the temporary has no name or index is out of range.
- 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.
- bool mi::neuraylib::IFunction_definition::is_array_constructor() const [inline]
- virtual bool mi::neuraylib::IFunction_definition::is_declarative() const [pure virtual]
-
Indicates whether the function definition is declarative.
Note:This includes, in addition to functions definitions that are explicitly marked as declarative, also function definitions that have been analyzed by the MDL compiler
- virtual bool mi::neuraylib::IFunction_definition::is_exported() const [pure virtual]
-
Indicates whether the function definition is exported by its module.
- virtual bool mi::neuraylib::IFunction_definition::is_material() const [pure virtual]
-
Indicates whether the definition represents a material.
- 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.
- 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
- context
- Execution 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.