Emitter(发射器)#

class genesis.engine.entities.emitter.Emitter(max_particles)[源代码]#

基类:RBC

set_entity(entity)[源代码]#
reset()[源代码]#
emit(droplet_shape, droplet_size, droplet_length=None, pos=(0.5, 0.5, 1.0), direction=(0, 0, -1), theta=0.0, speed=1.0, p_size=None)[源代码]#
emit_omni(source_radius=0.1, pos=(0.5, 0.5, 1.0), speed=1.0, particle_size=None)[源代码]#

Use a sphere-shaped source to emit particles in all directions.

Parameters:#

source_radius: float, optional

The radius of the sphere source. Particles will be emitted from a shell with inner radius using 0.8 * source_radius and outer radius using source_radius.

pos: array_like, shape=(3,)

The center of the sphere source.

speed: float

The speed of the emitted particles.

particle_size: float | None

The size (diameter) of the emitted particles. The actual number of particles emitted is determined by the volume of the sphere source and the size of the particles. If None, the solver’s particle size is used. Note that this particle size only affects computation for number of particles emitted, not the actual size of the particles in simulation and rendering.

property uid#
property entity#
property max_particles#
property solver#
property next_particle#