Abstract interface for a canvas represented by a rectangular array of tiles. More...
Public Member Functions | |
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 | |
![]() | |
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 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- or three-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 mi::neuraylib::ICanvas_base::get_layers_size(). The format a layer, i.e., the type of each pixel in that layer, is described by mi::neuraylib::ICanvas_base::get_type().
|
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.