neuray API Programmer's Manual

mi::neuraylib::IMdl_resolved_resource Class Reference

[Miscellaneous MDL-related Interfaces]

Description

Describes an ordered set of resolved resource elements. While most resources in MDL can be mapped to exactly one element, some resources like animated textures are mapped to a set of elements.

Public Member Functions

virtual Size get_count() const =0
Returns the number of elements of the resolved resource. More...
virtual const IMdl_resolved_resource_elementget_element( Size i) const =0
Returns the i -th element of the resolved resource. More...
virtual const char* get_filename_mask() const =0
Returns the absolute resolved filename mask for this resource. More...
virtual const char* get_mdl_file_path_mask() const =0
Returns the absolute MDL file path mask for this resource. More...
virtual Uvtile_mode get_uvtile_mode() const =0
Returns the uvtile mode for this resource. More...
virtual bool  has_sequence_marker() const =0
Indicates whether this resource has a sequence marker. More...

Member Functions

virtual Size mi::​neuraylib::​IMdl_resolved_resource::get_count() const [pure virtual]

Returns the number of elements of the resolved resource.

Returns

The number of frames for animated textures. Always 1 for non-animated textures, and for light profiles and BSDF measurements.

virtual const IMdl_resolved_resource_element* mi::​neuraylib::​IMdl_resolved_resource::get_element( Size i) const [pure virtual]

Returns the i -th element of the resolved resource. Resource elements are sorted by increasing frame numbers.

Parameters

i
The index of the requested resource element (from 0 to get_count()-1).

Returns

The requested resource element, or NULL if i is out of bounds.

virtual const char* mi::​neuraylib::​IMdl_resolved_resource::get_filename_mask() const [pure virtual]

Returns the absolute resolved filename mask for this resource. The filename mask is identical to the filename, except that it contains

  • the frame sequence marker instead of specific frame number (if has_sequence_marker() returns true), and

  • the uvtile marker instead of specific uv-coordinates (if get_uvtile_mode() does not return mi::neuraylib::UVTILE_MODE_NONE).

Note:

If this resource is located inside a container (an MDL archive or MDLE), the returned string is a concatenation of the container filename, a colon, and the container member name.

See also:

mi::neuraylib::IMdl_resolved_resource_element::get_filename(), get_uvtile_mode(), has_sequence_marker()

virtual const char* mi::​neuraylib::​IMdl_resolved_resource::get_mdl_file_path_mask() const [pure virtual]

Returns the absolute MDL file path mask for this resource. The MDL file path mask is identical to the MDL file path, except that it contains

  • the frame sequence marker instead of specific frame number (if has_sequence_marker() returns true), and

  • the uvtile marker instead of specific uv-coordinates (if get_uvtile_mode() does not return mi::neuraylib::UVTILE_MODE_NONE).

See also:

mi::neuraylib::IMdl_resolved_resource_element::get_mdl_file_path(), get_uvtile_mode(), has_sequence_marker()

virtual Uvtile_mode mi::​neuraylib::​IMdl_resolved_resource::get_uvtile_mode() const [pure virtual]

Returns the uvtile mode for this resource.

Returns

Always mi::neuraylib::UVTILE_MODE_NONE non-uvtile textures, and for light profiles and BSDF measurements. The return value mi::neuraylib::UVTILE_MODE_NONE implies that mi::neuraylib::IMdl_resolved_resource_element::get_count() returns 1 for all resource elements of this resource, i.e., there is a single resource entity per resource element.

virtual bool mi::​neuraylib::​IMdl_resolved_resource::has_sequence_marker() const [pure virtual]

Indicates whether this resource has a sequence marker.

Returns

Always false for non-animated textures, and for light profiles and BSDF measurements. The return value false implies that get_count() returns 1, i.e., there is a single resource element.