NVIDIA IndeX API nvidia_logo_transpbg.gif Up
iviewport.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_IVIEWPORT_H
8#define NVIDIA_INDEX_IVIEWPORT_H
9
10#include <mi/dice.h>
12
13namespace nv {
14namespace index {
15
72class IViewport :
73 public mi::base::Interface_declare<0x3dd9ae6f,0x819d,0x4c9c,0xbb,0x72,0x7f,0x5a,0x8c,0x49,0xc7,0x01>
74{
75public:
79 virtual void set_scope(mi::neuraylib::IScope* scope) = 0;
80
84 virtual mi::neuraylib::IScope* get_scope() const = 0;
85
90 virtual void set_position(const mi::math::Vector_struct<mi::Sint32, 2>& anchor_position) = 0;
91
96 virtual mi::math::Vector_struct<mi::Sint32, 2> get_position() const = 0;
97
101 virtual void set_size(const mi::math::Vector_struct<mi::Sint32, 2>& resolution) = 0;
102
106 virtual mi::math::Vector_struct<mi::Sint32, 2> get_size() const = 0;
107
111 virtual void set_enabled(bool enable) = 0;
112
116 virtual bool get_enabled() const = 0;
117};
118
119
133 public mi::base::Interface_declare<0xbd7cbc5a,0x4628,0x47ea,0x94,0x9d,0x64,0x3c,0x34,0xa3,0xc6,0x8e>
134{
135public:
139 virtual mi::Size size() const = 0;
140
145 virtual nv::index::IViewport* get(mi::Size index) const = 0;
146
152 virtual void append(nv::index::IViewport* viewport) = 0;
153
161 virtual bool insert(
162 mi::Size index,
163 nv::index::IViewport* viewport) = 0;
164
169 virtual bool remove(mi::Size index) = 0;
170
172 virtual void clear() = 0;
173
182 virtual void set_advisory_enabled(bool enable) = 0;
183
187 virtual bool get_advisory_enabled() const = 0;
188};
189
203 public mi::base::Interface_declare<0x84643c8a,0xd6cb,0x47d8,0xa1,0x5c,0xff,0x6a,0xc9,0x90,0x4b,0x14>
204{
205public:
209 virtual mi::Size size() const = 0;
210
215 virtual nv::index::IIndex_canvas* get_canvas(mi::Size index) const = 0;
216
221 virtual nv::index::IViewport_list* get_viewport_list(mi::Size index) const = 0;
222
229 virtual void append(
231 nv::index::IViewport_list* viewport_list) = 0;
232
241 virtual bool insert(
242 mi::Size index,
244 nv::index::IViewport_list* viewport_list) = 0;
245
250 virtual bool remove(mi::Size index) = 0;
251
253 virtual void clear() = 0;
254};
255
256}} // namespace index / nv
257
258#endif // NVIDIA_INDEX_IVIEWPORT_H
Defines a list of canvases with associated viewports.
Definition: iviewport.h:204
virtual nv::index::IIndex_canvas * get_canvas(mi::Size index) const =0
Returns the canvas at the given position in the list.
virtual nv::index::IViewport_list * get_viewport_list(mi::Size index) const =0
Returns the viewport-list at the given position in the list.
virtual void append(nv::index::IIndex_canvas *canvas, nv::index::IViewport_list *viewport_list)=0
Appends a canvas/viewport-list pair to the end of the list.
virtual void clear()=0
Removes all canvas/viewport-list pairs from the list.
virtual bool insert(mi::Size index, nv::index::IIndex_canvas *canvas, nv::index::IViewport_list *viewport_list)=0
Inserts a canvas/viewport-list pair into the list at the given position.
virtual bool remove(mi::Size index)=0
Removes the canvas/viewport-list pair at the given position from the list.
virtual mi::Size size() const =0
Returns the number of canvases and viewport-lists contained in the list.
Enables rendering to a user-defined canvas.
Definition: iindex_canvas.h:32
Defines a list of viewports that will be rendered onto a canvas.
Definition: iviewport.h:134
virtual void append(nv::index::IViewport *viewport)=0
Appends a viewport to the end of the list.
virtual void set_advisory_enabled(bool enable)=0
Enables or disables the advisory output.
virtual bool get_advisory_enabled() const =0
Returns whether if the advisory output is enabled.
virtual mi::Size size() const =0
Returns the number of viewports contained in the list.
virtual bool insert(mi::Size index, nv::index::IViewport *viewport)=0
Inserts a viewport into the list at the given position.
virtual bool remove(mi::Size index)=0
Removes the viewport at the given position from the list.
virtual void clear()=0
Removes all viewports from the list.
virtual nv::index::IViewport * get(mi::Size index) const =0
Returns the viewport at the given position in the list.
A viewport defines a two-dimensional area of a canvas where the scene from a given DiCE scope should ...
Definition: iviewport.h:74
virtual void set_scope(mi::neuraylib::IScope *scope)=0
Sets the DiCE scope that should be used for this viewport.
virtual bool get_enabled() const =0
Returns whether the viewport should be rendered.
virtual void set_size(const mi::math::Vector_struct< mi::Sint32, 2 > &resolution)=0
Sets the window size (resolution).
virtual mi::neuraylib::IScope * get_scope() const =0
Returns the DiCE scope of this viewport.
virtual mi::math::Vector_struct< mi::Sint32, 2 > get_size() const =0
Return the window size (resolution).
virtual void set_enabled(bool enable)=0
Enable or disable the viewport for inclusion in rendering.
virtual mi::math::Vector_struct< mi::Sint32, 2 > get_position() const =0
Returns the anchor point of the viewport window on the IIndex_canvas in pixel.
virtual void set_position(const mi::math::Vector_struct< mi::Sint32, 2 > &anchor_position)=0
Sets the anchor point of the viewport window on the IIndex_canvas.
User-defined rendering canvas.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349