Distributed data storage class for particle volume subsets.
More...
#include <iparticle_volume_subset.h>
Inherits mi::base::Interface_declare< 0x7694224f, ... >.
Distributed data storage class for particle volume subsets.
Data access (e.g., import, editing) for particle volume data associated with IParticle_volume_scene_element
instances is performed through instances of this subset class. A subset of a particle volume is defined by all particles intersecting a rectangular subregion of the entire scene/dataset. This interface class provides methods to input volume data for one or multiple attributes of a dataset.
◆ generate_volume_storage()
virtual bool nv::index::IParticle_volume_subset::generate_volume_storage |
( |
mi::Size |
nb_subset_particles, |
|
|
mi::Float32 |
fixed_particle_radius = -1.0f , |
|
|
bool |
enable_particle_normals = false |
|
) |
| |
|
pure virtual |
Generate the subsets particle volume data storage.
This function initializes the internal storage buffers of this subset to the appropriate sizes according to the number of particles expected in the subset. Multiple calls to this function will invalidate previous internal buffers and new buffers are initialized according the newly declared number of particles.
- Note
- When initializing the internal storage with a fixed radius for all particles in the volume there will be no particle radii storage generated and
get_radii_buffer()
will always return a nullptr.
- Parameters
-
[in] | nb_subset_particles | The number of particles in this subset instance. |
[in] | fixed_particle_radius | The fixed particle radius to be used for the volume subset. A value less than or equal to 0.0f indicates the use of individual particle radii. |
[in] | enable_particle_normals | If true, then storage for particle normals is created. |
- Returns
- True if a storage generation succeeded, false otherwise.
◆ get_attribute_buffer()
virtual void * nv::index::IParticle_volume_subset::get_attribute_buffer |
( |
mi::Uint32 |
attrib_index | ) |
const |
|
pure virtual |
Get a particle attributes buffer.
After successfully generating the subsets volume data storage a valid pointer to the particle attributes buffer according to the requested attribute index is returned. If a prior call to generate_volume_storage
failed or an invalid attribute index is specified nullptr is returned.
- Parameters
-
[in] | attrib_index | The storage index of the requested attribute set. |
- Returns
- Pointer to the internal attribute set buffer.
◆ get_attribute_set_descriptor()
Returns the attribute-set descriptor of the subset.
◆ get_device_subset()
Access the device particle volume subset for direct access to device resources.
- Returns
- Device subset interface for direct access of device resources. May return
NULL
if data is not on a GPU device.
◆ get_fixed_radius()
virtual mi::Float32 nv::index::IParticle_volume_subset::get_fixed_radius |
( |
| ) |
const |
|
pure virtual |
Get the fixed radius set for the particle volume.
If the subset storage was generated using a fixed radius this function will return that value. Otherwise it will return a value less than or equal to 0.0f;
- Returns
- Fixed radius set for the particle volume.
◆ get_normals_buffer()
virtual mi::math::Vector_struct< mi::Float32, 3 > * nv::index::IParticle_volume_subset::get_normals_buffer |
( |
| ) |
const |
|
pure virtual |
Get the particle normals buffer.
After successfully generating the subsets volume data storage a valid pointer to the particle normals buffer is returned. If a prior generate_volume_storage
call failed nullptr is returned.
- Returns
- Pointer to the internal normals buffer.
◆ get_number_of_particles()
virtual mi::Size nv::index::IParticle_volume_subset::get_number_of_particles |
( |
| ) |
const |
|
pure virtual |
Returns the number of particles in the current subset.
- Returns
- The number of particles in the current subset
◆ get_positions_buffer()
virtual mi::math::Vector_struct< mi::Float32, 3 > * nv::index::IParticle_volume_subset::get_positions_buffer |
( |
| ) |
const |
|
pure virtual |
Get the particle positions buffer.
After successfully generating the subsets volume data storage a valid pointer to the particle positions buffer is returned. If a prior generate_volume_storage
call failed nullptr is returned.
- Returns
- Pointer to the internal positions buffer.
◆ get_radii_buffer()
virtual mi::Float32 * nv::index::IParticle_volume_subset::get_radii_buffer |
( |
| ) |
const |
|
pure virtual |
Get the particle radii buffer.
After successfully generating the subsets volume data storage a valid pointer to the particle radii buffer is returned. If a prior generate_volume_storage
call failed nullptr is returned.
- Note
- If the storage was initialized with a fixed radius for all particles in the volume this function will always return nullptr;
- Returns
- Pointer to the internal radii buffer.
The documentation for this class was generated from the following file: