NVIDIA IndeX API nvidia_logo_transpbg.gif Up
iregular_heightfield.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_REGULAR_HEIGHTFIELD_H
8#define NVIDIA_INDEX_REGULAR_HEIGHTFIELD_H
9
10#include <mi/dice.h>
11#include <mi/base/interface_declare.h>
12#include <mi/math/color.h>
13
14#include <nv/index/iattribute.h>
16
17namespace nv {
18
19namespace index {
20
29 public mi::base::Interface_declare<0xc1529d11,0x1fa2,0x47b0,0x95,0xa2,0x76,0x1f,0x44,0xc5,0xaf,0x1c,
30 nv::index::IAttribute>
31{
32public:
35 {
47 TYPE_ALL = 0xFF,
48 };
49
52 {
63 };
64
67 {
82 };
83
90 virtual void set_type_mask(mi::Uint32 type_mask) = 0;
91
94 virtual mi::Uint32 get_type_mask() const = 0;
95
98 virtual void set_visible(bool visible) = 0;
99
102 virtual bool get_visible() const = 0;
103
107 virtual void set_color(const mi::math::Color_struct& color) = 0;
108
111 virtual const mi::math::Color_struct& get_color() const = 0;
112
115 virtual void set_color_mode(Color_mode color_mode) = 0;
116
119 virtual Color_mode get_color_mode() const = 0;
120
124 virtual void set_render_mode(Render_mode render_mode) = 0;
125
128 virtual Render_mode get_render_mode() const = 0;
129
140 virtual void set_geometry_size(mi::Float32 size) = 0;
141
144 virtual mi::Float32 get_geometry_size() const = 0;
145
155 const mi::math::Vector_struct<mi::Float32, 2>& distances) = 0;
156
160 virtual const mi::math::Vector_struct<mi::Float32, 2>& get_opacity_ramp_distances() const = 0;
161
165 virtual void set_render_offset(mi::Float32 offset) = 0;
166
170 virtual mi::Float32 get_render_offset() const = 0;
171};
172
195 public mi::base::Interface_declare<0x7a8db268,0x1c5b,0x4579,0xa4,0x42,0x0d,0x5f,0xb5,0xaa,0x9d,0x5b,
196 nv::index::IDistributed_data>
197{
198public:
205 virtual void set_name(const char* name) = 0;
206
209 virtual const char* get_name() const = 0;
210
214 virtual mi::math::Matrix_struct<mi::Float32, 4, 4> get_transform() const = 0;
215
219 virtual mi::neuraylib::Tag_struct get_import_strategy() const = 0;
220
224
228 const mi::math::Bbox_struct<mi::Float32, 3>& bbox) = 0;
229
233 virtual mi::math::Bbox_struct<mi::Float32, 3> get_IJK_bounding_box() const = 0;
234
239 const mi::math::Bbox_struct<mi::Float32, 3>& ijk_roi_bbox) = 0;
240
244 virtual mi::math::Bbox_struct<mi::Float32, 3> get_IJK_region_of_interest() const = 0;
245
251 virtual mi::math::Bbox_struct<mi::Float32, 3> get_XYZ_clipped_bounding_box() const = 0;
253
257
261 virtual void set_colormap_mapping(bool enable) = 0;
262
266 virtual bool get_colormap_mapping() const = 0;
267
271 virtual void assign_colormap(mi::neuraylib::Tag_struct tag) = 0;
272
276 virtual mi::neuraylib::Tag_struct assigned_colormap() const = 0;
278
282
295 virtual void add_seed_points(
296 mi::math::Vector_struct<mi::Float32, 3>* points,
297 mi::Uint32 nb_points) = 0;
298
303 virtual mi::Uint32 get_nb_seed_points() const = 0;
304
311 virtual void get_seed_point(
312 mi::Uint32 index,
313 mi::math::Vector_struct<mi::Float32, 3>& seed_point) const = 0;
314
320 virtual void remove_seed_point(
321 mi::Uint32 index) = 0;
322
330 virtual void add_isolated_pick(
331 const mi::math::Vector_struct<mi::Float32, 2>& ij_coordinate,
332 mi::Float32 elevation) = 0;
333
347 virtual void add_seed_line(
348 mi::math::Vector_struct<mi::Float32, 3>* vertices,
349 mi::Uint32 nb_vertices) = 0;
350
355 virtual mi::Uint32 get_nb_seed_lines() const = 0;
356
368 virtual mi::math::Vector_struct<mi::Float32, 3>* get_seed_line(
369 mi::Uint32 index,
370 mi::Uint32& nb_vertices) const = 0;
371
377 virtual void remove_seed_line(
378 mi::Uint32 index) = 0;
379
381};
382
383}} // namespace index / nv
384
385#endif // NVIDIA_INDEX_REGULAR_HEIGHTFIELD_H
Scene attribute to control the rendering of embedded heightfield geometry.
Definition: iregular_heightfield.h:31
virtual const mi::math::Color_struct & get_color() const =0
Returns the fixed color used for rendering.
virtual void set_opacity_ramp_distances(const mi::math::Vector_struct< mi::Float32, 2 > &distances)=0
Controls how geometry far away from the camera should be faded out.
virtual void set_render_mode(Render_mode render_mode)=0
Sets the rendering mode for embedded geometry.
virtual void set_color(const mi::math::Color_struct &color)=0
Sets the fixed color used for rendering.
virtual void set_type_mask(mi::Uint32 type_mask)=0
Controls which types of embedded geometry this attribute should apply to.
virtual void set_visible(bool visible)=0
Controls whether the selected types of geometry should be shown.
virtual mi::Float32 get_geometry_size() const =0
Returns the size of the geometry elements.
Geometry_type
Types of geometry to which this attribute should apply.
Definition: iregular_heightfield.h:35
@ TYPE_SEED_POINTS
User-defined points.
Definition: iregular_heightfield.h:43
@ TYPE_ALL
Apply to all geometry types.
Definition: iregular_heightfield.h:47
@ TYPE_NONE
Attribute will be ignored.
Definition: iregular_heightfield.h:37
@ TYPE_ISOLATED_POINTS
Isolated points.
Definition: iregular_heightfield.h:39
@ TYPE_CONNECTING_LINES
Connecting lines.
Definition: iregular_heightfield.h:41
@ TYPE_SEED_LINES
User-defined lines.
Definition: iregular_heightfield.h:45
virtual const mi::math::Vector_struct< mi::Float32, 2 > & get_opacity_ramp_distances() const =0
Returns the parameters of how geometry far away from the camera should be faded out.
virtual Color_mode get_color_mode() const =0
Returns the color mode for embedded geometry.
virtual Render_mode get_render_mode() const =0
Returns the rendering mode for embedded geometry.
virtual bool get_visible() const =0
Controls whether the selected types of geometry should be shown.
virtual mi::Float32 get_render_offset() const =0
Returns the offset between the geometry and the heightfield used in the RENDER_Z_AXIS_ALIGNED mode.
virtual void set_color_mode(Color_mode color_mode)=0
Sets the color mode for embedded geometry.
Render_mode
How the geometry should be rendered.
Definition: iregular_heightfield.h:67
@ RENDER_Z_AXIS_ALIGNED
Render points as discs and lines as quads, with the normal aligned to the z-axis.
Definition: iregular_heightfield.h:72
@ RENDER_NONE
Do not render the geometry.
Definition: iregular_heightfield.h:81
@ RENDER_RASTERIZED
Render rasterized points and lines.
Definition: iregular_heightfield.h:78
@ RENDER_DEFAULT
Use the default rendering mode of each geometry type.
Definition: iregular_heightfield.h:69
@ RENDER_SCREEN_ALIGNED
Render points as discs and lines as quads, with the normal aligned to to screen, i....
Definition: iregular_heightfield.h:75
virtual void set_render_offset(mi::Float32 offset)=0
Controls the offset that is added to the geometry in the RENDER_Z_AXIS_ALIGNED mode,...
virtual mi::Uint32 get_type_mask() const =0
Returns which types of embedded geometry this attribute should apply to.
virtual void set_geometry_size(mi::Float32 size)=0
Controls the size of the geometry elements.
Color_mode
Which colors should be mapped onto the geometry.
Definition: iregular_heightfield.h:52
@ MODE_FIXED
Use the fixed color specified by set_color()
Definition: iregular_heightfield.h:54
@ MODE_MATERIAL
Apply the heightfield material and multiply the result with the fixed color.
Definition: iregular_heightfield.h:56
@ MODE_COMPUTED_TEXTURE
Sample the active computed heightfield texture at the position of each geometry object and multiply t...
Definition: iregular_heightfield.h:62
@ MODE_VOLUME_TEXTURE
Sample the active volume at the position of each geometry object and multiply the result with the fix...
Definition: iregular_heightfield.h:59
The abstract interface class representing a heightfield scene element.
Definition: iregular_heightfield.h:197
virtual mi::Uint32 get_nb_seed_lines() const =0
Returns the number of seed lines currently stored.
virtual mi::Uint32 get_nb_seed_points() const =0
Returns the number of seed points currently stored.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_XYZ_clipped_bounding_box() const =0
Returns the XYZ (global) bounding box clipped against the region of interest.
virtual bool get_colormap_mapping() const =0
Returns the volume color mapping mode for the heightfield.
virtual const char * get_name() const =0
Returns the user-defined name of the scene element.
virtual mi::math::Vector_struct< mi::Float32, 3 > * get_seed_line(mi::Uint32 index, mi::Uint32 &nb_vertices) const =0
Each seed line is an array of vertices.
virtual void add_seed_points(mi::math::Vector_struct< mi::Float32, 3 > *points, mi::Uint32 nb_points)=0
Sets coordinates of point geometry to be rendered together with this heightfield as seed points.
virtual void remove_seed_point(mi::Uint32 index)=0
Removes the seed point with the given index.
virtual mi::math::Matrix_struct< mi::Float32, 4, 4 > get_transform() const =0
Returns the transformation matrix of the scene element.
virtual void set_name(const char *name)=0
Sets the user-defined name of the scene element.
virtual void set_IJK_region_of_interest(const mi::math::Bbox_struct< mi::Float32, 3 > &ijk_roi_bbox)=0
Sets the region of interest of the heightfield in IJK (local) coordinates.
virtual void add_isolated_pick(const mi::math::Vector_struct< mi::Float32, 2 > &ij_coordinate, mi::Float32 elevation)=0
Adds a isolated pick to the set of seed points.
virtual void set_IJK_bounding_box(const mi::math::Bbox_struct< mi::Float32, 3 > &bbox)=0
Sets the IJK (local) bounding box of the entire (unclipped) heightfield.
virtual void assign_colormap(mi::neuraylib::Tag_struct tag)=0
Sets the colormap for the heightfield volume color mapping.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_IJK_bounding_box() const =0
Returns the IJK (local) bounding box of the entire (unclipped) heightfield.
virtual void get_seed_point(mi::Uint32 index, mi::math::Vector_struct< mi::Float32, 3 > &seed_point) const =0
Returns the seed point with the given index.
virtual void add_seed_line(mi::math::Vector_struct< mi::Float32, 3 > *vertices, mi::Uint32 nb_vertices)=0
Sets line geometry to be rendered together with this heightfield as seed lines.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_IJK_region_of_interest() const =0
Returns the region of interest of the heightfield in IJK (local) coordinates.
virtual void set_colormap_mapping(bool enable)=0
Sets volume color mapping mode for the heightfield.
virtual void remove_seed_line(mi::Uint32 index)=0
Removes the seed line with the given index.
virtual mi::neuraylib::Tag_struct get_import_strategy() const =0
Returns the tag of the import strategy that is used for loading the dataset.
virtual mi::neuraylib::Tag_struct assigned_colormap() const =0
Returns the colormap for the heightfield volume color mapping.
Base class representing attributes that can be defined in a scene description.
Interface class representing NVIDIA IndeX's distributed datasets.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349