|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpslib.PSForce
public abstract class PSForce
PSForce Class
The PSForce class is an abstract class for the creation of particle forces. Objects that extend this class can be used with the RadialEmitter object to modify the DynamicParticle trajectories.
The PSForce class implements the PSBehaviour interface, allowing sub-classes of PSForce to be used within the behavioural update loop of DynamicParticle objects.
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 | |
---|---|
PSForce(float m)
Create a new object instance with the specified magnitude |
|
PSForce(float mi,
float ma,
int m,
float c)
Create a new object instance with the specified values |
Method Summary | |
---|---|
PSVector |
getDimensionScalars()
Return the dimension scalar vector |
protected PSVector |
getMagnitude(DynamicParticle p)
Return the force magnitude vector for the specified particle |
float |
getScale()
Return the force scalar |
void |
setCurve(float e)
Set the curve exponent |
void |
setDimensionScalars(PSVector d)
Set the dimension scalar vector |
void |
setScale(float s)
Set the force scalar |
abstract 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 |
---|
public PSForce(float m)
m
- magnitudepublic PSForce(float mi, float ma, int m, float c)
mi
- minimum magnitudema
- maximum magnitudem
- envelope modec
- curve exponentMethod Detail |
---|
public final void setScale(float s)
s
- scalarpublic final float getScale()
public final void setCurve(float e)
e
- exponentpublic final void setDimensionScalars(PSVector d)
d
- dimension scalar vectorpublic final PSVector getDimensionScalars()
protected final PSVector getMagnitude(DynamicParticle p)
p
- particle
public abstract void update(DynamicParticle p)
update
in interface PSBehaviour
p
- particle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |