pslib
Class LateralForce

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

public class LateralForce
extends PSForce

LateralForce Class

The LateralForce object extends the PSForce class allowing a lateral force 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
LateralForce(float m)
          Create a static object instance with the specified values
LateralForce(float mi, float ma, int m, float c)
          Create a dynamic object instance with the specified values
LateralForce(PSVector a, float m)
          Create a static object instance with the specified values
LateralForce(PSVector a, 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

LateralForce

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

Parameters:
m - magnitude

LateralForce

public LateralForce(PSVector a,
                    float m)
Create a static object instance with the specified values

Parameters:
a - axis vector
m - magnitude

LateralForce

public LateralForce(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

LateralForce

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

Parameters:
a - axis vector
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