neuray API Programmer's Manual

mi::neuraylib::IMdl_resolved_resource_element Class Reference

[Miscellaneous MDL-related Interfaces]

Description

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

Public Member Functions

virtual IReadercreate_reader( Size i) const =0
Returns a reader for a resource entity. More...
virtual Size get_count() const =0
Returns the number of resource entities for this element. More...
virtual const char* get_filename( Size i) const =0
Returns the absolute resolved filename of a resource entity. More...
virtual Size get_frame_number() const =0
Returns the frame number of this element. More...
virtual const char* get_mdl_file_path( Size i) const =0
Returns the absolute MDL file path of a resource entity. More...
virtual base::​Uuid get_resource_hash( Size i) const =0
Returns the resource hash value for ta resource entity. More...
virtual bool  get_uvtile_uv( Size i, Sint32& u, Sint32& v) const =0
Returns the u and v tile indices for a resource entity. More...

Member Functions

virtual IReader* mi::​neuraylib::​IMdl_resolved_resource_element::create_reader( Size i) const [pure virtual]

Returns a reader for a resource entity. The reader needs to support absolute access.

Parameters

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

Returns

The reader of the i -th resource entity, or NULL if the index is out of range.

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

Returns the number of resource entities for this element.

Returns

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

virtual const char* mi::​neuraylib::​IMdl_resolved_resource_element::get_filename( Size i) const [pure virtual]

Returns the absolute resolved filename of a resource entity.

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::get_filename_mask()

Parameters

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

Returns

The absolute resolved filename of the i -th resource entity, or NULL if the index is out of range.

virtual Size mi::​neuraylib::​IMdl_resolved_resource_element::get_frame_number() const [pure virtual]

Returns the frame number of this element.

Returns

The frame number in case of animated textures. Always 0 for textures without frame index, and for light profiles and BSDF measurements.

virtual const char* mi::​neuraylib::​IMdl_resolved_resource_element::get_mdl_file_path( Size i) const [pure virtual]

Returns the absolute MDL file path of a resource entity.

See also:

mi::neuraylib::IMdl_resolved_resource::get_mdl_file_path_mask()

Parameters

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

Returns

The absolute MDL file path of the i -th resource entity, or NULL if the index is out of range.

virtual base::​Uuid mi::​neuraylib::​IMdl_resolved_resource_element::get_resource_hash( Size i) const [pure virtual]

Returns the resource hash value for ta resource entity.

Parameters

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

Returns

The hash value of the i -th resource entity, or a zero-initialized value if the hash value is unknown or the index is out of range.

virtual bool mi::​neuraylib::​IMdl_resolved_resource_element::get_uvtile_uv( Size i, Sint32& u, Sint32& v) const [pure virtual]

Returns the u and v tile indices for a resource entity.

Parameters

i
The index of the requested resource entity (from 0 to get_count()-1).
u
The u-coordinate of the resource entity.
v
The v-coordinate of the resource entity.

Returns

true if the uvtile mode is not mi::neuraylib::UVTILE_MODE_NONE and i is in range, false otherwise (and the output values are undefined).