Abstract interface for a canvas represented by a rectangular array of tiles. More...
Public Member Functions | |
virtual Uint32 | get_layers_size () const =0 |
Returns the number of layers this canvas has. More... |
|
virtual Float32 | get_gamma () const =0 |
Returns the gamma value. More... |
|
virtual void | set_gamma (Float32 gamma)=0 |
Sets the gamma value. More... |
|
virtual Uint32 | get_tile_resolution_x () const =0 |
Returns the tile size in x direction. More... |
|
virtual Uint32 | get_tile_resolution_y () const =0 |
Returns the tile size in y direction. More... |
|
virtual Uint32 | get_tiles_size_x () const =0 |
Returns the number of tiles in x direction. More... |
|
virtual Uint32 | get_tiles_size_y () const =0 |
Returns the number of tiles in y direction. More... |
|
virtual const ITile * | get_tile (Uint32 pixel_x, Uint32 pixel_y, Uint32 layer=0) const =0 |
Returns the tile which contains a given pixel. More... |
|
virtual ITile * | get_tile (Uint32 pixel_x, Uint32 pixel_y, Uint32 layer=0)=0 |
Returns the tile which contains a given pixel. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x20e5d5de, 0x1f61, 0x441c, 0x88, 0x88, 0xff, 0x85, 0x89, 0x98, 0x7a, 0xfa, neuraylib::ICanvas_base > | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, neuraylib::ICanvas_base > |
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< 0x20e5d5de, 0x1f61, 0x441c, 0x88, 0x88, 0xff, 0x85, 0x89, 0x98, 0x7a, 0xfa, neuraylib::ICanvas_base > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
Abstract interface for a canvas represented by a rectangular array of tiles.
A canvas represents a two-dimensional array of pixels. The size of this array is given by mi::neuraylib::ICanvas_base::get_resolution_x() and mi::neuraylib::ICanvas_base::get_resolution_y(). The pixels are grouped in rectangular tiles of size get_tile_resolution_x() and get_tile_resolution_y(). The number of tiles is given by get_tiles_size_x() and get_tiles_size_y() and it holds
If the left-hand side is strictly larger than the right hand side then there are excess pixels which might have any color.
A pixel at position (canvas_pixel_x
, canvas_pixel_y
) of the canvas belongs to the tile (tile_number_x
, tile_number_y
) where tile_number_x
and tile_number_y
are computed as follows:
Within this tile the pixel has the coordinates (tile_pixel_x
, tile_pixel_y
) which are computed as follows
Optionally, there can be multiple layers of such tile arrays. The number of these layers is given by get_layers_size(). The format a layer, i.e., the type of each pixel in that layer, is described by get_type().
The mi::neuraylib::IRender_target, mi::neuraylib::ICanvas, and mi::neuraylib::ITile classes are abstract interfaces which can to be implemented by the application. For example, this gives the application the ability to tailor the rendering process very specific to its needs. The render target has to be implemented by the application whereas default implementations for canvases and tiles are available from mi::neuraylib::IImage_api.
|
pure virtual |
Returns the gamma value.
The gamma value should be a positive number. Typical values are 2.2 for LDR pixel types, and 1.0 for HDR pixel types.
|
pure virtual |
Returns the number of layers this canvas has.
|
pure virtual |
Returns the tile which contains a given pixel.
pixel_x | The x coordinate of pixel with respect to the canvas. |
pixel_y | The y coordinate of pixel with respect to the canvas. |
layer | The layer of the pixel in the canvas. |
NULL
in case of invalid parameters.
|
pure virtual |
Returns the tile which contains a given pixel.
pixel_x | The x coordinate of pixel with respect to the canvas. |
pixel_y | The y coordinate of pixel with respect to the canvas. |
layer | The layer of the pixel in the canvas. |
NULL
in case of invalid parameters.
|
pure virtual |
Returns the tile size in x direction.
|
pure virtual |
Returns the tile size in y direction.
|
pure virtual |
Returns the number of tiles in x direction.
|
pure virtual |
Returns the number of tiles in y direction.
|
pure virtual |
Sets the gamma value.