chickadee » hypergiant » add-emitter

(add-emitter PARENT PIPELINE [attributes: ATTRIBUTES] [n-particles: N-PARTICLES] [position: POSITION] [radius: RADIUS] . UNIFORM-ARGS)procedure

Add a new emitter to the node or scene PARENT, returning an emitter record. PIPELINE is the render-pipeline used to render the emitter.

ATTRIBUTES is a list of the kind that would be passed as the ATTRIBUTES argument in make-mesh, a list in the form:

   (NAME TYPE N [normalized: NORMALIZED])

where NAME is the attribute name (as a symbol), TYPE is the type of the attribute as accepted by type->gl, N is the number of elements in the attribute, NORMALIZED is a boolean value indicating whether the attribute’s values should be normalized (defaulting to #f).

These attributes correspond to the properties of each particle. All emitters are given the attribute (position #:float 3), so ATTRIBUTES is used to define any attributes beyond this default one.

N-PARTICLES is a required argument, which defines the maximum number of particles that the emitter may create. POSITION is used to define the initial position of the emitter, while RADIUS is used to define the radius of its bounding sphere. Unlike most nodes, the radius of the bounding sphere of an emitter cannot be meaningfully changed after it is created, so make sure to properly initialize it. As with add-node, UNIFORM-ARGS is the set of other keywords used to set the value for each uniform in the pipeline, as required by the glls renderable makers, specific to the PIPELINE that is used.