public class Gravity extends java.lang.Object implements IMultiplicityApp, IMultiTouchEventListener, UniverseChangeDelegate
Modifier and Type | Field and Description |
---|---|
static double |
MASS_EARTH
The Constant MASS_EARTH.
|
static double |
MASS_SUN
The Constant MASS_SUN.
|
Constructor and Description |
---|
Gravity() |
Modifier and Type | Method and Description |
---|---|
void |
bodyAdded(Body b)
Body added.
|
void |
bodyPositionChanged(Body body)
Body position changed.
|
void |
bodyRemoved(Body b)
Body removed.
|
void |
cursorChanged(MultiTouchCursorEvent event)
Cursor is on the table, and moves, or rotates, or changes in some way.
|
void |
cursorClicked(MultiTouchCursorEvent event)
Cursor clicked.
|
void |
cursorPressed(MultiTouchCursorEvent event)
Cursor press arriving on the table.
|
void |
cursorReleased(MultiTouchCursorEvent event)
Cursor left the table.
|
java.lang.String |
getFriendlyAppName()
Gets the friendly app name.
|
static void |
main(java.lang.String[] args)
The main method.
|
void |
objectAdded(MultiTouchObjectEvent event)
Object/fiducial is added to the table.
|
void |
objectChanged(MultiTouchObjectEvent event)
Object/fiducial is changed - position or rotation.
|
void |
objectRemoved(MultiTouchObjectEvent event)
Object/fiducial is removed from the table.
|
void |
onDestroy()
On destroy.
|
void |
shouldStart(MultiTouchInputComponent input,
IQueueOwner iqo)
Should start.
|
void |
shouldStop()
Should stop.
|
public static final double MASS_EARTH
public static final double MASS_SUN
public static void main(java.lang.String[] args)
args
- the argumentspublic void bodyAdded(Body b)
UniverseChangeDelegate
bodyAdded
in interface UniverseChangeDelegate
b
- the bpublic void bodyPositionChanged(Body body)
UniverseChangeDelegate
bodyPositionChanged
in interface UniverseChangeDelegate
body
- the bodypublic void bodyRemoved(Body b)
UniverseChangeDelegate
bodyRemoved
in interface UniverseChangeDelegate
b
- the bpublic void cursorChanged(MultiTouchCursorEvent event)
IMultiTouchEventListener
cursorChanged
in interface IMultiTouchEventListener
public void cursorClicked(MultiTouchCursorEvent event)
IMultiTouchEventListener
cursorClicked
in interface IMultiTouchEventListener
public void cursorPressed(MultiTouchCursorEvent event)
IMultiTouchEventListener
cursorPressed
in interface IMultiTouchEventListener
public void cursorReleased(MultiTouchCursorEvent event)
IMultiTouchEventListener
cursorReleased
in interface IMultiTouchEventListener
public java.lang.String getFriendlyAppName()
IMultiplicityApp
getFriendlyAppName
in interface IMultiplicityApp
public void objectAdded(MultiTouchObjectEvent event)
IMultiTouchEventListener
objectAdded
in interface IMultiTouchEventListener
public void objectChanged(MultiTouchObjectEvent event)
IMultiTouchEventListener
objectChanged
in interface IMultiTouchEventListener
public void objectRemoved(MultiTouchObjectEvent event)
IMultiTouchEventListener
objectRemoved
in interface IMultiTouchEventListener
public void onDestroy()
IMultiplicityApp
onDestroy
in interface IMultiplicityApp
public void shouldStart(MultiTouchInputComponent input, IQueueOwner iqo)
IMultiplicityApp
shouldStart
in interface IMultiplicityApp
input
- the inputiqo
- the iqopublic void shouldStop()
IMultiplicityApp
shouldStop
in interface IMultiplicityApp