Iray SDK API nvidia_logo_transpbg.gif Up
iparticles.h
Go to the documentation of this file.
1//*****************************************************************************
2// Copyright 2025 NVIDIA Corporation. All rights reserved.
3//*****************************************************************************
6//*****************************************************************************
7
8#ifndef MI_NEURAYLIB_IPARTICLES_H
9#define MI_NEURAYLIB_IPARTICLES_H
10
15#include <mi/neuraylib/version.h> // for MI_NEURAYLIB_DEPRECATED_ENUM_VALUE
16
17namespace mi {
18
19namespace neuraylib {
20
27{
29 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(PARTICLE_TYPE_FORCE_32_BIT, 0xffffffffU)
30};
31
35 public base::Interface_declare<0xd48750cf,0x179d,0x4487,0xb5,0xf8,0xac,0x8b,0x29,0x48,0xd1,0xc,
36 neuraylib::IScene_element>
37{
38public:
39
41
42
47 virtual void set_type( Particle_type particle_type) = 0;
48
50 virtual Particle_type get_type() const = 0;
51
53 virtual Size get_particles_size() const = 0;
54
58
60 virtual void reserve( Size n) = 0;
61
63
65
81 virtual Sint32 set_data( const Float32* data, Size n) = 0;
82
84 virtual const Float32* get_data() const = 0;
85
98 virtual Sint32 add_particle( const Float32* data) = 0;
99
114 virtual Sint32 set_particle( Size index, const Float32* data) = 0;
115
118 virtual const Float32* get_particle( Size index) const = 0;
119
121
123
129 virtual bool has_attribute( Mesh_attribute_name name) const = 0;
130
143 Mesh_attribute_name name, Uint32 dim = 1) = 0;
144
151
163
179 IAttribute_vector* attribute_vector) = 0;
180
189
191
193
195 virtual Bbox3_struct get_bbox() const = 0;
196
202 const Float64_4_4_struct& transformation_matrix) const = 0;
203
205};
206 // end group mi_neuray_leaf_nodes
208
209} // namespace neuraylib
210
211} // namespace mi
212
213#endif // MI_NEURAYLIB_IPARTICLES_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Interface representing an attribute vector for triangle meshes, polygon meshes, and subdivision surfa...
Definition: iattribute_vector.h:176
Interface representing a collection of particles.
Definition: iparticles.h:37
virtual Sint32 add_particle(const Float32 *data)=0
Adds a particle.
virtual Sint32 remove_attribute_vector(Mesh_attribute_name name)=0
Removes a particle object attribute.
virtual Size get_particles_size() const =0
Returns the number of particles.
virtual IAttribute_vector * create_attribute_vector(Mesh_attribute_name name, Uint32 dim=1)=0
Creates a particle object attribute.
virtual const Float32 * get_particle(Size index) const =0
Returns the data of the particle at index or nullptr if the object is empty or index is out of bounds...
virtual bool has_attribute(Mesh_attribute_name name) const =0
Indicates whether the particle object has a particular attribute.
virtual const IAttribute_vector * access_attribute_vector(Mesh_attribute_name name) const =0
Returns a particle object attribute.
virtual Particle_type get_type() const =0
Returns the particle type.
virtual IAttribute_vector * edit_attribute_vector(Mesh_attribute_name name)=0
Detaches and returns a particle object attribute.
virtual void reserve(Size n)=0
Reserves space for n particles.
virtual Sint32 set_data(const Float32 *data, Size n)=0
Sets the data for the whole particle object.
virtual Bbox3_struct get_tight_bbox(const Float64_4_4_struct &transformation_matrix) const =0
Returns the bounding box of the particle object after transformation.
virtual Sint32 attach_attribute_vector(IAttribute_vector *attribute_vector)=0
Attaches an attribute to the particle object.
virtual Bbox3_struct get_bbox() const =0
Returns the bounding box of the particle object.
virtual const Float32 * get_data() const =0
Returns the data of this particle object or nullptr if the object is empty.
virtual void set_type(Particle_type particle_type)=0
Sets the particle type.
virtual Uint32 get_particles_element_size() const =0
Returns the number of floats that define a particle of the current particle type.
virtual Sint32 set_particle(Size index, const Float32 *data)=0
Sets a particle.
int Sint32
32-bit signed integer.
Definition: types.h:46
float Float32
32-bit float.
Definition: types.h:51
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Particle_type
Different particle types of mi::neuraylib::IParticles.
Definition: iparticles.h:27
Mesh_attribute_name
Symbolic constants for mesh attributes.
Definition: iattribute_vector.h:61
@ PARTICLE_TYPE_SPHERE
Sphere.
Definition: iparticles.h:28
Attribute vectors, used for triangle and polygon meshes.
Simple integer-based handles used by mesh interfaces.
Base class for all scene elements.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179
Major and minor version number and an optional qualifier.
Storage class for an axis-aligned N-dimensional bounding box class template of fixed dimension.
Definition: bbox.h:47
Storage class for a NxM-dimensional matrix class template of fixed dimensions.
Definition: matrix.h:90
Typedefs for types from the math API.