MDL SDK API nvidia_logo_transpbg.gif Up
icanvas.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_ICANVAS_H
8#define MI_NEURAYLIB_ICANVAS_H
9
12
13namespace mi {
14
15namespace neuraylib {
16
17class ITile;
18
32class ICanvas_base : public
33 mi::base::Interface_declare<0x649fc7bd,0xc021,0x4aff,0x9e,0xa4,0x5b,0xab,0x18,0xb9,0x25,0x59>
34{
35public:
37 virtual Uint32 get_resolution_x() const = 0;
38
40 virtual Uint32 get_resolution_y() const = 0;
41
45 virtual const char* get_type() const = 0;
46
48 virtual Uint32 get_layers_size() const = 0;
49
56 virtual Float32 get_gamma() const = 0;
57
63 virtual void set_gamma( Float32 gamma) = 0;
64
65};
66
86class ICanvas : public
87 mi::base::Interface_declare<0x20e5d5de,0x1f61,0x441c,0x88,0x88,0xff,0x85,0x89,0x98,0x7a,0xfa,
88 neuraylib::ICanvas_base>
89{
90public:
91
97 virtual const ITile* get_tile( Uint32 layer = 0) const = 0;
98
104 virtual ITile* get_tile( Uint32 layer = 0) = 0;
105};
106
107
110{
111 return Uint32_2(canvas.get_resolution_x(),canvas.get_resolution_y());
112}
113
114 // end group mi_neuray_rendering
116
117} // namespace neuraylib
118
119} // namespace mi
120
121#endif // MI_NEURAYLIB_ICANVAS_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Fixed-size math vector class template with generic operations.
Definition: vector.h:286
Abstract interface for a canvas (base class).
Definition: icanvas.h:34
virtual Uint32 get_layers_size() const =0
Returns the number of layers this canvas has.
virtual Float32 get_gamma() const =0
Returns the gamma value.
virtual void set_gamma(Float32 gamma)=0
Sets the gamma value.
virtual Uint32 get_resolution_y() const =0
Returns the resolution of the canvas in y direction.
virtual Uint32 get_resolution_x() const =0
Returns the resolution of the canvas in x direction.
virtual const char * get_type() const =0
Returns the pixel type used by the canvas.
Abstract interface for a canvas represented by a rectangular array of tiles.
Definition: icanvas.h:89
virtual ITile * get_tile(Uint32 layer=0)=0
Returns the tile for the given layer.
virtual const ITile * get_tile(Uint32 layer=0) const =0
Returns the tile for the given layer.
Abstract interface for a tile.
Definition: itile.h:36
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
float Float32
32-bit float.
Definition: types.h:51
math::Vector<Uint32, 2> Uint32_2
Vector of two Uint32.
Definition: vector_typedefs.h:62
Uint32_2 get_resolution(const ICanvas_base &canvas)
Convenience function which returns a canvas' resolution in a struct.
Definition: icanvas.h:109
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
Typedefs for types from the math API.