Function _IrrAddParticleEmitter

au3Irr2

au3Irr2 Function Reference

_IrrAddParticleEmitter

Adds a particle emitter to a particle system.

#Include <au3Irrlicht2.au3>
_IrrAddParticleEmitter($h_ParticleSystem, $a_Settings)

 

Parameters

$h_ParticleSystem Handle of particle system the emitter shall be attached to.
$a_Settings Array with particle emitter settings created with __CreateParticleSettings.

 

Return Value

success: Handle of the created particle emitter
failure: False

 

Remarks

The emitter creates particles and controls how they move and when they are to be removed.

 

Related

_IrrAddParticleSystemToScene, __CreateParticleSettings

 

Example


#include "au3Irrlicht2.au3"

_IrrStart()

local $particleSystem = _IrrAddParticleSystemToScene($IRR_NO_EMITTER, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3, 6)

local $SmokeEmitter = __CreateParticleSettings( -7.0, 0, -7.0, 7.0, 1.0, 7.0, 0, 0.04, 0, 80, 100, _
                                                255, 255, 255, 255, 255, 255, _
                                                800, 2000, 15.0, 15.0, 15.0, 15.0, 15 )

_IrrAddParticleEmitter($particleSystem, $SmokeEmitter)

local $ParticleTexture = _IrrGetTexture( "./media/ParticleGrey.bmp" )
_IrrSetNodeMaterialTexture( $particleSystem, $ParticleTexture, 0 )
_IrrSetNodeMaterialFlag( $particleSystem, $IRR_EMF_LIGHTING, $IRR_OFF )
_IrrSetNodeMaterialType ( $particleSystem, $IRR_EMT_TRANSPARENT_ADD_COLOR )

local $nodeCamera = _IrrAddCamera( 80,0,0, 20,40,0 )

WHILE _IrrRunning()
    _IrrBeginScene( 0,0,50 )
    _IrrDrawScene()
    _IrrEndScene()
WEND

_IrrStop()