neuray API Programmer's Manual

mi::neuraylib::IMdle_deserialization_callback Class Reference

[Miscellaneous MDL-related Interfaces]

Description

Callback to map references to MDLE modules during deserialization. The name of an MDLE module is the absolute filename of the module. This makes it difficult to to move such modules around since that requires adjusting all references. This callback allows to rewrite such references during deserialization. The reverse mapping should be implemented in an corresponding instance of mi::neuraylib::IMdle_serialization_callback.

One possible solution is to choose a filename that is relative to a known reference point that will be moved together with the MDLE file, e.g., the main scene file.

See also:

mi::neuraylib::IMdle_serialization_callback, mi::neuraylib::IMdl_impexp_api::deserialize_function_name() (two overloads), mi::neuraylib::IMdl_impexp_api::deserialize_module_name()

Public Member Functions

virtual const IStringget_deserialized_filename( const char* serialized_filename) const =0
Returns a the filename of an MDLE module given its serialized filename. More...

Member Functions

virtual const IString* mi::​neuraylib::​IMdle_deserialization_callback::get_deserialized_filename( const char* serialized_filename) const [pure virtual]

Returns a the filename of an MDLE module given its serialized filename. The callback might get involved several times with the same argument. You might want to cache results if the computation is expensive.

Parameters

serialized_filename
The "serialized filename" of an MDLE module. This is the string that has been returned by mi::neuraylib::IMdle_serialization_callback::get_serialized_filename().

Returns

The actual filename of that MDLE module.