This interface represents a material instance. More...
Public Types | |
enum |
Compilation_options { DEFAULT_OPTIONS = 0, CLASS_COMPILATION = 1 } |
Various options for the creation of compiled materials. More... |
|
Public Types inherited from mi::base::Interface_declare< 0xf265a300, 0x01d9, 0x4b65, 0xb9, 0x64, 0xd4, 0x78, 0xde, 0x7c, 0xeb, 0xf2, neuraylib::IScene_element > | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, neuraylib::IScene_element > |
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... |
|
Public Member Functions | |
virtual const char * | get_material_definition () const =0 |
Returns the DB name of the corresponding material definition. More... |
|
virtual const char * | get_name () const =0 |
Returns the MDL name of the corresponding material definition. More... |
|
virtual Uint32 | get_parameter_count () const =0 |
Returns the number of parameters. More... |
|
virtual const char * | get_parameter_name (Uint32 index) const =0 |
Returns the name of the parameter at index . More... |
|
virtual Sint32 | get_parameter_index (const char *name) const =0 |
Returns the index position of a parameter. More... |
|
virtual const char * | get_parameter_type (Uint32 index) const =0 |
Returns the type of the parameter at index . More... |
|
virtual const char * | get_parameter_type (const char *name) const =0 |
Returns the type of a parameter. More... |
|
virtual bool | is_parameter_type_uniform (Uint32 index) const =0 |
Indicates whether the type of a parameter is uniform. More... |
|
virtual bool | is_parameter_type_uniform (const char *name) const =0 |
Indicates whether the type of a parameter is uniform. More... |
|
virtual const char * | get_argument_type (Uint32 index) const =0 |
Returns the type of the argument at index . More... |
|
virtual const char * | get_argument_type (const char *name) const =0 |
Returns the type of an argument. More... |
|
virtual const IAttachable * | get_argument (Uint32 index) const =0 |
Returns the argument at index . More... |
|
template<class T > | |
const T * | get_argument (Uint32 index) const |
Returns the argument at index . More... |
|
virtual const IAttachable * | get_argument (const char *name) const =0 |
Returns the argument for a parameter. More... |
|
template<class T > | |
const T * | get_argument (const char *name) const |
Returns the argument for a parameter. More... |
|
virtual Sint32 | set_argument (Uint32 index, const IAttachable *value)=0 |
Sets the argument at index . More... |
|
virtual Sint32 | set_argument (const char *name, const IAttachable *value)=0 |
Sets the argument for a parameter. More... |
|
virtual const IAttribute_container * |
access_arguments () const =0 |
Returns the arguments of all parameters. More... |
|
virtual Sint32 | set_arguments (const IAttribute_container *arguments)=0 |
Sets the arguments of multiple parameters. More... |
|
virtual IMdl_compiled_material * | create_compiled_material (Uint32 flags=0, Float32 mdl_meters_per_scene_unit=1.0f, Sint32 *errors=0) const =0 |
Creates a compiled material. More... |
|
Additional Inherited Members | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0xf265a300, 0x01d9, 0x4b65, 0xb9, 0x64, 0xd4, 0x78, 0xde, 0x7c, 0xeb, 0xf2, neuraylib::IScene_element > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
This interface represents a material instance.
A material instance is a concrete instance of a formal material definition, with a fixed set of arguments (possibly the defaults of the material definition). Material instances can be created from material definitions using mi::neuraylib::IMdl_material_definition::create_material_instance().
Various options for the creation of compiled materials.
Enumerator | |
---|---|
DEFAULT_OPTIONS |
Default compilation options (e.g., instance compilation). |
CLASS_COMPILATION |
Selects class compilation instead of instance compilation. |
|
pure virtual |
Returns the arguments of all parameters.
|
pure virtual |
Creates a compiled material.
flags | A bitmask of flags of type Compilation_options. | |
mdl_meters_per_scene_unit | The conversion ratio between meters and scene units for this material. | |
[out] | errors | An optional pointer to an mi::Sint32 to which an error code will be written. The error codes have the following meaning:
|
NULL
in case of failure.
|
pure virtual |
Returns the argument at index
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
index | The index of the argument. |
NULL
if index
is out of range.
|
inline |
Returns the argument at index
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
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.
T | The interface type of the requested element |
index | The index of the argument. |
NULL
if index
is out of range.
|
pure virtual |
Returns the argument for a parameter.
name | The name of the parameter. |
NULL
if name
is invalid.
|
inline |
Returns the argument for a parameter.
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.
T | The interface type of the requested element |
name | The name of the parameter. |
NULL
if name
is invalid.
|
pure virtual |
Returns the type of the argument at index
.
The type of a given argument is an attachable of the corresponding parameter type. For example, if get_parameter_type() returns "Sint32"
, this method returns "Attachable<Sint32>"
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
index | The index of the argument. |
NULL
if index
is out of range.
|
pure virtual |
Returns the type of an argument.
The type of a given argument is an attachable of the corresponding parameter type. For example, if get_parameter_type() returns "Sint32"
, this method returns "Attachable<Sint32>"
.
name | The name of the argument. |
NULL
if name
is invalid.
|
pure virtual |
Returns the DB name of the corresponding material definition.
The type of the material definition is mi::neuraylib::IMdl_material_definition.
|
pure virtual |
Returns the MDL name of the corresponding material definition.
|
pure virtual |
Returns the number of parameters.
|
pure virtual |
Returns the index position of a parameter.
name | The name of the parameter. |
name
is invalid.
|
pure virtual |
Returns the name of the parameter at index
.
index | The index of the parameter. |
NULL
if index
is out of range.
|
pure virtual |
Returns the type of the parameter at index
.
If a literal 0
is passed for index
, the call is ambiguous. You need to explicitly cast the value to mi::Uint32.
index | The index of the parameter. |
NULL
if index
is out of range.
|
pure virtual |
Returns the type of a parameter.
name | The name of the parameter. |
NULL
if name
is invalid.
|
pure virtual |
Indicates whether the type of a parameter is uniform.
index | The index of the parameter. |
true
if the parameter is uniform, otherwise false
(including invalid index
).
|
pure virtual |
Indicates whether the type of a parameter is uniform.
name | The name of the parameter. |
true
if the parameter is uniform, otherwise false
(including invalid name
).
|
pure virtual |
Sets the argument at index
.
index | The index of the argument. |
value | The argument. Note that the value is copied; passing a value obtained from another MDL interface does not create a link between both instances. |
NULL
pointer).index
does not exist.
|
pure virtual |
Sets the argument for a parameter.
name | The name of the parameter. |
value | The argument. Note that the value is copied; passing a value obtained from another MDL interface does not create a link between both instances. |
NULL
pointer).name
does not exist.
|
pure virtual |
Sets the arguments of multiple parameters.
arguments | The arguments. Note that the values are copied; passing an attribute container obtained from another MDL interface does not create a link between both instances. |
NULL
pointer).arguments
does not exist.