Iray SDK API nvidia_logo_transpbg.gif Up
iparticles.h
Go to the documentation of this file.
1//*****************************************************************************
2// Copyright 2024 NVIDIA Corporation. All rights reserved.
3//*****************************************************************************
6//*****************************************************************************
7
8#ifndef MI_NEURAYLIB_IPARTICLES_H
9#define MI_NEURAYLIB_IPARTICLES_H
10
15
16namespace mi {
17
18namespace neuraylib {
19
26{
28 PARTICLE_TYPE_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only.
29};
30
31
32mi_static_assert( sizeof( Particle_type) == sizeof( Uint32));
33
34
38 public base::Interface_declare<0xd48750cf,0x179d,0x4487,0xb5,0xf8,0xac,0x8b,0x29,0x48,0xd1,0xc,
39 neuraylib::IScene_element>
40{
41public:
42
44
45
50 virtual void set_type( Particle_type particle_type) = 0;
51
53 virtual Particle_type get_type() const = 0;
54
56 virtual Size get_particles_size() const = 0;
57
61
63 virtual void reserve( Size n) = 0;
64
66
68
84 virtual Sint32 set_data( const Float32* data, Size n) = 0;
85
87 virtual const Float32* get_data() const = 0;
88
101 virtual Sint32 add_particle( const Float32* data) = 0;
102
117 virtual Sint32 set_particle( Size index, const Float32* data) = 0;
118
121 virtual const Float32* get_particle( Size index) const = 0;
122
124
126
132 virtual bool has_attribute( Mesh_attribute_name name) const = 0;
133
146 Mesh_attribute_name name, Uint32 dim = 1) = 0;
147
154
166
182 IAttribute_vector* attribute_vector) = 0;
183
192
194
196
198 virtual Bbox3_struct get_bbox() const = 0;
199
205 const Float64_4_4_struct& transformation_matrix) const = 0;
206
208};
209 // end group mi_neuray_leaf_nodes
211
212} // namespace neuraylib
213
214} // namespace mi
215
216#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:184
Interface representing a collection of particles.
Definition: iparticles.h:40
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 NULL 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 NULL 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.
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:65
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
float Float32
32-bit float.
Definition: types.h:51
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mesh_attribute_name
Symbolic constants for mesh attributes.
Definition: iattribute_vector.h:60
Particle_type
Different particle types of mi::neuraylib::IParticles.
Definition: iparticles.h:26
@ PARTICLE_TYPE_SPHERE
Sphere.
Definition: iparticles.h:27
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
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.