pslib
Class LinearForce
java.lang.Object
pslib.PSForce
pslib.LinearForce
- All Implemented Interfaces:
- PSBehaviour, PSConstants
public class LinearForce
- extends PSForce
LinearForce Class
The LinearForce object extends the PSForce class allowing a linear force vector
to be applied to a DynamicParticle object. The force 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/.
Fields inherited from interface pslib.PSConstants |
CAM2D_LOOK, CAM2D_RIGHT, CAM2D_UP, CORNER, INVERSE, INVERSE_TRIANGULAR, LEADING, LINEAR, MIDPOINT, NONE, STATIC, TRAILING, TRIANGULAR |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearForce
public LinearForce(PSVector v,
float m)
LinearForce
public LinearForce(PSVector v,
float mi,
float ma,
int m,
float c)
- Create a new object instance with the specified values
- Parameters:
v
- force vectormi
- minimum magnitudema
- maximum magnitudem
- decay modec
- decay curve exponent
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