@@ -85,8 +85,8 @@ void addVolumeParticleEmitter2(py::module& m) {
8585 if (kwargs.contains (" spacing" )) {
8686 spacing = kwargs[" spacing" ].cast <double >();
8787 }
88- if (kwargs.contains (" initialVel " )) {
89- initialVel = objectToVector2D (kwargs[" initialVel " ]);
88+ if (kwargs.contains (" initialVelocity " )) {
89+ initialVel = objectToVector2D (kwargs[" initialVelocity " ]);
9090 }
9191 if (kwargs.contains (" maxNumberOfParticles" )) {
9292 maxNumberOfParticles =
@@ -119,6 +119,36 @@ void addVolumeParticleEmitter2(py::module& m) {
119119 (optional), whether it's one shot or not (optional), whether it
120120 should allow overlapping or not (optional), and random seed
121121 (optional).
122+ )pbdoc" )
123+ .def_property (" jitter" , &VolumeParticleEmitter2::jitter,
124+ &VolumeParticleEmitter2::setJitter, R"pbdoc(
125+ Jitter amount between 0 and 1.
126+ )pbdoc" )
127+ .def_property (" isOneShot" , &VolumeParticleEmitter2::isOneShot,
128+ &VolumeParticleEmitter2::setIsOneShot, R"pbdoc(
129+ True if particles should be emitted just once.
130+ )pbdoc" )
131+ .def_property (" allowOverlapping" ,
132+ &VolumeParticleEmitter2::allowOverlapping,
133+ &VolumeParticleEmitter2::setAllowOverlapping, R"pbdoc(
134+ True if particles can be overlapped.
135+ )pbdoc" )
136+ .def_property (
137+ " allowOverlapping" , &VolumeParticleEmitter2::maxNumberOfParticles,
138+ &VolumeParticleEmitter2::setMaxNumberOfParticles, R"pbdoc(
139+ Max number of particles to be emitted.
140+ )pbdoc" )
141+ .def_property (" spacing" , &VolumeParticleEmitter2::spacing,
142+ &VolumeParticleEmitter2::setSpacing, R"pbdoc(
143+ The spacing between particles.
144+ )pbdoc" )
145+ .def_property (
146+ " initialVelocity" , &VolumeParticleEmitter2::initialVelocity,
147+ [](VolumeParticleEmitter2& instance, py::object newInitialVel) {
148+ instance.setInitialVelocity (objectToVector2D (newInitialVel));
149+ },
150+ R"pbdoc(
151+ The initial velocity of the particles.
122152 )pbdoc" );
123153}
124154
@@ -192,8 +222,8 @@ void addVolumeParticleEmitter3(py::module& m) {
192222 if (kwargs.contains (" spacing" )) {
193223 spacing = kwargs[" spacing" ].cast <double >();
194224 }
195- if (kwargs.contains (" initialVel " )) {
196- initialVel = objectToVector3D (kwargs[" initialVel " ]);
225+ if (kwargs.contains (" initialVelocity " )) {
226+ initialVel = objectToVector3D (kwargs[" initialVelocity " ]);
197227 }
198228 if (kwargs.contains (" maxNumberOfParticles" )) {
199229 maxNumberOfParticles =
@@ -226,5 +256,35 @@ void addVolumeParticleEmitter3(py::module& m) {
226256 (optional), whether it's one shot or not (optional), whether it
227257 should allow overlapping or not (optional), and random seed
228258 (optional).
259+ )pbdoc" )
260+ .def_property (" jitter" , &VolumeParticleEmitter3::jitter,
261+ &VolumeParticleEmitter3::setJitter, R"pbdoc(
262+ Jitter amount between 0 and 1.
263+ )pbdoc" )
264+ .def_property (" isOneShot" , &VolumeParticleEmitter3::isOneShot,
265+ &VolumeParticleEmitter3::setIsOneShot, R"pbdoc(
266+ True if particles should be emitted just once.
267+ )pbdoc" )
268+ .def_property (" allowOverlapping" ,
269+ &VolumeParticleEmitter3::allowOverlapping,
270+ &VolumeParticleEmitter3::setAllowOverlapping, R"pbdoc(
271+ True if particles can be overlapped.
272+ )pbdoc" )
273+ .def_property (
274+ " allowOverlapping" , &VolumeParticleEmitter3::maxNumberOfParticles,
275+ &VolumeParticleEmitter3::setMaxNumberOfParticles, R"pbdoc(
276+ Max number of particles to be emitted.
277+ )pbdoc" )
278+ .def_property (" spacing" , &VolumeParticleEmitter3::spacing,
279+ &VolumeParticleEmitter3::setSpacing, R"pbdoc(
280+ The spacing between particles.
281+ )pbdoc" )
282+ .def_property (
283+ " initialVelocity" , &VolumeParticleEmitter3::initialVelocity,
284+ [](VolumeParticleEmitter3& instance, py::object newInitialVel) {
285+ instance.setInitialVelocity (objectToVector3D (newInitialVel));
286+ },
287+ R"pbdoc(
288+ The initial velocity of the particles.
229289 )pbdoc" );
230290}
0 commit comments