DiCE API nvidia_logo_transpbg.gif Up
icanvas.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2023 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
54 virtual Float32 get_gamma() const = 0;
55
59 virtual void set_gamma( Float32 gamma) = 0;
60
61};
62
82class ICanvas : public
83 mi::base::Interface_declare<0x20e5d5de,0x1f61,0x441c,0x88,0x88,0xff,0x85,0x89,0x98,0x7a,0xfa,
84 neuraylib::ICanvas_base>
85{
86public:
87
93 virtual const ITile* get_tile( Uint32 layer = 0) const = 0;
94
100 virtual ITile* get_tile( Uint32 layer = 0) = 0;
101};
102
103
106{
107 return Uint32_2(canvas.get_resolution_x(),canvas.get_resolution_y());
108}
109
110 // end group mi_neuray_rendering
112
113} // namespace neuraylib
114
115} // namespace mi
116
117#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:85
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:105
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: dice.h:89
Typedefs for types from the math API.