Interface to access result of ray sampling the scene's contents.
More...
#include <isampling_rays.h>
Inherits mi::base::Interface_declare< 0x1560b720, ... >.
Interface to access result of ray sampling the scene's contents.
◆ get_colors()
virtual bool nv::index::IRay_sampling_result::get_colors |
( |
const Sample_range & |
sample_range, |
|
|
mi::math::Color_struct * |
data |
|
) |
| const |
|
pure virtual |
Get sample color.
- Parameters
-
[in] | sample_range | Range of samples to access. |
[out] | data | Pointer to memory receiving sample data. |
- Returns
- true if sample range was valid.
◆ get_distances()
virtual bool nv::index::IRay_sampling_result::get_distances |
( |
const Sample_range & |
sample_range, |
|
|
mi::Float32 * |
data |
|
) |
| const |
|
pure virtual |
Get sample distance from the ray origin.
Samples are sorted by ascending distance.
- Parameters
-
[in] | sample_range | Range of samples to access. |
[out] | data | Pointer to memory receiving sample data. |
- Returns
- true if sample range was valid.
◆ get_element_indices()
virtual bool nv::index::IRay_sampling_result::get_element_indices |
( |
const Sample_range & |
sample_range, |
|
|
mi::Uint64 * |
data |
|
) |
| const |
|
pure virtual |
Get sample element index.
The meaning of the element index depends on the object type from which the sample was taken, e.g. for triangle meshes it is the triangle index.
- Parameters
-
[in] | sample_range | Range of samples to access. |
[out] | data | Pointer to memory receiving sample data. |
- Returns
- true if sample range was valid.
◆ get_flags()
virtual bool nv::index::IRay_sampling_result::get_flags |
( |
const Sample_range & |
sample_range, |
|
|
mi::Uint32 * |
data |
|
) |
| const |
|
pure virtual |
Get sample flags.
Flags tell if a sample was a surface front/back hit or inside a volume, and more.
- Parameters
-
[in] | sample_range | Range of samples to access. |
[out] | data | Pointer to memory receiving sample data. |
- Returns
- true if sample range was valid.
◆ get_nb_object_infos()
virtual mi::Uint32 nv::index::IRay_sampling_result::get_nb_object_infos |
( |
| ) |
const |
|
pure virtual |
Get number of object infos. Use this to enumerate all IRay_sampling_object_infos with get_object_info().
◆ get_nb_samples()
virtual mi::Uint32 nv::index::IRay_sampling_result::get_nb_samples |
( |
mi::Uint32 |
ray_index | ) |
const |
|
pure virtual |
Get the number of samples.
◆ get_object_ids()
virtual bool nv::index::IRay_sampling_result::get_object_ids |
( |
const Sample_range & |
sample_range, |
|
|
mi::Uint32 * |
data |
|
) |
| const |
|
pure virtual |
Get the object id.
The object id can be used to access detailed information about the scene object, from which the ray samples were taken.
- See also
- get_object_info().
- Note
- The object id is only unique and valid for one IRay_sampling_result.
- Parameters
-
[in] | sample_range | Range of samples to access. |
[out] | data | Pointer to memory receiving sample data. |
- Returns
- true if sample range was valid.
◆ get_object_info()
Access detailed information of a scene object.
- Parameters
-
- Returns
- Interface to object information, or 0 if the object id was not valid.
◆ get_performance_values()
virtual const IPerformance_values * nv::index::IRay_sampling_result::get_performance_values |
( |
| ) |
const |
|
pure virtual |
Returns an instance of the interface IPerformance_values
containing detailed performance information gathered during the sampling process.
◆ get_query()
Get the query associated with this result.
◆ get_user_value_masks()
virtual bool nv::index::IRay_sampling_result::get_user_value_masks |
( |
const Sample_range & |
sample_range, |
|
|
mi::Uint32 * |
data |
|
) |
| const |
|
pure virtual |
Get value mask.
The bits of a value mask tell if a user value was written in the CUDA sampling program. If the bit is 0, then the value at the value index is not valid.
- Parameters
-
[in] | sample_range | Range of samples to access. |
[out] | data | Pointer to memory receiving sample data. |
- Returns
- true if sample range was valid.
◆ get_user_values()
virtual bool nv::index::IRay_sampling_result::get_user_values |
( |
const Sample_range & |
sample_range, |
|
|
mi::Uint32 |
value_index, |
|
|
void * |
data |
|
) |
| const |
|
pure virtual |
Get user value.
A user value can be written in the CUDA sampling program. The value might be invalid, if no CUDA sampling program wrote to it. To check this, use get_user_value_masks().
- Parameters
-
[in] | sample_range | Range of samples to access. |
[in] | value_index | Index of user value, |
- See also
- get_limit(MAX_USER_VALUES).
- Parameters
-
[out] | data | Pointer to buffer to receive values. Must be sized according to the configured value size, |
- See also
- IRay_sampling_value_format.
- Returns
- true if sample range and value_index was valid.
◆ get_value_format()
Get the user value format definition associated with this result.
◆ is_valid()
virtual bool nv::index::IRay_sampling_result::is_valid |
( |
| ) |
const |
|
pure virtual |
Return true if sampling result is valid.
Note that the number of samples can still be 0.
The documentation for this class was generated from the following file: