pslib
Class FlickerBehaviour

java.lang.Object
  extended by pslib.FlickerBehaviour
All Implemented Interfaces:
PSBehaviour

public class FlickerBehaviour
extends java.lang.Object
implements PSBehaviour

FlickerBehaviour Class

The FlickerBehaviour object performs brownian deviation upon the size and alpha components of the particle to which it is applied. Size and alpha deviation may be linked or operate independently.

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.


Constructor Summary
FlickerBehaviour(float ami, float ama, float ast, float smi, float sma, float sst)
          Create a new object instance
 
Method Summary
 void link(boolean b)
          Set alpha and size deviation link
 void setAlpha(float mi, float ma, float s)
          Set the alpha modulation variables
 void setSize(float mi, float ma, float s)
          Set the size modulation variables
 void update(DynamicParticle p)
          Update the specified particle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlickerBehaviour

public FlickerBehaviour(float ami,
                        float ama,
                        float ast,
                        float smi,
                        float sma,
                        float sst)
Create a new object instance

Parameters:
ami - alpha minimum
ama - alpha maximum
ast - alpha step
smi - size minimum
sma - size maximum
sst - size step
Method Detail

update

public void update(DynamicParticle p)
Update the specified particle

Specified by:
update in interface PSBehaviour
Parameters:
p - particle

setAlpha

public final void setAlpha(float mi,
                           float ma,
                           float s)
Set the alpha modulation variables

Parameters:
mi - minimum
ma - maximum
s - step

setSize

public final void setSize(float mi,
                          float ma,
                          float s)
Set the size modulation variables

Parameters:
mi - minimum
ma - maximum
s - step

link

public final void link(boolean b)
Set alpha and size deviation link

Default: true

Parameters:
b - link