pslib
Class MotionBehaviour

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

public class MotionBehaviour
extends java.lang.Object
implements PSBehaviour

MotionBehaviour Class

The MotionBehaviour object implements the PSBehaviour interface to apply the particle velocity to the particle position on each call to update().

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
MotionBehaviour()
           
 
Method Summary
 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

MotionBehaviour

public MotionBehaviour()
Method Detail

update

public void update(DynamicParticle p)
Update the specified particle

The update process preserves the particle position vector reference and re-applies the vector to ensure compatibility with BufferedParticle objects

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