Abstract interface for a tile. More...
#include <itile.h>
Public Member Functions | |
virtual void | get_pixel (Uint32 x_offset, Uint32 y_offset, Float32 *floats) const =0 |
Looks up a certain pixel at the given coordinates. More... | |
virtual void | set_pixel (Uint32 x_offset, Uint32 y_offset, const Float32 *floats)=0 |
Stores a certain pixel at the given coordinates. More... | |
virtual const char * | get_type () const =0 |
Returns the pixel type used by the tile. More... | |
virtual Uint32 | get_resolution_x () const =0 |
Returns the tile size in x direction. More... | |
virtual Uint32 | get_resolution_y () const =0 |
Returns the tile size in y direction. More... | |
virtual const void * | get_data () const =0 |
Returns a pointer to the raw tile data according to the pixel type of the tile. More... | |
virtual void * | get_data ()=0 |
Returns a pointer to the raw tile data according to the pixel type of the tile. 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 IInterface * | get_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 IInterface * | get_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< 0x0f0a0181, ... > | |
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< 0x0f0a0181, ... > | |
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... | |
Abstract interface for a tile.
A tile is a rectangular array of pixels of a certain pixel type.
|
pure virtual |
Returns a pointer to the raw tile data according to the pixel type of the tile.
This methods is used for fast, direct read access to the raw tile data. It is expected that the data is stored in row-major layout without any padding. In case of mi::Color, the components are expected to be stored in RGBA order.
The total size of the buffer in bytes is
where x
is the result of get_resolution_x(), y
is the result of get_resolution_y(), and bpp
is the number of bytes per pixel.
|
pure virtual |
Returns a pointer to the raw tile data according to the pixel type of the tile.
This methods is used for fast, direct write access to the raw tile data. It is expected that the data is stored in row-major layout without any padding. In case of mi::Color, the components are expected to be stored in RGBA order.
The total size of the buffer in bytes is
where x
is the result of get_resolution_x(), y
is the result of get_resolution_y(), and bpp
is the number of bytes per pixel.
|
pure virtual |
Looks up a certain pixel at the given coordinates.
The offsets are relative to the lower left border of the tile. The floats
argument must point to at least 4 floats, e.g., you pass the address of mi::math::Color.r.
This method is a rather slow, but convenient access method. Typically, the get_data() method is faster and can handle arbitrary data types without pixel type conversion.
|
pure virtual |
Returns the tile size in x direction.
|
pure virtual |
Returns the tile size in y direction.
|
pure virtual |
Returns the pixel type used by the tile.
|
pure virtual |
Stores a certain pixel at the given coordinates.
The offsets are relative to the lower left border of the tile. The floats
argument must point to at least 4 floats, e.g., you pass the address of mi::math::Color.r.
This method is a rather slow, but convenient access method. Typically, the get_data() method is faster and can handle arbitrary data types without pixel type conversion.