Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.eside.flingbox.physics
Class ScenePhysics

    java.lang.Object
      edu.eside.flingbox.physics.ScenePhysics

All Implemented Interfaces:
  java.lang.Runnable

    public class ScenePhysics

extends java.lang.Object
implements java.lang.Runnable

Stores all physic object in scene and make those interact. ScenePhysics manage thread for update objects

Field Summary
`GravitySource` | `mGravity`

Constructor Summary
`ScenePhysics(GravitySource gravity)` Initializes an empty scene

Method Summary
`void` | `add(PhysicBody body)` Adds physical object
`boolean` | `isSimulating()`
`boolean` | `remove(PhysicBody body)`
`void` | `run()` Thread for simulation
`void` | `startSimulation()` Starts simulation
`void` | `stopSimulation()` Sends message to kill and waits

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### mGravity

    public GravitySource mGravity

Constructor Detail

### ScenePhysics

    public ScenePhysics(GravitySource gravity)

  Initializes an empty scene

Method Detail

### add

    public void add(PhysicBody body)

  Adds physical object

  Parameters:
    `object` - object to be added

### remove

    public boolean remove(PhysicBody body)

### startSimulation

    public void startSimulation()

  Starts simulation

### stopSimulation

    public void stopSimulation()

  Sends message to kill and waits

### isSimulating

    public boolean isSimulating()

  Returns:
    true if simulating

### run

    public void run()

  Thread for simulation

  Specified by:
    `run` in interface `java.lang.Runnable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD