NVIDIA IndeX API nvidia_logo_transpbg.gif Up
ipath.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_IPATH_SHAPE_H
8#define NVIDIA_INDEX_IPATH_SHAPE_H
9
10#include <mi/base/interface_declare.h>
11#include <mi/dice.h>
12
13#include <nv/index/ishape.h>
14#include <nv/index/iattribute.h>
15
16namespace nv
17{
18namespace index
19{
20
28 public mi::base::Interface_declare<0xb4568002,0xc4f5,0x4e32,0xb2,0xf6,0x5e,0x04,0x12,0x45,0x2d,0xac,
29 nv::index::IAttribute>
30{
31public:
34 {
39 // round caps.
40 CAP_STYLE_ROUND = 2
41 };
42
48 virtual Cap_style get_cap_style() const = 0;
49
55 virtual void set_cap_style(Cap_style cap_style) = 0;
56
57
60 {
61 INTERPOLATION_SEGMENT = 0, // A single solid color per segment (default).
62 INTERPOLATION_NEAREST = 1, // A solid color to nearest value.
63 INTERPOLATION_LINEAR = 2 // Linear color interpolation between points.
64 };
65
71 virtual Interpolation get_interpolation() const = 0;
72
78 virtual void set_interpolation(Interpolation technique) = 0;
79
82 {
83 COLOR_SOURCE_NONE = 0, // disable colormap and rgba array sources.
84 COLOR_SOURCE_COLORMAP_ONLY = 1, // It uses colormap only. rgba array is disabled.
85 COLOR_SOURCE_RGBA_ONLY = 2, // It uses rgba array only. Colormap is disabled.
86 COLOR_SOURCE_BOTH = 3, // It uses both color sources or any defined (default).
87 // When both defined it mixes the colors from both sources.
88 };
89
94 virtual Color_source get_color_source() const = 0;
95
100 virtual void set_color_source(Color_source source) = 0;
101
110 virtual void set_upsampling(bool enable, mi::Uint32 up_factor = 2, mi::Float32 tension = 0.f) = 0;
111
118 virtual void get_upsampling(bool &enable, mi::Uint32 &up_factor, mi::Float32 &tension) const = 0;
119
120};
121
131class IPath_3D :
132 public mi::base::Interface_declare<0xe284adf5,0x6beb,0x4792,0x84,0x36,0x95,0xc7,0x78,0xb9,0xff,0x8a,
133 nv::index::IObject_space_shape>
134{
135public:
141 virtual mi::Float32 get_radius() const = 0;
142
148 virtual void set_radius(mi::Float32 radius) = 0;
149
154 virtual mi::Uint32 get_nb_points() const = 0;
155
160 virtual const mi::math::Vector_struct<mi::Float32, 3>* get_points() const = 0;
161
168 virtual void set_points(
169 mi::math::Vector_struct<mi::Float32, 3>* points,
170 mi::Uint32 nb_points) = 0;
171
176 virtual const mi::Float32* get_radii() const = 0;
177
186 virtual void set_radii(
187 mi::Float32* radii,
188 mi::Uint32 nb_radii) = 0;
189
194 virtual const mi::math::Color_struct* get_colors() const = 0;
195
204 virtual void set_colors(
205 mi::math::Color_struct* colors,
206 mi::Uint32 nb_colors) = 0;
207
212 virtual const mi::Uint32* get_color_map_indexes() const = 0;
213
223 mi::Uint32* indexes,
224 mi::Uint32 nb_indexes) = 0;
225
231 virtual const mi::Uint32* get_material_ids() const = 0;
232
243 virtual void set_material_ids(
244 mi::Uint32* ids,
245 mi::Uint32 nb_ids) = 0;
246};
247
254class IPath_2D :
255 public mi::base::Interface_declare<0xae7cff77,0x114b,0x472e,0x9b,0x77,0x1b,0xde,0x7d,0x98,0xff,0x7d,
256 nv::index::IImage_space_shape>
257{
258public:
259
265 virtual mi::Float32 get_radius() const = 0;
266
272 virtual void set_radius(mi::Float32 radius) = 0;
273
278 virtual mi::Uint32 get_nb_points() const = 0;
279
284 virtual const mi::math::Vector_struct<mi::Float32, 3>* get_points() const = 0;
285
292 virtual void set_points(
293 mi::math::Vector_struct<mi::Float32, 3>* points,
294 mi::Uint32 nb_points) = 0;
295
300 virtual const mi::Float32* get_radii() const = 0;
301
310 virtual void set_radii(
311 mi::Float32* radii,
312 mi::Uint32 nb_radii) = 0;
313
318 virtual const mi::math::Color_struct* get_colors() const = 0;
319
328 virtual void set_colors(
329 mi::math::Color_struct* colors,
330 mi::Uint32 nb_colors) = 0;
331
336 virtual const mi::Uint32* get_color_map_indexes() const = 0;
337
347 mi::Uint32* indexes,
348 mi::Uint32 nb_indexes) = 0;
349};
350
351}} // namespace index / nv
352
353#endif // NVIDIA_INDEX_IPATH_SHAPE_H
Interface class for 2D paths.
Definition: ipath.h:257
virtual void set_color_map_indexes(mi::Uint32 *indexes, mi::Uint32 nb_indexes)=0
Set the pointer to the array of colormap indexes per segment/point.
virtual const mi::Uint32 * get_color_map_indexes() const =0
Get the pointer to the array of color map indexes per segment/point.
virtual void set_radius(mi::Float32 radius)=0
set the radius (in pixels units) of the path
virtual const mi::math::Color_struct * get_colors() const =0
Get the pointer to the array of colors per segment/point.
virtual mi::Float32 get_radius() const =0
Get the radius of the path.
virtual void set_radii(mi::Float32 *radii, mi::Uint32 nb_radii)=0
Set the pointer to the array of radii per point.
virtual void set_colors(mi::math::Color_struct *colors, mi::Uint32 nb_colors)=0
Set the pointer to the array of color per segment/point.
virtual const mi::math::Vector_struct< mi::Float32, 3 > * get_points() const =0
Get the pointer to the array of path points.
virtual void set_points(mi::math::Vector_struct< mi::Float32, 3 > *points, mi::Uint32 nb_points)=0
Set the pointer to the array of points.
virtual const mi::Float32 * get_radii() const =0
Get the pointer to the array of radii per point.
virtual mi::Uint32 get_nb_points() const =0
Get the number of path points.
Interface class for 3D paths.
Definition: ipath.h:134
virtual const mi::Uint32 * get_color_map_indexes() const =0
Get the pointer to the array of color map indexes per segment/point.
virtual void set_points(mi::math::Vector_struct< mi::Float32, 3 > *points, mi::Uint32 nb_points)=0
Set the pointer to the array of points.
virtual mi::Float32 get_radius() const =0
Get the radius of the path.
virtual const mi::Uint32 * get_material_ids() const =0
Get a pointer to the list of material ids.
virtual const mi::math::Color_struct * get_colors() const =0
Get the pointer to the array of colors per segment/point.
virtual void set_radii(mi::Float32 *radii, mi::Uint32 nb_radii)=0
Set the pointer to the array of radii per point.
virtual const mi::math::Vector_struct< mi::Float32, 3 > * get_points() const =0
Get the pointer to the array of path points.
virtual void set_color_map_indexes(mi::Uint32 *indexes, mi::Uint32 nb_indexes)=0
Set the pointer to the array of colormap indexes per segment/point.
virtual void set_colors(mi::math::Color_struct *colors, mi::Uint32 nb_colors)=0
Set the pointer to the array of color per segment/point.
virtual void set_material_ids(mi::Uint32 *ids, mi::Uint32 nb_ids)=0
Set a pointer to the list of material ids.
virtual void set_radius(mi::Float32 radius)=0
set the radius of the path
virtual const mi::Float32 * get_radii() const =0
Get the pointer to the array of radii per point.
virtual mi::Uint32 get_nb_points() const =0
Get the number of path points.
Interface class representing the styles that can be applied to a path.
Definition: ipath.h:30
virtual void set_color_source(Color_source source)=0
Set the color source.
Interpolation
Available interpolation techniques.
Definition: ipath.h:60
Color_source
Available color sources.
Definition: ipath.h:82
virtual void set_interpolation(Interpolation technique)=0
Set the interpolation technique.Look for 'interpolation' enum for details.
virtual void get_upsampling(bool &enable, mi::Uint32 &up_factor, mi::Float32 &tension) const =0
Get the current upsampling state.
virtual Interpolation get_interpolation() const =0
Get the interpolation technique.
virtual Color_source get_color_source() const =0
Get the color source.
virtual Cap_style get_cap_style() const =0
Get cap style.
virtual void set_upsampling(bool enable, mi::Uint32 up_factor=2, mi::Float32 tension=0.f)=0
Enable/Disable the upsampling of the path.
virtual void set_cap_style(Cap_style cap_style)=0
Set the cap style.
Cap_style
caps style
Definition: ipath.h:34
@ CAP_STYLE_FLAT
flat caps (default).
Definition: ipath.h:38
@ CAP_STYLE_NONE
No caps.
Definition: ipath.h:36
Base class representing attributes that can be defined in a scene description.
Base class declaring the functionality of higher-level shapes.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349