NVIDIA IndeX API nvidia_logo_transpbg.gif Up
isubdivision.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright 2023 NVIDIA Corporation. All rights reserved.
3*****************************************************************************/
6
7#ifndef NVIDIA_INDEX_ISUBDIVISION_H
8#define NVIDIA_INDEX_ISUBDIVISION_H
9
10#include <mi/math/bbox.h>
11#include <mi/neuraylib/dice.h>
12
13namespace nv {
14namespace index {
15
18 public mi::base::Interface_declare<0x470b9032,0x21f5,0x4f4f,0xa7,0xae,0xb8,0xe9,0x48,0xae,0x86,0x50,
19 mi::neuraylib::ISerializable>
20{
21public:
23 virtual mi::Uint32 get_nb_subregions() const = 0;
24
27 virtual mi::math::Bbox_struct<mi::Float32, 3> get_subregion(mi::Uint32 index) const = 0;
28
29 // Type of subregion-id will change to Subregion_identifier, when it was converted to 64 bit.
30 // A value of 0 represent an invalid id.
31 typedef mi::Uint64 Subregion_id;
32 //typedef Subregion_identifier Subregion_id; // \see idistributed_data_locality.h
33
38 virtual Subregion_id get_subregion_id(mi::Uint32 index) const = 0;
39
49 virtual mi::Float64 get_subregion_weight(mi::Uint32 index) const = 0;
50};
51
58 public mi::base::Interface_declare<0x1fb9897d,0x1f7a,0x4f47,0xb0,0xea,0xbd,0x2b,0x68,0x67,0x4f,0xd7,
59 nv::index::ISubdivision>
60{
61public:
64 {
67 };
68
70 virtual mi::Uint32 get_topology_type() const = 0;
71
74 virtual mi::Uint32 get_nb_nodes() const = 0;
75
79 virtual mi::math::Bbox_struct<mi::Float32, 3> get_node_box(mi::Uint32 inode) const = 0;
80
86 virtual mi::Uint32 get_node_child_count(mi::Uint32 inode) const = 0;
87
91 virtual mi::Sint32 get_node_child(mi::Uint32 inode, mi::Uint32 ichild) const = 0;
92
96 virtual mi::Sint32 get_node_subregion_index(mi::Uint32 inode) const = 0;
97};
98
99}} // namespace nv::index
100
101#endif
Subdivision with topology information.
Definition: isubdivision.h:60
virtual mi::Uint32 get_nb_nodes() const =0
Get the total number of nodes of the topology.
virtual mi::Sint32 get_node_child(mi::Uint32 inode, mi::Uint32 ichild) const =0
Get a child index of the node inode.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_node_box(mi::Uint32 inode) const =0
Get the bounding box of the node inode.
Topology_type
Subdivision schemes can rely on different topologies.
Definition: isubdivision.h:64
@ TOPO_OCTREE
! Octree-based topology.
Definition: isubdivision.h:66
@ TOPO_KD_TREE
! Kd-tree based topology.
Definition: isubdivision.h:65
virtual mi::Uint32 get_topology_type() const =0
Get type of topology,.
virtual mi::Sint32 get_node_subregion_index(mi::Uint32 inode) const =0
Get index of subregion associated with node inode (or -1, if no subregion).
virtual mi::Uint32 get_node_child_count(mi::Uint32 inode) const =0
Get the number of children of node inode.
Spatial subdivision.
Definition: isubdivision.h:20
virtual mi::Uint32 get_nb_subregions() const =0
Provides the number of spatial regions that span the spatial decomposition scheme.
virtual Subregion_id get_subregion_id(mi::Uint32 index) const =0
Returns identifier of subregion with given index.
virtual mi::Float64 get_subregion_weight(mi::Uint32 index) const =0
Returns weight of subregion with given index.
virtual mi::math::Bbox_struct< mi::Float32, 3 > get_subregion(mi::Uint32 index) const =0
Returns bounding box of subregion with given index.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349