org.crwth.systems.systems1d
Class SimplePhysics1d
java.lang.Object
|
+--java.lang.Thread
|
+--org.crwth.systems.Physics
|
+--org.crwth.systems.systems1d.SimplePhysics1d
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- BetterPhysics2d, SimplePhysics2d
- public class SimplePhysics1d
- extends Physics
|
Field Summary |
protected double |
friction
|
protected double |
G
|
protected Space |
s
|
|
Method Summary |
void |
applyForce(Mass mass)
Calculates the force applied on the Mass by all other Masses and
Springs in the Space, and adds that force to the Mass. |
protected void |
exertMasses(Mass mass)
|
protected void |
exertSprings()
|
void |
run()
|
void |
setSpace(Space space)
Sets the Space object this object will act upon. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
s
protected Space s
G
protected final double G
- See Also:
- Constant Field Values
friction
protected final double friction
- See Also:
- Constant Field Values
SimplePhysics1d
public SimplePhysics1d()
SimplePhysics1d
public SimplePhysics1d(Space space)
setSpace
public void setSpace(Space space)
- Description copied from class:
Physics
- Sets the Space object this object will act upon.
- Specified by:
setSpace in class Physics
- Parameters:
space - the Space object
exertMasses
protected void exertMasses(Mass mass)
throws WrongDimensionException
WrongDimensionException
exertSprings
protected void exertSprings()
throws WrongDimensionException
WrongDimensionException
applyForce
public void applyForce(Mass mass)
- Description copied from class:
Physics
- Calculates the force applied on the Mass by all other Masses and
Springs in the Space, and adds that force to the Mass.
- Specified by:
applyForce in class Physics
- Parameters:
mass - the Mass object to exert force upon.
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread