MDL SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IMdl_resolved_resource_element Class Referenceabstract

Describes an ordered set of resolved resource entities. More...

#include <imdl_entity_resolver.h>

Inheritance diagram for mi::neuraylib::IMdl_resolved_resource_element:

Public Member Functions

virtual Size get_frame_number () const =0
 Returns the frame number of this element. More...
 
virtual Size get_count () const =0
 Returns the number of resource entities for 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 const char * get_filename (Size i) const =0
 Returns the absolute resolved filename of a resource entity. More...
 
virtual IReadercreate_reader (Size i) const =0
 Returns a reader for a resource entity. More...
 
virtual base::Uuid get_resource_hash (Size i) const =0
 Returns the resource hash value for a 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...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x0c49fcd6, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x0c49fcd6, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed 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.

Member Function Documentation

 create_reader()

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
iThe 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.

 get_count()

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.

 get_filename()

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.

Parameters
iThe 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.
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()

 get_frame_number()

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.

 get_mdl_file_path()

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.

Parameters
iThe 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.
See also
mi::neuraylib::IMdl_resolved_resource::get_mdl_file_path_mask()

 get_resource_hash()

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

Returns the resource hash value for a resource entity.

Parameters
iThe 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.

 get_uvtile_uv()

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
iThe index of the requested resource entity (from 0 to get_count()-1).
[out]uThe u-coordinate of the resource entity.
[out]vThe 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).