Iray SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::ITexture_surface Class Referenceabstract

A texture surface associated with freeform surfaces. More...

#include <ifreeform_surface.h>

Inheritance diagram for mi::neuraylib::ITexture_surface:

Public Member Functions

virtual Sint32 set_texture_coordinates_size (Parameter_space_dimension dim, Uint32 count)=0
 Sets the size of the texture coordinates. More...
 
virtual Uint32 get_texture_coordinates_size (Parameter_space_dimension dim) const =0
 Returns the size of the texture coordinates. More...
 
virtual Sint32 set_texture_coordinate_length (Uint32 length)=0
 Sets the length of the texture coordinates. More...
 
virtual Uint32 get_texture_coordinate_length () const =0
 Returns the length of the texture coordinates. More...
 
virtual Sint32 set_texture_coordinate (Uint32 index_u, Uint32 index_v, const Float32 *f, Uint32 n)=0
 Sets a texture coordinate. More...
 
virtual Sint32 get_texture_coordinate (Uint32 index_u, Uint32 index_v, Float32 *f, Uint32 n) const =0
 Returns a texture coordinate. More...
 
virtual Sint32 set_texture_coordinate (Uint32 index_u, Uint32 index_v, const Float64 *d, Uint32 n)=0
 Sets a texture coordinate. More...
 
virtual Sint32 get_texture_coordinate (Uint32 index_u, Uint32 index_v, Float64 *d, Uint32 n) const =0
 Returns a texture coordinate. 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< 0x5d39fdcb, ... >
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< 0x5d39fdcb, ... >
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

A texture surface associated with freeform surfaces.

Texture surfaces for freeform surfaces are similar to texture spaces for triangle meshes, polygon meshes, and subdivision surfaces (see the mesh attribute mi::neuraylib::ATTR_TEXTURE). In contrast to these meshes one cannot attach the texture coordinates to the control points of the freeform surface since the surface in general does not pass through the control points.

Instead, an equidistant grid of texture coordinates is mapped onto the parameter space of the surface. Whenever the tessellator creates a new vertex, its UV parameters are used to compute a bilinear interpolation of the surrounding texture coordinates. The result defines the texture coordinate associated with the new vertex.

See also
mi::neuraylib::ISurface

Member Function Documentation

 get_texture_coordinate() [1/2]

virtual Sint32 mi::neuraylib::ITexture_surface::get_texture_coordinate ( Uint32  index_u,
Uint32  index_v,
Float32 f,
Uint32  n 
) const
pure virtual

Returns a texture coordinate.

Parameters
index_uThe index of the texture coordinate in u-direction.
index_vThe index of the texture coordinate in v-direction.
fThe current value of the texture coordinate.
nThe length of the array f.
Returns
  • 0: Success.
  • -1: index_u or index_v is out of bounds.
  • -2: The parameter n does not match the length of the texture coordinates.

 get_texture_coordinate() [2/2]

virtual Sint32 mi::neuraylib::ITexture_surface::get_texture_coordinate ( Uint32  index_u,
Uint32  index_v,
Float64 d,
Uint32  n 
) const
pure virtual

Returns a texture coordinate.

Parameters
index_uThe index of the texture coordinate in u-direction.
index_vThe index of the texture coordinate in v-direction.
dThe current value of the texture coordinate.
nThe length of the array d.
Returns
  • 0: Success.
  • -1: index_u or index_v is out of bounds.
  • -2: The parameter n does not match the length of the texture coordinates.

 get_texture_coordinate_length()

virtual Uint32 mi::neuraylib::ITexture_surface::get_texture_coordinate_length ( ) const
pure virtual

Returns the length of the texture coordinates.

Returns
The current length.

 get_texture_coordinates_size()

virtual Uint32 mi::neuraylib::ITexture_surface::get_texture_coordinates_size ( Parameter_space_dimension  dim) const
pure virtual

Returns the size of the texture coordinates.

Parameters
dimThe affected dimension.
Returns
The current size in that direction (or 0 in case of an invalid dimension).

 set_texture_coordinate() [1/2]

virtual Sint32 mi::neuraylib::ITexture_surface::set_texture_coordinate ( Uint32  index_u,
Uint32  index_v,
const Float32 f,
Uint32  n 
)
pure virtual

Sets a texture coordinate.

Parameters
index_uThe index of the texture coordinate in u-direction.
index_vThe index of the texture coordinate in v-direction.
fThe new value of the texture coordinate.
nThe length of the array f.
Returns
  • 0: Success.
  • -1: index_u or index_v is out of bounds.
  • -2: The parameter n does not match the length of the texture coordinates.

 set_texture_coordinate() [2/2]

virtual Sint32 mi::neuraylib::ITexture_surface::set_texture_coordinate ( Uint32  index_u,
Uint32  index_v,
const Float64 d,
Uint32  n 
)
pure virtual

Sets a texture coordinate.

Parameters
index_uThe index of the texture coordinate in u-direction.
index_vThe index of the texture coordinate in v-direction.
dThe new value of the texture coordinate.
nThe length of the array d.
Returns
  • 0: Success.
  • -1: index_u or index_v is out of bounds.
  • -2: The parameter n does not match the length of the texture coordinates.

 set_texture_coordinate_length()

virtual Sint32 mi::neuraylib::ITexture_surface::set_texture_coordinate_length ( Uint32  length)
pure virtual

Sets the length of the texture coordinates.

Parameters
lengthThe new length.
Returns
  • 0: Success.
  • -1: Invalid length (must be at least 1).

 set_texture_coordinates_size()

virtual Sint32 mi::neuraylib::ITexture_surface::set_texture_coordinates_size ( Parameter_space_dimension  dim,
Uint32  count 
)
pure virtual

Sets the size of the texture coordinates.

Parameters
dimThe affected dimension.
countThe new size in that direction (must be at least 2).
Returns
  • 0: Success.
  • -1: Invalid dimension.
  • -2: Invalid count.