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

Interface to define user values for ray sampling the scene's contents. More...

#include <isampling_rays.h>

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

Public Member Functions

virtual bool set_value_sizes (const mi::Uint32 *value_sizes, mi::Uint32 nb_values)=0
 Set number of user sample values and the byte size per value. More...
 
virtual mi::Uint32 get_nb_values () const =0
 Get the number of user values specified. More...
 
virtual mi::Uint32 get_value_size (mi::Uint32 i) const =0
 Get the byte size of user value. More...
 

Detailed Description

Interface to define user values for ray sampling the scene's contents.

User sample values are generated in the inquire() method of the CUDA sampling program. The IndeX library will provide device storage for all specified user values, and an interface to write user values in the CUDA sampling program.

A user value can be a struct (with a size up to IRay_sampling::get_limit(MAX_USER_VALUE_SIZE)), the members of the struct should be aligned (using padding) correctly to avoid kernel failures. For instance, the CUDA types float2 and float4 have to be aligned to 8 or 16 bytes respectively. The IndeX library will align all user value arrays to 16 bytes.

Member Function Documentation

 get_nb_values()

virtual mi::Uint32 nv::index::IRay_sampling_value_format::get_nb_values ( ) const
pure virtual

Get the number of user values specified.

 get_value_size()

virtual mi::Uint32 nv::index::IRay_sampling_value_format::get_value_size ( mi::Uint32  i) const
pure virtual

Get the byte size of user value.

Parameters
i

 set_value_sizes()

virtual bool nv::index::IRay_sampling_value_format::set_value_sizes ( const mi::Uint32 *  value_sizes,
mi::Uint32  nb_values 
)
pure virtual

Set number of user sample values and the byte size per value.

Parameters
[in]value_sizesSize of user sample values (in bytes) for nb_values,
See also
get_limit(MAX_USER_VALUES).
Parameters
[in]nb_valuesNumber of user sample values,
See also
get_limit(MAX_USER_VALUE_SIZE).
Returns
false if number of user values is too large or if any of the value sizes is invalid.

The documentation for this class was generated from the following file: