Function __CreateParticleSettings

au3Irr2

au3Irr2 Function Reference

__CreateParticleSettings

Helper function: Creates particle settings as required from _IrrAddParticleEmitter.

#Include <au3Irrlicht2.au3>
__CreateParticleSettings($minBoxX, $minBoxY, $minBoxZ, $maxBoxX, $maxBoxY, $maxBoxZ, $directionX, $directionY, $directionZ, $minParticlesSecond, $maxParticlesSecond, $minStartColorR, $minStartColorG, $minStartColorB, $maxStartColorR, $maxStartColorG, $maxStartColorB, $minLifetime, $maxLifetime, $minStartSizeX, $minStartSizeY, $maxStartSizeX, $maxStartSizeY, $maxAngleDegrees)

 

Parameters

$minBoxX, $minBoxY, $minBoxZ Minimal positions of a a box in space inside which the position of a particle is randomly created.
$maxBoxX, $maxBoxY, $maxBoxZ Maximal positions of a a box in space inside which the position of a particle is randomly created.
$directionX, $directionY, $directionZ Define a direction into which the particles will be ejected as the animation plays.
$minParticlesSecond, $maxParticlesSecond A range defining the minimum and maximum number of particles that will be created each second.
$minStartColorR, $minStartColorG, $minStartColorB, $maxStartColorR, $maxStartColorG, $maxStartColorB Although particles can be textured by texturing the particle system node, these can be used to apply a range that tints the color of the particles.
$minLifetime, $maxLifetime How long the partilce will live, long lifespans can create very large numbers of particles.
$minStartSizeX, $minStartSizeY, $maxStartSizeX, $maxStartSizeY The minimum and maximum start sizes for the particles.
$maxAngleDegrees The maximum number of degrees that the ejected particles will deviate from the defined direction.

 

Return Value

None.

 

Remarks

None

 

Related

_IrrAddParticleSystemToScene, _IrrAddParticleEmitter

 

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()