Interface class that returns the result of a pick operation. More...
#include <iscene_query_results.h>
Inherits mi::base::Interface_declare< 0x0e201838, ... >.
Public Member Functions | |
virtual mi::base::Uuid | get_intersection_info_class () const =0 |
Represents the interface class of the intersection info result. More... | |
virtual mi::neuraylib::Tag_struct | get_scene_element () const =0 |
Returns the intersected scene element's tag. More... | |
virtual mi::Sint32 | get_scene_element_sub_index () const =0 |
Returns the sub index that specifies which of the sub elements was hit, if any. More... | |
virtual const IData_sample * | get_data_sample () const =0 |
The hit point of the ray with the scene element may be associated with a regular volume sample value. More... | |
virtual const mi::math::Color_struct & | get_color () const =0 |
The hit point of the ray with the scene element may be associated with a color value. More... | |
virtual const mi::math::Vector_struct< mi::Float32, 3 > & | get_intersection () const =0 |
Returns the intersection between the scene element and the ray. More... | |
virtual mi::Float32 | get_distance () const =0 |
Returns the distance of the intersection from the camera position. More... | |
virtual const mi::math::Matrix_struct< mi::Float32, 4, 4 > & | get_transform () const =0 |
Returns the transformation matrix of the intersected scene element. More... | |
virtual const IScene_path * | get_scene_path () const =0 |
Returns the scene path from the scene root to the intersected scene element. More... | |
Interface class that returns the result of a pick operation.
The interface class represents a single scene query result generated by a mouse over operation (a.k.a. 'pick' operation), i.e., by a ray starting from the scene's camera position cast through the scene.
Each query result gives information about the scene element hit by the ray. This information includes, for instance, the scene element's tag
to clearly identify it and the intersection point in the scene element's IJK space.
|
pure virtual |
The hit point of the ray with the scene element may be associated with a color value.
For instance, a heightfield surface is typically rendered using a solid color that will be returned. In case of a slice scene element the ray-slice intersection determines a color value based on the voxel value and the colormap associated to the slice.
|
pure virtual |
The hit point of the ray with the scene element may be associated with a regular volume sample value.
For instance, a plane may visualize the voxel data values that the plane passes through. The ray-plane intersection then determines the regular voxel value of the dataset at the very position. Similarly, the data value of a heightfield surface that is textured based on the data values of an associated regular volume can also be determined.
IData_volume_sample
instance representing, for example, a regular volume sample value related to the ray-element intersection. If the intersection is not related to any data value, then the returned pointer is 0.
|
pure virtual |
Returns the distance of the intersection from the camera position.
The distance from the camera's eye position to the intersection between the scene element and the cast ray.
|
pure virtual |
Returns the intersection between the scene element and the ray.
The intersection between the scene element and the ray cast from the camera through the scene is given as a 3D point in the IJK space of the scene element.
|
pure virtual |
Represents the interface class of the intersection info result.
Typically, an intersection result including its intersection information are highly dependent on the intersected shape class. For instance, intersecting (1) a line segments part of a set of line segments should return the index that that line segment in the line set, or intersecting (2) a triangular mesh should expose not only the index of the intersected triangle but also the adjacent vertices and possibly the according per-vertex attributes. The intersection result interfaces class IScene_pick_result
provides just very basic intersection information such as the tag
of the intersected shape, the intersection point in local space, and distance from the camera position in world space. Additional shape-specific intersection information are supposed to be provided derived (interface) classes. The UUID returned by get_intersection_info_class
provides the application with the necessary interface class id required for proper casting the general intersection information interface class to the shape-specific intersection information interface class if additional shape-specific details for the intersection are required.
|
pure virtual |
Returns the intersected scene element's tag.
Each scene element is clearly defined by its unique tag. Thus, the tag returned by the query result unambiguously defines which scene element has been hit by the cast ray.
|
pure virtual |
Returns the sub index that specifies which of the sub elements was hit, if any.
Some scene elements such as point geometry consist of multiple sub elements (i.e. individual points).
IPoint_set_pick_result
.
|
pure virtual |
Returns the scene path from the scene root to the intersected scene element.
mi::base::Handle
template to store the returned interface pointer in order to guarantee the correct destruction of the returned interface.
|
pure virtual |
Returns the transformation matrix of the intersected scene element.
This is the transformation that needs to be applied to the intersection point (as returned by get_intersection()
) to transform from IJK to XYZ space.