Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::ITexture Class Referenceabstract

Textures add image processing options to images. More...

Inheritance diagram for mi::neuraylib::ITexture:
mi::base::Interface_declare< 0x012c847c, 0xaf47, 0x4338, 0xb7, 0xc4, 0x78, 0x67, 0xa3, 0x55, 0x47, 0x18, neuraylib::IScene_element > mi::neuraylib::IScene_element mi::base::Interface_declare< 0x8a2a4da9, 0xe323, 0x452c, 0xb8, 0xda, 0x92, 0x45, 0x67, 0x85, 0xd7, 0x78, neuraylib::IAttribute_set > mi::neuraylib::IAttribute_set mi::base::Interface_declare< 0x1bcb8d48, 0x10c1, 0x4b3e, 0x9b, 0xfa, 0x06, 0x23, 0x61, 0x81, 0xd3, 0xe1 > mi::base::IInterface

Public Member Functions

Methods related to the referenced image
virtual Sint32 set_image (const char *name)=0
 Sets the referenced image. More...
 
virtual const char * get_image () const =0
 Returns the referenced image. More...
 
Methods related to the gamma value
virtual void set_gamma (Float32 gamma)=0
 Sets the gamma value of this texture. More...
 
virtual Float32 get_gamma () const =0
 Returns the gamma value of this texture. More...
 
virtual Float32 get_effective_gamma (Uint32 uvtile_id=0) const =0
 Returns the effective gamma value. More...
 
Miscellaneous methods
virtual void set_compression (Texture_compression compression)=0
 Sets the texture compression method. More...
 
virtual Texture_compression get_compression () const =0
 Returns the texture compression method. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x012c847c, 0xaf47, 0x4338, 0xb7, 0xc4, 0x78, 0x67, 0xa3, 0x55, 0x47, 0x18, 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...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x012c847c, 0xaf47, 0x4338, 0xb7, 0xc4, 0x78, 0x67, 0xa3, 0x55, 0x47, 0x18, 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...
 

Detailed Description

Textures add image processing options to images.

A texture appears in the scene as an argument of an MDL function call (see mi::neuraylib::IFunction_call) or default argument of an MDL function definition (see mi::neuraylib::IFunction_definition). The type of such an argument is mi::neuraylib::IType_texture or an alias of it.

See Also
mi::neuraylib::IImage

Member Function Documentation

virtual Texture_compression mi::neuraylib::ITexture::get_compression ( ) const
pure virtual

Returns the texture compression method.

Note
This setting does not affect the referenced image itself, it only affects image data that has been processed by the render modes. For example, in order to save GPU memory processed image data can be compressed before being uploaded to the GPU.
See Also
mi::neuraylib::Texture_compression
virtual Float32 mi::neuraylib::ITexture::get_effective_gamma ( Uint32  uvtile_id = 0) const
pure virtual

Returns the effective gamma value.

Parameters
uvtile_idThe id of the uvtile of the texture the gamma value is requested for when no override is set.

Returns the gamma value of this texture, unless no override is set. In this case the gamma value of the underlying image at the given uvtile index is returned. If no such image exists 0.0 is returned.

virtual Float32 mi::neuraylib::ITexture::get_gamma ( ) const
pure virtual

Returns the gamma value of this texture.

The gamma value of the texture is an override for the gamma value of the underlying image. The special value 0.0 means that the override is not set.

See Also
get_effective_gamma()
virtual const char* mi::neuraylib::ITexture::get_image ( ) const
pure virtual

Returns the referenced image.

Returns
The referenced image, or NULL if no image is referenced.
virtual void mi::neuraylib::ITexture::set_compression ( Texture_compression  compression)
pure virtual

Sets the texture compression method.

Note
This setting does not affect the referenced image itself, it only affects image data that has been processed by the render modes. For example, in order to save GPU memory processed image data can be compressed before being uploaded to the GPU.
See Also
mi::neuraylib::Texture_compression
virtual void mi::neuraylib::ITexture::set_gamma ( Float32  gamma)
pure virtual

Sets the gamma value of this texture.

The gamma value of the texture is an override for the gamma value of the underlying image. The special value 0.0 means that the override is not set.

virtual Sint32 mi::neuraylib::ITexture::set_image ( const char *  name)
pure virtual

Sets the referenced image.

Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: There is no element with that name.
  • -3: The element can not be referenced because it is in a more private scope than the texture.
  • -4: The element is not an image.