|
virtual Sint32 | deprecated_add_environment (const IFunction_call *call, const char *fname, Float32 mdl_meters_per_scene_unit, Float32 mdl_wavelength_min, Float32 mdl_wavelength_max)=0 |
| Add an MDL environment function call as a function to this link unit. More...
|
|
virtual Sint32 | add_environment (const IFunction_call *call, const char *fname, IMdl_execution_context *context=0)=0 |
| Add an MDL environment function call as a function to this link unit. More...
|
|
virtual Sint32 | deprecated_add_material_expression (const ICompiled_material *inst, const char *path, const char *fname)=0 |
| Add an expression that is part of an MDL material instance as a function to this link unit. More...
|
|
virtual Sint32 | add_material_expression (const ICompiled_material *inst, const char *path, const char *fname, IMdl_execution_context *context)=0 |
| Add an expression that is part of an MDL material instance as a function to this link unit. More...
|
|
virtual Sint32 | deprecated_add_material_df (const ICompiled_material *material, const char *path, const char *base_fname, bool include_geometry_normal)=0 |
| Add an MDL distribution function to this link unit. More...
|
|
virtual Sint32 | add_material_df (const ICompiled_material *material, const char *path, const char *base_fname, IMdl_execution_context *context)=0 |
| Add an MDL distribution function to this link unit. More...
|
|
virtual Sint32 | deprecated_add_material (const ICompiled_material *material, Target_function_description *function_descriptions, Size description_count, bool include_geometry_normal)=0 |
| Add (multiple) MDL distribution functions and expressions of a material to this link unit. More...
|
|
virtual Sint32 | add_material (const ICompiled_material *material, Target_function_description *function_descriptions, Size description_count, IMdl_execution_context *context)=0 |
| Add (multiple) MDL distribution functions and expressions of a material to this link unit. More...
|
|
|
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 bool | compare_iid (const Uuid &iid) |
| Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
|
|
Represents a link-unit of an MDL backend.
Add (multiple) MDL distribution functions and expressions of a material to this link unit.
For each distribution function this results in four functions, suffixed with "_init"
, "_sample"
, "_evaluate"
, and "_pdf"
. Functions can be selected by providing a list of Target_function_descriptions
. Each of them needs to define the path
, the root of the expression that should be translated. After calling this function, each element of the list will contain information for later usage in the application, e.g., the argument_block_index
and the function_index
.
- Parameters
-
| material | The compiled MDL material. |
| function_descriptions | The list of descriptions of function to translate. |
| description_count | The size of the list of descriptions. |
[in,out] | context | A pointer to an mi::neuraylib::IMdl_execution_context which can be used to pass compilation options to the MDL compiler. The following options are supported for this operation:
- bool "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). During material compilation messages like errors and warnings will be passed to the context for later evaluation by the caller. Can be NULL .
|
- Returns
- A return code. The error codes have the following meaning:
virtual Sint32 mi::neuraylib::ILink_unit::deprecated_add_material |
( |
const ICompiled_material * |
material, |
|
|
Target_function_description * |
function_descriptions, |
|
|
Size |
description_count, |
|
|
bool |
include_geometry_normal |
|
) |
| |
|
pure virtual |
Add (multiple) MDL distribution functions and expressions of a material to this link unit.
For each distribution function this results in four functions, suffixed with "_init"
, "_sample"
, "_evaluate"
, and "_pdf"
. Functions can be selected by providing a list of Target_function_descriptions
. Each of them needs to define the path
, the root of the expression that should be translated. After calling this function, each element of the list will contain information for later usage in the application, e.g., the argument_block_index
and the function_index
.
- Parameters
-
material | The compiled MDL material. |
function_descriptions | The list of descriptions of function to translate. |
description_count | The size of the list of descriptions. |
include_geometry_normal | If true, the "geometry.normal" field will be applied to the MDL state prior to evaluation of the given DF. |
- Returns
- A return code. The error codes have the following meaning:
- 0: Success.
- -1: An error occurred while processing the entries in the list. For more detailed error information, each list entry contains the error code of the corresponding function type (see the return codes of
add_material_expression
and add_material_df
). In case of an error, rely only on the first return code different from 0.