The MDL type system mainly consists of four sets of interfaces: More...
Classes | |
class | mi::neuraylib::IExpression |
The interface to MDL expressions. More... | |
class | mi::neuraylib::IExpression_constant |
A constant expression. More... | |
class | mi::neuraylib::IExpression_call |
An indirect call expression. More... | |
class | mi::neuraylib::IExpression_parameter |
A parameter reference expression. More... | |
class | mi::neuraylib::IExpression_direct_call |
A direct call expression. More... | |
class | mi::neuraylib::IExpression_temporary |
A temporary reference expression. More... | |
class | mi::neuraylib::IExpression_list |
An ordered collection of expressions identified by name or index. More... | |
class | mi::neuraylib::IAnnotation_definition |
An annotation definition. More... | |
class | mi::neuraylib::IAnnotation |
An annotation is similar to a direct call expression, but without return type. More... | |
class | mi::neuraylib::IAnnotation_block |
An annotation block is an array of annotations. More... | |
class | mi::neuraylib::IAnnotation_list |
An ordered collection of annotation blocks identified by name or index. More... | |
class | mi::neuraylib::IExpression_factory |
The interface for creating expressions. More... | |
class | mi::neuraylib::IStruct_category |
Represents the optional struct category for struct types. More... | |
class | mi::neuraylib::IStruct_category_list |
An ordered collection of struct categories identified by name or index. More... | |
class | mi::neuraylib::IType |
The interface to MDL types. More... | |
class | mi::neuraylib::IType_alias |
The type of kind alias. More... | |
class | mi::neuraylib::IType_atomic |
An atomic type. More... | |
class | mi::neuraylib::IType_bool |
The type of kind bool. More... | |
class | mi::neuraylib::IType_int |
The type of kind int. More... | |
class | mi::neuraylib::IType_enum |
A type of kind enum. More... | |
class | mi::neuraylib::IType_float |
The type of kind float. More... | |
class | mi::neuraylib::IType_double |
The type of kind double. More... | |
class | mi::neuraylib::IType_string |
The type of kind string. More... | |
class | mi::neuraylib::IType_compound |
A compound type. More... | |
class | mi::neuraylib::IType_vector |
The type of kind vector. More... | |
class | mi::neuraylib::IType_matrix |
The type of kind matrix. More... | |
class | mi::neuraylib::IType_color |
The type of kind color. More... | |
class | mi::neuraylib::IType_array |
The type of kind array. More... | |
class | mi::neuraylib::IType_struct |
The type of kind struct. More... | |
class | mi::neuraylib::IType_reference |
The reference types. More... | |
class | mi::neuraylib::IType_resource |
A string valued resource type. More... | |
class | mi::neuraylib::IType_texture |
The type of kind texture. More... | |
class | mi::neuraylib::IType_light_profile |
The type of kind light_profile. More... | |
class | mi::neuraylib::IType_bsdf_measurement |
The type of kind bsdf_measurement. More... | |
class | mi::neuraylib::IType_df |
The type of distribution functions. More... | |
class | mi::neuraylib::IType_bsdf |
The type of kind bsdf. More... | |
class | mi::neuraylib::IType_hair_bsdf |
The type of kind bsdf. More... | |
class | mi::neuraylib::IType_edf |
The type of kind edf. More... | |
class | mi::neuraylib::IType_vdf |
The type of kind vdf. More... | |
class | mi::neuraylib::IType_list |
An ordered collection of types identified by name or index. More... | |
class | mi::neuraylib::IType_factory |
The interface for creating types. More... | |
class | mi::neuraylib::IValue |
The interface to MDL values. More... | |
class | mi::neuraylib::IValue_atomic |
An atomic value. More... | |
class | mi::neuraylib::IValue_bool |
A value of type boolean. More... | |
class | mi::neuraylib::IValue_int |
A value of type integer. More... | |
class | mi::neuraylib::IValue_enum |
A value of type enum. More... | |
class | mi::neuraylib::IValue_float |
A value of type float. More... | |
class | mi::neuraylib::IValue_double |
A value of type double. More... | |
class | mi::neuraylib::IValue_string |
A value of type string. More... | |
class | mi::neuraylib::IValue_string_localized |
A value of type string which can be used to obtain the original, non-localized value of a localized string. More... | |
class | mi::neuraylib::IValue_compound |
A compound value. More... | |
class | mi::neuraylib::IValue_vector |
A value of type vector. More... | |
class | mi::neuraylib::IValue_matrix |
A value of type matrix. More... | |
class | mi::neuraylib::IValue_color |
A value of type color. More... | |
class | mi::neuraylib::IValue_array |
A value of type array. More... | |
class | mi::neuraylib::IValue_struct |
A value of type struct. More... | |
class | mi::neuraylib::IValue_resource |
Base class for resource values. More... | |
class | mi::neuraylib::IValue_texture |
A texture value. More... | |
class | mi::neuraylib::IValue_light_profile |
A light profile value. More... | |
class | mi::neuraylib::IValue_bsdf_measurement |
A BSDF measurement value. More... | |
class | mi::neuraylib::IValue_invalid_df |
An invalid distribution function value. More... | |
class | mi::neuraylib::IValue_list |
An ordered collection of values identified by name or index. More... | |
class | mi::neuraylib::IValue_factory |
The interface for creating values. More... | |
Enumerations | |
enum | mi::neuraylib::Mdl_version { mi::neuraylib::MDL_VERSION_1_0 , mi::neuraylib::MDL_VERSION_1_1 , mi::neuraylib::MDL_VERSION_1_2 , mi::neuraylib::MDL_VERSION_1_3 , mi::neuraylib::MDL_VERSION_1_4 , mi::neuraylib::MDL_VERSION_1_5 , mi::neuraylib::MDL_VERSION_1_6 , mi::neuraylib::MDL_VERSION_1_7 , mi::neuraylib::MDL_VERSION_1_8 , mi::neuraylib::MDL_VERSION_1_9 , mi::neuraylib::MDL_VERSION_EXP , mi::neuraylib::MDL_VERSION_LATEST = MDL_VERSION_1_9 , mi::neuraylib::MDL_VERSION_INVALID = 0xffffffffU , MDL_VERSION_FORCE_32_BIT = 0xffffffffU } |
The MDL version. More... | |
The MDL type system mainly consists of four sets of interfaces:
The three factories mentioned above can be obtained from mi::neuraylib::IMdl_factory.
In addition, the free functions mi::neuraylib::get_value() and mi::neuraylib::set_value() are useful to read and write instances of mi::neuraylib::IValue.
See MDL-related elements and Miscellaneous MDL-related Interfaces for interfaces that make use of this type system.
The MDL version.
|
inline |
This specialization handles mi::neuraylib::IValue_bool.
It expects a bool
as second argument. See mi::neuraylib::get_value() for details.
|
inline |
This specialization handles mi::neuraylib::IValue_enum, mi::neuraylib::IValue_string and mi::neuraylib::IValue_resource.
It expects a const
char*
as second argument. See mi::neuraylib::get_value() for details.
mi::Sint32 mi::neuraylib::get_value | ( | const mi::neuraylib::IValue * | value, |
const char * | name, | ||
T & | v | ||
) |
This variant handles fields of structs identified via an additional field name.
See also mi::neuraylib::get_value() for more details about overloads.
value | The instance of mi::neuraylib::IValue to read. |
name | The name of the affected struct field. |
v | The new value will be stored here. |
value
does not match the static type of v
.
|
inline |
This specialization handles mi::neuraylib::IValue_float and mi::neuraylib::IValue_double.
It expects an mi::Float32 as second argument. See mi::neuraylib::get_value() for details.
|
inline |
This specialization handles mi::neuraylib::IValue_float and mi::neuraylib::IValue_double.
It expects an mi::Float64 as second argument. See mi::neuraylib::get_value() for details.
|
inline |
This specialization handles mi::neuraylib::IValue_color.
It expects an mi::math::Color as second argument. See mi::neuraylib::get_value() for details.
mi::Sint32 mi::neuraylib::get_value | ( | const mi::neuraylib::IValue * | value, |
mi::math::Matrix<T, ROW, COL> & | v | ||
) |
This specialization handles mi::neuraylib::IValue_matrix.
It expects an mi::math::Matrix of matching dimensions and element type as second argument. See mi::neuraylib::get_value() for details.
|
inline |
This specialization handles mi::neuraylib::IValue_color.
It expects an mi::math::Spectrum as second argument. See mi::neuraylib::get_value() for details.
mi::Sint32 mi::neuraylib::get_value | ( | const mi::neuraylib::IValue * | value, |
mi::math::Vector<T, DIM> & | v | ||
) |
This specialization handles mi::neuraylib::IValue_vector.
It expects an mi::math::Vector of matching dimension and element type as second argument. See mi::neuraylib::get_value() for details.
mi::Sint32 mi::neuraylib::get_value | ( | const mi::neuraylib::IValue * | value, |
mi::Size | index, | ||
T & | v | ||
) |
This variant handles elements of compounds identified via an additional index.
See also mi::neuraylib::get_value() for more details about overloads.
value | The instance of mi::neuraylib::IValue to read. |
index | The index of the affected compound element. |
v | The new value will be stored here. |
value
does not match the static type of v
.mi::Sint32 mi::neuraylib::get_value | ( | const mi::neuraylib::IValue * | value, |
T & | v | ||
) |
Simplifies reading the value of mi::neuraylib::IValue into the corresponding classes from the base and math API.
The various overloads of this method support all atomic MDL types with the corresponding C-type as type of v
(and int
for mi::neuraylib::IValue_enum). Vectors and matrices are supported if v
is of type mi::math::Vector and mi::math::Matrix, respectively. For arrays, see get_value(const mi::neuraylib::IValue*,T*,Size). For components of compounds, see get_value(const mi::neuraylib::IValue*,Size,T&) and get_value(const mi::neuraylib::IValue*,const char*,T&).
It is not possible to read entire structs with a single call (in general there is no corresponding C++ class, and absence of introspection machinery). Struct fields need to be read one by one.
There is no support for inner-most components of multi-dimensional compounds (arrays of compounds or structs of compounds) -- this would require additional overloads accepting two or more component indices and/or field names.
value | The instance of mi::neuraylib::IValue to read. | |
[out] | v | The new value will be stored here. |
value
does not match the static type of v
.This general template handles mi::neuraylib::IValue_int and mi::neuraylib::IValue_enum and expects mi::Uint32 as second argument. Since it is a template it will handle other types as second argument if they are accepted in place of parameters of type mi::Uint32, e.g., mi::Sint32.
mi::Sint32 mi::neuraylib::get_value | ( | const mi::neuraylib::IValue * | value, |
T * | v, | ||
mi::Size | n | ||
) |
This variant handles entire arrays.
See also mi::neuraylib::get_value() for more details about overloads.
value | The instance of mi::neuraylib::IValue to read. |
v | The new values will be stored here (as pointer to a C-like array). |
n | The size of the C-like array (needs to match the size of value ). |
value
is not an array, or the dynamic type of the array elements does not match the static type of v
.
|
inline |
This specialization handles mi::neuraylib::IValue_bool.
It expects a bool
as second argument. See mi::neuraylib::set_value() for details.
mi::Sint32 mi::neuraylib::set_value | ( | mi::neuraylib::IValue * | value, |
const char * | name, | ||
const T & | v | ||
) |
This variant handles fields of structs identified via an additional field name.
See also mi::neuraylib::set_value() for more details about overloads.
value | The instance of mi::neuraylib::IValue to modify. |
name | The name of the affected struct field. |
v | The new value to be set. |
value
does not match the static type of v
.v
is not valid.
|
inline |
This specialization handles mi::neuraylib::IValue_enum, mi::neuraylib::IValue_string and mi::neuraylib::IValue_resource.
It expects a const
char*
as second argument. See mi::neuraylib::set_value() for details.
|
inline |
This specialization handles mi::neuraylib::IValue_float and mi::neuraylib::IValue_double.
It expects an mi::Float32 as second argument. See mi::neuraylib::set_value() for details.
|
inline |
This specialization handles mi::neuraylib::IValue_float and mi::neuraylib::IValue_double.
It expects an mi::Float64 as second argument. See mi::neuraylib::set_value() for details.
|
inline |
This specialization handles mi::neuraylib::IValue_color.
It expects an mi::math::Color as second argument. See mi::neuraylib::set_value() for details.
mi::Sint32 mi::neuraylib::set_value | ( | mi::neuraylib::IValue * | value, |
const mi::math::Matrix<T, ROW, COL> & | v | ||
) |
This specialization handles mi::neuraylib::IValue_matrix.
It expects an mi::math::Matrix of matching dimensions and element type as second argument. See mi::neuraylib::set_value() for details.
|
inline |
This specialization handles mi::neuraylib::IValue_color.
It expects an mi::math::Spectrum as second argument. See mi::neuraylib::set_value() for details.
mi::Sint32 mi::neuraylib::set_value | ( | mi::neuraylib::IValue * | value, |
const mi::math::Vector<T, DIM> & | v | ||
) |
This specialization handles mi::neuraylib::IValue_vector.
It expects an mi::math::Vector of matching dimension and element type as second argument. See mi::neuraylib::set_value() for details.
mi::Sint32 mi::neuraylib::set_value | ( | mi::neuraylib::IValue * | value, |
const T & | v | ||
) |
Simplifies setting the value of mi::neuraylib::IValue from the corresponding classes from the base and math API.
The various overloads of this method support all atomic MDL types with the corresponding C-type as type of v
(and int
for mi::neuraylib::IValue_enum). Vectors and matrices are supported if v
is of type mi::math::Vector and mi::math::Matrix, respectively. For arrays, see set_value(mi::neuraylib::IValue*,const T*,Size). For components of compounds, see set_value(mi::neuraylib::IValue*,Size,const T&) and set_value(mi::neuraylib::IValue*,const char*,const T&).
It is not possible to set entire structs with a single call (in general there is no corresponding C++ class, and absence of introspection machinery). Struct fields need to be set one by one.
There is no support for inner-most components of multi-dimensional compounds (arrays of compounds or structs of compounds) -- this would require additional overloads accepting two or more component indices and/or field names.
value | The instance of mi::neuraylib::IValue to modify. |
v | The new value to be set. |
value
does not match the static type of v
.v
is not valid.This general template handles mi::neuraylib::IValue_int and mi::neuraylib::IValue_enum and expects mi::Uint32 as second argument. Since it is a template it will handle other types as second argument if they are accepted in place of parameters of type mi::Uint32, e.g., mi::Sint32.
mi::Sint32 mi::neuraylib::set_value | ( | mi::neuraylib::IValue * | value, |
const T * | v, | ||
mi::Size | n | ||
) |
This variant handles entire arrays.
See also mi::neuraylib::set_value() for more details about overloads.
value | The instance of mi::neuraylib::IValue to modify. |
v | The new values to be set (as pointer to a C-like array). |
n | The size of the C-like array (needs to match the size of value ). |
value
is not an array, or the dynamic type of the array elements does not match the static type of v
.v
is not valid.mi::Sint32 mi::neuraylib::set_value | ( | mi::neuraylib::IValue * | value, |
mi::Size | index, | ||
const T & | v | ||
) |
This variant handles elements of compounds identified via an additional index.
See also mi::neuraylib::set_value() for more details about overloads.
value | The instance of mi::neuraylib::IValue to modify. |
index | The index of the affected compound element. |
v | The new value to be set. |
value
does not match the static type of v
.v
is not valid.