NVIDIA IndeX API nvidia_logo_transpbg.gif Up
itriangle_mesh_query_results.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_ITRIANGLE_MESH_QUERY_RESULTS_H
8#define NVIDIA_INDEX_ITRIANGLE_MESH_QUERY_RESULTS_H
9
10#include <mi/base/interface_declare.h>
11#include <mi/dice.h>
12
14
15namespace nv
16{
17namespace index
18{
19
27 public mi::base::Interface_declare<0xe2697b96,0xdd49,0x4506,0x81,0x57,0x40,0x31,0x96,0x43,0x0e,0x2f,
28 nv::index::IScene_pick_result>
29{
30public:
38 virtual mi::Uint64 get_triangle_index() const = 0;
39
45 virtual mi::Uint32 get_local_triangle_index() const = 0;
46
51 virtual mi::math::Vector_struct<mi::Float32, 3> get_normal() const = 0;
52
58 virtual mi::math::Color_struct get_color_value() const = 0;
59
66 virtual mi::math::Color_struct get_colormap_value() const = 0;
67
73 virtual mi::math::Vector_struct<mi::Float32, 3> get_barycentric_coordinates() const = 0;
74};
75
76
87 public mi::base::Interface_declare<0xd91ca5a9,0x8222,0x42ec,0xab,0x44,0x65,0xd1,0x72,0xad,0x0b,0x71,
88 nv::index::IScene_lookup_result>
89{
90public:
98 virtual void get_vertices(
99 mi::math::Vector_struct<mi::Float32, 3>& v0,
100 mi::math::Vector_struct<mi::Float32, 3>& v1,
101 mi::math::Vector_struct<mi::Float32, 3>& v2) const = 0;
102
110 virtual void get_normals(
111 mi::math::Vector_struct<mi::Float32, 3>& n0,
112 mi::math::Vector_struct<mi::Float32, 3>& n1,
113 mi::math::Vector_struct<mi::Float32, 3>& n2) const = 0;
114
122 virtual void get_color_indices(
123 mi::Uint32& c0,
124 mi::Uint32& c1,
125 mi::Uint32& c2) const = 0;
126
134 virtual void get_colors(
135 mi::math::Color_struct& c0,
136 mi::math::Color_struct& c1,
137 mi::math::Color_struct& c2) const = 0;
138
147 mi::math::Vector_struct<mi::Float32, 2>& st0,
148 mi::math::Vector_struct<mi::Float32, 2>& st1,
149 mi::math::Vector_struct<mi::Float32, 2>& st2) const = 0;
150};
151
152}} // namespace index / nv
153
154#endif // NVIDIA_INDEX_ITRIANGLE_MESH_QUERY_RESULTS_H
Interface class that returns the triangle mesh specific result of a query operation.
Definition: itriangle_mesh_query_results.h:89
virtual void get_color_indices(mi::Uint32 &c0, mi::Uint32 &c1, mi::Uint32 &c2) const =0
A color index can be defined for each vertex of the triangle of a triangle.
virtual void get_vertices(mi::math::Vector_struct< mi::Float32, 3 > &v0, mi::math::Vector_struct< mi::Float32, 3 > &v1, mi::math::Vector_struct< mi::Float32, 3 > &v2) const =0
Each triangle of a triangle mesh is defined by 3 vertices with their locations defined in the triangl...
virtual void get_normals(mi::math::Vector_struct< mi::Float32, 3 > &n0, mi::math::Vector_struct< mi::Float32, 3 > &n1, mi::math::Vector_struct< mi::Float32, 3 > &n2) const =0
A normal can be defined for each vertex of the triangle of a triangle.
virtual void get_colors(mi::math::Color_struct &c0, mi::math::Color_struct &c1, mi::math::Color_struct &c2) const =0
A color can be defined for each vertex of the triangle of a triangle.
virtual void get_texture_coordinates(mi::math::Vector_struct< mi::Float32, 2 > &st0, mi::math::Vector_struct< mi::Float32, 2 > &st1, mi::math::Vector_struct< mi::Float32, 2 > &st2) const =0
A texture coordinate can be defined for each vertex of the triangle of a triangle.
Interface class that returns the triangle mesh specific result of a pick operation/query.
Definition: itriangle_mesh_query_results.h:29
virtual mi::Uint64 get_triangle_index() const =0
Returns triangle index of the hit triangle.
virtual mi::math::Color_struct get_colormap_value() const =0
Returns the average colormap color value at the pick location or transparent black if not colormap no...
virtual mi::math::Vector_struct< mi::Float32, 3 > get_barycentric_coordinates() const =0
Returns the barycentric coordinate at the pick location.
virtual mi::math::Vector_struct< mi::Float32, 3 > get_normal() const =0
Returns the averaged normal at the pick position.
virtual mi::Uint32 get_local_triangle_index() const =0
Returns the local triangle index; the local index refers to the triangle order on the machine where t...
virtual mi::math::Color_struct get_color_value() const =0
Returns the average per-vertex color at the pick location or transparent black if not per-vertex colo...
Results exposed by the NVIDIA IndeX library when querying a scene's contents.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349