NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::IRay_sampling_result Class Referenceabstract

Interface to access result of ray sampling the scene's contents. More...

#include <isampling_rays.h>

Inherits mi::base::Interface_declare< 0x1560b720, ... >.

Classes

struct  Sample_range
 Selector for a range of samples of a certain ray. More...
 

Public Member Functions

virtual const IRay_sampling_queryget_query () const =0
 Get the query associated with this result. More...
 
virtual const IRay_sampling_value_formatget_value_format () const =0
 Get the user value format definition associated with this result. More...
 
virtual bool is_valid () const =0
 Return true if sampling result is valid. More...
 
virtual mi::Uint32 get_nb_samples (mi::Uint32 ray_index) const =0
 Get the number of samples. More...
 
virtual const IRay_sampling_object_infoget_object_info (mi::Uint32 object_id) const =0
 Access detailed information of a scene object. More...
 
virtual mi::Uint32 get_nb_object_infos () const =0
 Get number of object infos. Use this to enumerate all IRay_sampling_object_infos with get_object_info(). More...
 
virtual const IPerformance_valuesget_performance_values () const =0
 Returns an instance of the interface IPerformance_values containing detailed performance information gathered during the sampling process. More...
 
Getting per sample data
virtual bool get_distances (const Sample_range &sample_range, mi::Float32 *data) const =0
 Get sample distance from the ray origin. More...
 
virtual bool get_colors (const Sample_range &sample_range, mi::math::Color_struct *data) const =0
 Get sample color. More...
 
virtual bool get_flags (const Sample_range &sample_range, mi::Uint32 *data) const =0
 Get sample flags. More...
 
virtual bool get_element_indices (const Sample_range &sample_range, mi::Uint64 *data) const =0
 Get sample element index. More...
 
virtual bool get_user_values (const Sample_range &sample_range, mi::Uint32 value_index, void *data) const =0
 Get user value. More...
 
virtual bool get_user_value_masks (const Sample_range &sample_range, mi::Uint32 *data) const =0
 Get value mask. More...
 
virtual bool get_object_ids (const Sample_range &sample_range, mi::Uint32 *data) const =0
 Get the object id. More...
 

Detailed Description

Interface to access result of ray sampling the scene's contents.

Member Function Documentation

 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_rangeRange of samples to access.
[out]dataPointer 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_rangeRange of samples to access.
[out]dataPointer 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_rangeRange of samples to access.
[out]dataPointer 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_rangeRange of samples to access.
[out]dataPointer 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_rangeRange of samples to access.
[out]dataPointer to memory receiving sample data.
Returns
true if sample range was valid.

 get_object_info()

virtual const IRay_sampling_object_info * nv::index::IRay_sampling_result::get_object_info ( mi::Uint32  object_id) const
pure virtual

Access detailed information of a scene object.

Parameters
object_idOne of the object ids returned from get_object_ids().
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()

virtual const IRay_sampling_query * nv::index::IRay_sampling_result::get_query ( ) const
pure virtual

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_rangeRange of samples to access.
[out]dataPointer 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_rangeRange of samples to access.
[in]value_indexIndex of user value,
See also
get_limit(MAX_USER_VALUES).
Parameters
[out]dataPointer 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()

virtual const IRay_sampling_value_format * nv::index::IRay_sampling_result::get_value_format ( ) const
pure virtual

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: