Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IMdl_execution_context Class Referenceabstract

The execution context can be used to query status information like error and warning messages concerning the operation it was passed into. More...

Inheritance diagram for mi::neuraylib::IMdl_execution_context:
mi::base::Interface_declare< 0x28eb1f99, 0x138f, 0x4fa2, 0xb5, 0x39, 0x17, 0xb4, 0xae, 0xfb, 0x1b, 0xca > mi::base::IInterface

Public Member Functions

virtual Size get_messages_count () const =0
 Returns the number of messages. More...
 
virtual Size get_error_messages_count () const =0
 Returns the number of error messages. More...
 
virtual const IMessageget_message (Size index) const =0
 Returns the message at index or NULL, if no such index exists. More...
 
virtual const IMessageget_error_message (Size index) const =0
 Returns the error message at index or NULL, if no such index exists. More...
 
virtual Size get_option_count () const =0
 Returns the number of supported options. More...
 
virtual const char * get_option_name (Size index) const =0
 Returns the option name at index. More...
 
virtual const char * get_option_type (const char *name) const =0
 Returns the option type name at index. More...
 
virtual Sint32 get_option (const char *name, const char *&value) const =0
 Get a string option. More...
 
virtual Sint32 get_option (const char *name, Float32 &value) const =0
 Get a float option. More...
 
virtual Sint32 get_option (const char *name, bool &value) const =0
 Get a bool option. More...
 
virtual Sint32 set_option (const char *name, const char *value)=0
 Set a string option. More...
 
virtual Sint32 set_option (const char *name, Float32 value)=0
 Set a float option. More...
 
virtual Sint32 set_option (const char *name, bool value)=0
 Set a bool option. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x28eb1f99, 0x138f, 0x4fa2, 0xb5, 0x39, 0x17, 0xb4, 0xae, 0xfb, 0x1b, 0xca >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x28eb1f99, 0x138f, 0x4fa2, 0xb5, 0x39, 0x17, 0xb4, 0xae, 0xfb, 0x1b, 0xca >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

The execution context can be used to query status information like error and warning messages concerning the operation it was passed into.

The context supports the following options:

Options for module loading

  • "internal_space": Set the internal space of the backend. Possible values: "coordinate_world", "coordinate_object". Default: "coordinate_world".
  • "experimental": If true, enables undocumented experimental MDL features. Default: false.

Options for MDL export

  • "bundle_resources": If true, referenced resources are exported into the same directory as the module, even if they can be found via the module search path. Default: false.

Options for material compilation

  • "meters_per_scene_unit": The conversion ratio between meters and scene units for this material. Default: 1.0f.
  • "wavelength_min": The smallest supported wavelength. Default: 380.0f.
  • "wavelength_max": The largest supported wavelength. Default: 780.0f.
  • "fold_ternary_on_df": Fold all ternary operators of *df types, even in class compilation mode. Default: false.

Options for code generation

  • "meters_per_scene_unit": The conversion ratio between meters and scene units for this material. Default: 1.0f.
  • "wavelength_min": The smallest supported wavelength. Default: 380.0f.
  • "wavelength_max": The largest supported wavelength. Default: 780.0f.
  • "include_geometry_normal": If true, the "geometry.normal" field will be applied to the MDL state prior to evaluation of the given DF. Default: true.

Member Function Documentation

virtual const IMessage* mi::neuraylib::IMdl_execution_context::get_error_message ( Size  index) const
pure virtual

Returns the error message at index or NULL, if no such index exists.

virtual Size mi::neuraylib::IMdl_execution_context::get_error_messages_count ( ) const
pure virtual

Returns the number of error messages.

virtual const IMessage* mi::neuraylib::IMdl_execution_context::get_message ( Size  index) const
pure virtual

Returns the message at index or NULL, if no such index exists.

virtual Size mi::neuraylib::IMdl_execution_context::get_messages_count ( ) const
pure virtual

Returns the number of messages.

virtual Sint32 mi::neuraylib::IMdl_execution_context::get_option ( const char *  name,
const char *&  value 
) const
pure virtual

Get a string option.

Parameters
nameoption name
valuepointer the option value is written to.
Returns
  • 0: Success.
  • -1: Invalid option name.
  • -2: The option type does not match the value type.
virtual Sint32 mi::neuraylib::IMdl_execution_context::get_option ( const char *  name,
Float32 value 
) const
pure virtual

Get a float option.

Parameters
nameoption name
valuepointer the option value is written to.
Returns
  • 0: Success.
  • -1: Invalid option name.
  • -2: The option type does not match the value type.
virtual Sint32 mi::neuraylib::IMdl_execution_context::get_option ( const char *  name,
bool &  value 
) const
pure virtual

Get a bool option.

Parameters
nameoption name
valuepointer the option value is written to.
Returns
  • 0: Success.
  • -1: Invalid option name.
  • -2: The option type does not match the value type.
virtual Size mi::neuraylib::IMdl_execution_context::get_option_count ( ) const
pure virtual

Returns the number of supported options.

virtual const char* mi::neuraylib::IMdl_execution_context::get_option_name ( Size  index) const
pure virtual

Returns the option name at index.

virtual const char* mi::neuraylib::IMdl_execution_context::get_option_type ( const char *  name) const
pure virtual

Returns the option type name at index.

virtual Sint32 mi::neuraylib::IMdl_execution_context::set_option ( const char *  name,
const char *  value 
)
pure virtual

Set a string option.

Parameters
nameoption name
valueoption value.
Returns
  • 0: Success.
  • -1: Invalid option name.
  • -2: The option type does not match the value type.
virtual Sint32 mi::neuraylib::IMdl_execution_context::set_option ( const char *  name,
Float32  value 
)
pure virtual

Set a float option.

Parameters
nameoption name
valueoption value.
Returns
  • 0: Success.
  • -1: Invalid option name.
  • -2: The option type does not match the value type.
virtual Sint32 mi::neuraylib::IMdl_execution_context::set_option ( const char *  name,
bool  value 
)
pure virtual

Set a bool option.

Parameters
nameoption name
valueoption value.
Returns
  • 0: Success.
  • -1: Invalid option name.
  • -2: The option type does not match the value type.
  • -3: The value is invalid in the context of the option.