neuray API Programmer's Manual

mi::neuraylib::ITexture_surface Class Reference

[Leaf nodes]

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

Public Member Functions

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

Member Functions

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_u
The index of the texture coordinate in u-direction.
index_v
The index of the texture coordinate in v-direction.
f
The current value of the texture coordinate.
n
The 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.
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_u
The index of the texture coordinate in u-direction.
index_v
The index of the texture coordinate in v-direction.
d
The current value of the texture coordinate.
n
The 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.
virtual Uint32 mi::​neuraylib::​ITexture_surface::get_texture_coordinate_length() const [pure virtual]

Returns the length of the texture coordinates.

Returns

The current length.

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

dim
The affected dimension.

Returns

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

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_u
The index of the texture coordinate in u-direction.
index_v
The index of the texture coordinate in v-direction.
f
The new value of the texture coordinate.
n
The 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.
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_u
The index of the texture coordinate in u-direction.
index_v
The index of the texture coordinate in v-direction.
d
The new value of the texture coordinate.
n
The 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.
virtual Sint32 mi::​neuraylib::​ITexture_surface::set_texture_coordinate_length( Uint32 length) [pure virtual]

Sets the length of the texture coordinates.

Parameters

length
The new length.

Returns

  • 0: Success.
  • -1: Invalid length (must be at least 1).
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

dim
The affected dimension.
count
The new size in that direction (must be at least 2).

Returns

  • 0: Success.
  • -1: Invalid dimension.
  • -2: Invalid count.