neuray API Programmer's Manual

mi::neuraylib::IMdl_evaluator_api Class Reference

[Miscellaneous MDL-related Interfaces]

Description

Provides access to various functions for the evaluation of MDL expressions.

Public Member Functions

virtual const IValue_boolis_function_parameter_enabled( ITransaction* trans, IValue_factory* fact, const IFunction_call* call, Size index, Sint32* error) const =0
Evaluates if a function call parameter is enabled, i.e., the enable_if condition evaluates to true). More...

Member Functions

virtual const IValue_bool* mi::​neuraylib::​IMdl_evaluator_api::is_function_parameter_enabled( ITransaction* trans, IValue_factory* fact, const IFunction_call* call, Size index, Sint32* error) const [pure virtual]

Evaluates if a function call parameter is enabled, i.e., the enable_if condition evaluates to true).

Parameters

trans
the transaction
fact
the expression factory to create the result value
call
the function call
index
the index of the material instance parameter
error
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 input parameter is NULL.
  • -2: The parameter index is out of bounds.
  • -3: A malformed expression (contains temporaries).
  • -4: An unsupported expression occurred.
  • -5: The evaluation was aborted, too complex to evaluate.

Returns

NULL if the condition was to complex to evaluate, else true or false .