Distributed data storage class for particle volume subsets hosted on a GPU device. More...
#include <iparticle_volume_subset.h>
Inherits mi::base::Interface_declare< 0x7259b57b, ... >.
Classes | |
struct | Geometry_parameters |
Parameters of particle geometry. More... | |
struct | Particle_size_parameters |
Parameters of particle size. More... | |
Public Types | |
enum | Particle_radii_format { PVOL_radii_none , PVOL_radii_f32 } |
Data format of particle radii. More... | |
enum | Particle_normals_format { PVOL_normals_none , PVOL_normals_f32_3 , PVOL_normals_compressed_1_32 } |
Data format of particle normals. More... | |
enum | Particle_storage_format { PVOL_geometry_storage_separate , PVOL_geometry_storage_combined , PVOL_geometry_storage_interleaved } |
Organization of particle geometry buffers for positions, radii and normals. More... | |
enum | Particle_geometry_buffer { PVOL_buffer_base , PVOL_buffer_positions , PVOL_buffer_radii , PVOL_buffer_normals } |
Public Member Functions | |
virtual Geometry_parameters | get_geometry_parameters () const =0 |
Get parameters of particle geometry. More... | |
virtual Particle_size_parameters | get_particle_size_parameters () const =0 |
Get parameters of particle size. More... | |
virtual bool | set_particle_size_parameters (const Particle_size_parameters ¶ms)=0 |
Change parameters of particle size. More... | |
virtual void * | get_geometry_storage (Particle_geometry_buffer buffer_selector)=0 |
Get current geometry device buffer. More... | |
virtual bool | resize_storage (const Geometry_parameters ¶ms)=0 |
Resize internal geometry/attribute storage using Geometry_parameters . More... | |
virtual bool | adopt_geometry_storage (const Geometry_parameters ¶ms, void *const geometry_device_buffers[], mi::Size const byte_sizes_of_buffers[], mi::Uint32 nb_buffers)=0 |
Adopt external geometry storage using Geometry_parameters . More... | |
virtual bool | get_attribute_formats (mi::Uint32 *formats, mi::Uint32 nb_formats) const =0 |
Get particle attribute formats. More... | |
virtual bool | set_attribute_formats (const mi::Uint32 *formats, mi::Uint32 nb_formats)=0 |
Set particle attribute formats. More... | |
virtual void * | get_attribute_storage (mi::Uint32 attrib_index)=0 |
Get current attribute device buffer for given attribute index. More... | |
virtual bool | adopt_attribute_storage (mi::Uint32 attrib_index, void *attribute_storage, mi::Size byte_size_of_storage)=0 |
Adopt external attribute device buffer for given attribute index. More... | |
virtual bool | is_internal_geometry_storage () const =0 |
Get location of geometry storage. More... | |
virtual bool | is_internal_attribute_storage () const =0 |
Get location of attribute storage. More... | |
virtual void | get_geometry_storage_byte_size (mi::Size storage_sizes[], mi::Uint32 nb_storage_sizes) const =0 |
Get size in bytes of geometry storage. More... | |
virtual mi::Size | get_attribute_storage_byte_size (mi::Uint32 attrib_index) const =0 |
Get size in bytes of attribute storage. More... | |
Distributed data storage class for particle volume subsets hosted on a GPU device.
Data access for device particle data associated with IParticle_volume_scene_element
instances is performed through implementations of this interface.
Data format of particle normals.
Organization of particle geometry buffers for positions, radii and normals.
|
pure virtual |
Adopt external attribute device buffer for given attribute index.
If internal attribute storage exists, it will be released. The attribute set is fixed at creation time. It is defined in IParticle_volume_attribute_set_descriptor
(
attrib_index | The storage index of the attribute set. |
attribute_storage | Pointer to device buffer of attribute set. |
byte_size_of_storage | Byte size of device buffer, allowed to be larger than required size. |
|
pure virtual |
Adopt external geometry storage using Geometry_parameters
.
If internal geometry storage exists, it will be released. If parameters specify zero particles, then storage references will be reset.
params | Parameters of geometry storage, including number of particles. |
geometry_device_buffers | Pointer to array of device pointers for geometry data, in order If storage is interleaved or combined, then one pointer is expected (PVOL_buffer_base ). if storage is separate, then the array of device pointers should have three elements [positions, radii, normals]. |
byte_sizes_of_buffers | Pointer to array of buffer sizes in bytes ( |
nb_buffers | Number of buffers. |
|
pure virtual |
Get particle attribute formats.
formats | Buffer to receive format codes ( |
Distributed_data_attribute_format
) nb_formats | Size of buffer formats . |
|
pure virtual |
Get current attribute device buffer for given attribute index.
The attribute set is fixed at creation time. It is defined in IParticle_volume_attribute_set_descriptor
(
attrib_index | The storage index of the attribute set. |
nullptr
if attribute index is invalid.
|
pure virtual |
Get size in bytes of attribute storage.
attrib_index | The storage index of the attribute set. |
|
pure virtual |
Get parameters of particle geometry.
|
pure virtual |
Get current geometry device buffer.
Elements of selected buffer are consecutive for format PVOL_geometry_storage_separate
and PVOL_geometry_storage_combined
. Elements have a stride in format PVOL_geometry_storage_interleaved
(
buffer_selector | Buffer selector. Use PVOL_buffer_base for interleaved or combined storage format. |
NULL
, if no storage.
|
pure virtual |
Get size in bytes of geometry storage.
[out] | storage_sizes | Pointer to array of sizes. If separate geometry buffers, one element for positions, radii, normals. |
nb_storage_sizes | Number of sizes to write to storage_sizes . |
|
pure virtual |
Get parameters of particle size.
|
pure virtual |
Get location of attribute storage.
true
if internal attribute storage, false
if external storage or no storage
|
pure virtual |
Get location of geometry storage.
true
if internal geometry storage, false
if external storage or no storage
|
pure virtual |
Resize internal geometry/attribute storage using Geometry_parameters
.
If parameters specify zero particles, then free all internal device storage. If external storage is referenced, then storage references will be reset. All particle geometry data will be reset and needs to be updated.
It might fail to change the storage format, an implementation might not support all formats. It might fail to change the data format for components (position, radii, normals).
params | Parameters of geometry storage, including number of particles. |
|
pure virtual |
Set particle attribute formats.
Changing the format of an attribute invalidates attribute storage. Using nb_formats == 0 will clear all attributes.
formats | Buffer of format codes ( |
Distributed_data_attribute_format
) nb_formats | Size of buffer formats . |
|
pure virtual |
Change parameters of particle size.
params | New parameters of particle geometry. |