NVIDIA IndeX API nvidia_logo_transpbg.gif Up
iscene.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_ISCENE_H
8#define NVIDIA_INDEX_ISCENE_H
9
10#include <mi/dice.h>
11#include <mi/base/interface_declare.h>
12#include <mi/base/uuid.h>
13
14#include <nv/index/iattribute.h>
15#include <nv/index/icamera.h>
21#include <nv/index/ipipe_set.h>
24#include <nv/index/ishape.h>
28
29namespace nv
30{
31namespace index
32{
33
49class IScene :
50 public mi::base::Interface_declare<0xf28ba414,0x42dd,0x4836,0x9e,0xbc,0x0c,0x53,0x52,0xd9,0xf7,0x72,
51 nv::index::IScene_group>
52{
53public:
57
61 virtual void set_camera(mi::neuraylib::Tag_struct tag) = 0;
62
66 virtual mi::neuraylib::Tag_struct get_camera() const = 0;
67
74 const mi::math::Matrix_struct<mi::Float32, 4, 4>& transform_mat) = 0;
75
87 const mi::math::Vector_struct<mi::Float32, 3>& translation,
88 const mi::math::Matrix_struct<mi::Float32, 4, 4>& rotation,
89 const mi::math::Vector_struct<mi::Float32, 3>& scaling) = 0;
90
93 virtual mi::math::Matrix_struct<mi::Float32, 4, 4> get_transform_matrix() const = 0;
95
99
105 virtual ICamera* create_camera(const mi::base::Uuid& class_id) const = 0;
106
110 template<class T>
111 T* create_camera() const
112 {
113 return static_cast<T*>( create_camera(typename T::IID()) );
114 }
116
120
126 virtual IScene_group* create_scene_group(const mi::base::Uuid& class_id) const = 0;
127
131 template<class T>
133 {
134 return static_cast<T*>( create_scene_group(typename T::IID()) );
135 }
137
141
148 virtual IShape* create_shape(const mi::base::Uuid& class_id) const = 0;
149
154 template<class T>
155 T* create_shape() const
156 {
157 return static_cast<T*>( create_shape(typename T::IID()) );
158 }
160
164
169 virtual IAttribute* create_attribute(const mi::base::Uuid& class_id) const = 0;
170
174 template<class T>
176 {
177 return static_cast<T*>( create_attribute(typename T::IID()) );
178 }
180
184
199 const mi::math::Bbox_struct<mi::Float32, 3> & ijk_bbox,
200 const mi::Float32 max_mesh_edge_length,
202 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
203
215 const mi::math::Bbox_struct<mi::Float32, 3> & ijk_bbox,
216 const mi::math::Matrix_struct<mi::Float32, 4, 4>& transform_matrix,
218 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
219
233 const mi::math::Vector_struct<mi::Uint32, 3>& grid_dims,
234 const mi::math::Bbox_struct<mi::Float32, 3>& bbox,
235 const mi::math::Matrix_struct<mi::Float32, 4, 4>& transform_matrix,
237 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
238
250 const mi::math::Bbox_struct<mi::Float32, 3> & ijk_bbox,
251 const mi::math::Matrix_struct<mi::Float32, 4, 4>& transform_matrix,
253 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
254
266 const mi::math::Bbox_struct<mi::Float32, 3> & object_space_bbox,
267 const mi::math::Matrix_struct<mi::Float32, 4, 4>& transform_matrix,
269 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
270
281 const mi::math::Bbox_struct<mi::Float32, 3>& bbox,
283 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
284
308 const mi::math::Vector_struct<mi::Float32, 3>& scaling,
309 mi::Float32 rotation_k,
310 const mi::math::Vector_struct<mi::Float32, 3>& translation,
311 const mi::math::Vector_struct<mi::Uint32, 2>& grid_size,
312 const mi::math::Vector_struct<mi::Float32, 2>& k_range,
314 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
315
337 mi::Float32 default_height,
338 const mi::math::Vector_struct<mi::Float32, 3>& scaling,
339 mi::Float32 rotation_k,
340 const mi::math::Vector_struct<mi::Float32, 3>& translation,
341 const mi::math::Vector_struct<mi::Uint32, 2>& grid_size,
342 const mi::math::Vector_struct<mi::Float32, 2>& k_range,
343 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
344
364 const mi::math::Vector_struct<mi::Float32, 3>& scaling,
365 mi::Float32 rotation_k,
366 const mi::math::Vector_struct<mi::Float32, 3>& translation,
367 const mi::math::Vector_struct<mi::Uint32, 2>& grid_size,
368 const mi::math::Vector_struct<mi::Float32, 2>& k_range,
370 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
371
381 const mi::math::Bbox_struct<mi::Float32, 3> & ijk_bbox,
383 mi::neuraylib::IDice_transaction* dice_transaction) const = 0;
385
389
398 virtual void set_clipped_bounding_box(const mi::math::Bbox_struct<mi::Float32, 3>& bbox) = 0;
399
405 virtual mi::math::Bbox_struct<mi::Float32, 3> get_clipped_bounding_box() const = 0;
406
408};
409
410}} // namespace index / nv
411
412#endif // NVIDIA_INDEX_ISCENE_H
Attributes are a part of the scene description that provide a common mechanism for parameterized info...
Definition: iattribute.h:55
Abstract interface class representing a generic camera.
Definition: icamera.h:42
Scene element representing corner-point grids.
Definition: icorner_point_grid.h:22
Import callback mechanism for implementing distributed and parallel data loading from arbitrary sourc...
Definition: idistributed_data_import_callback.h:82
Interface for height field volume scene elements.
Definition: iheight_field_scene_element.h:28
Interface for irregular volume scene elements.
Definition: iirregular_volume_scene_element.h:27
Interface for particle volume scene elements.
Definition: iparticle_volume_scene_element.h:25
Pipe set.
Definition: ipipe_set.h:24
The abstract interface class representing a heightfield scene element.
Definition: iregular_heightfield.h:197
A scene group allows structuring a scene in a hierarchical form.
Definition: iscene_group.h:34
The abstract interface class representing the entire scene.
Definition: iscene.h:52
virtual IRegular_heightfield * create_regular_heightfield(const mi::math::Vector_struct< mi::Float32, 3 > &scaling, mi::Float32 rotation_k, const mi::math::Vector_struct< mi::Float32, 3 > &translation, const mi::math::Vector_struct< mi::Uint32, 2 > &grid_size, const mi::math::Vector_struct< mi::Float32, 2 > &k_range, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a new regular heightfield scene element from the given import configuration.
virtual void set_transform_matrix(const mi::math::Vector_struct< mi::Float32, 3 > &translation, const mi::math::Matrix_struct< mi::Float32, 4, 4 > &rotation, const mi::math::Vector_struct< mi::Float32, 3 > &scaling)=0
Sets the global scene transformation.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_clipped_bounding_box() const =0
Returns the bounding box that clips the space that contains the scene contents.
T * create_scene_group() const
Creates a new scene group of the given type, but does not yet add it to the scene description.
Definition: iscene.h:132
virtual ICorner_point_grid * create_corner_point_grid(const mi::math::Vector_struct< mi::Uint32, 3 > &grid_dims, const mi::math::Bbox_struct< mi::Float32, 3 > &bbox, const mi::math::Matrix_struct< mi::Float32, 4, 4 > &transform_matrix, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a new corner-point grid scene element from the given import configuration,...
virtual IVDB_scene_element * create_vdb_scene_element(const mi::math::Bbox_struct< mi::Float32, 3 > &object_space_bbox, const mi::math::Matrix_struct< mi::Float32, 4, 4 > &transform_matrix, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a new VDB scene element from the given import configuration, but does not yet add it to the s...
virtual void set_clipped_bounding_box(const mi::math::Bbox_struct< mi::Float32, 3 > &bbox)=0
Clipping the space in which the entire scene contents is positioned.
virtual ICamera * create_camera(const mi::base::Uuid &class_id) const =0
Creates a new camera of the given type, e.g.
T * create_camera() const
Creates a new camera of the given type.
Definition: iscene.h:111
T * create_shape() const
Creates a new shape of the given type, but does not yet add it to the scene description.
Definition: iscene.h:155
virtual IPipe_set * create_pipe_set(const mi::math::Bbox_struct< mi::Float32, 3 > &bbox, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a new pipe set scene element from the given import configuration, but does not yet add it to ...
virtual IScene_group * create_scene_group(const mi::base::Uuid &class_id) const =0
Creates a new scene group of the given type, but does not yet add it to the scene description.
virtual IHeight_field_scene_element * create_height_field(const mi::math::Vector_struct< mi::Float32, 3 > &scaling, mi::Float32 rotation_k, const mi::math::Vector_struct< mi::Float32, 3 > &translation, const mi::math::Vector_struct< mi::Uint32, 2 > &grid_size, const mi::math::Vector_struct< mi::Float32, 2 > &k_range, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a default height field scene element.
virtual void set_transform_matrix(const mi::math::Matrix_struct< mi::Float32, 4, 4 > &transform_mat)=0
Sets the global scene transformation matrix.
virtual mi::neuraylib::Tag_struct get_camera() const =0
Returns the camera associated with the scene.
virtual IRegular_heightfield * create_regular_heightfield(mi::Float32 default_height, const mi::math::Vector_struct< mi::Float32, 3 > &scaling, mi::Float32 rotation_k, const mi::math::Vector_struct< mi::Float32, 3 > &translation, const mi::math::Vector_struct< mi::Uint32, 2 > &grid_size, const mi::math::Vector_struct< mi::Float32, 2 > &k_range, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a default regular heightfield scene element.
virtual ITriangle_mesh_scene_element * create_triangle_mesh(const mi::math::Bbox_struct< mi::Float32, 3 > &ijk_bbox, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a new triangle mesh scene element from the given import configuration, but does not yet add i...
virtual void set_camera(mi::neuraylib::Tag_struct tag)=0
Sets the camera that defines the viewpoint of the scene.
virtual IAttribute * create_attribute(const mi::base::Uuid &class_id) const =0
Creates a new attribute of the given type, but does not yet add it to the scene description.
virtual IParticle_volume_scene_element * create_particle_volume(const mi::math::Bbox_struct< mi::Float32, 3 > &ijk_bbox, const mi::math::Matrix_struct< mi::Float32, 4, 4 > &transform_matrix, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a new particle volume scene element from the given import configuration, but does not yet add...
virtual mi::math::Matrix_struct< mi::Float32, 4, 4 > get_transform_matrix() const =0
Returns the global scene transformation matrix.
T * create_attribute() const
Creates a new attribute of the given type, but does not yet add it to the scene description.
Definition: iscene.h:175
virtual IShape * create_shape(const mi::base::Uuid &class_id) const =0
Creates a new shape of the given type, but does not yet add it to the scene description.
virtual ISparse_volume_scene_element * create_sparse_volume(const mi::math::Bbox_struct< mi::Float32, 3 > &ijk_bbox, const mi::math::Matrix_struct< mi::Float32, 4, 4 > &transform_matrix, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a new sparse volume scene element from the given import configuration, but does not yet add i...
virtual IIrregular_volume_scene_element * create_irregular_volume(const mi::math::Bbox_struct< mi::Float32, 3 > &ijk_bbox, const mi::Float32 max_mesh_edge_length, nv::index::IDistributed_data_import_callback *importer_callback, mi::neuraylib::IDice_transaction *dice_transaction) const =0
Creates a new irregular volume scene element from the given import configuration, but does not yet ad...
The base class of all shapes.
Definition: ishape.h:28
Interface for sparse volume scene elements.
Definition: isparse_volume_scene_element.h:25
Triangle mesh interface class that represents a large-scale triangle mesh in the scene description.
Definition: itriangle_mesh_scene_element.h:29
Interface for VDB scene elements.
Definition: ivdb_scene_element.h:25
Base class representing attributes that can be defined in a scene description.
Generic camera.
Scene element representing corner-point grids.
The interface class for implementing import callbacks used for distributed large-scale data chunk loa...
Interface for height field scene elements.
Scene element for irregular volumes.
Scene element for particle volumes.
Pipe set scene element.
Interface for regular heightfield scene elements.
Hierarchical scene description groups for structuring the scene.
Base class declaring the functionality of higher-level shapes.
Scene element for sparse volumes.
Scene element representing triangle meshes.
Scene element for VDB data.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349