pslib
Class BrownianForce

java.lang.Object
  extended by pslib.PSForce
      extended by pslib.BrownianForce
All Implemented Interfaces:
PSBehaviour, PSConstants

public class BrownianForce
extends PSForce

BrownianForce Class

The BrownianForce object extends the PSForce class allowing brownian motion to be applied to a DynamicParticle object. Force magnitude is calculated based on the specified minimum and maximum values, decay curve and decay mode.

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/.


Field Summary
 
Fields inherited from interface pslib.PSConstants
CAM2D_LOOK, CAM2D_RIGHT, CAM2D_UP, CORNER, INVERSE, INVERSE_TRIANGULAR, LEADING, LINEAR, MIDPOINT, NONE, STATIC, TRAILING, TRIANGULAR
 
Constructor Summary
BrownianForce(float m)
          Create a static object instance with the specified values
BrownianForce(float mi, float ma, int m, float c)
          Create a dynamic object instance with the specified values
 
Method Summary
 void update(DynamicParticle p)
          Update the specified particle
 
Methods inherited from class pslib.PSForce
getDimensionScalars, getMagnitude, getScale, setCurve, setDimensionScalars, setScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrownianForce

public BrownianForce(float m)
Create a static object instance with the specified values

Parameters:
m - magnitude

BrownianForce

public BrownianForce(float mi,
                     float ma,
                     int m,
                     float c)
Create a dynamic object instance with the specified values

Parameters:
mi - minimum magnitude
ma - maximum magnitude
m - decay mode
c - decay curve exponent
Method Detail

update

public void update(DynamicParticle p)
Update the specified particle

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