public class NetworkFlickBehaviour extends java.lang.Object implements IBehaviour, IMultiTouchEventListener
| Constructor and Description |
|---|
NetworkFlickBehaviour() |
| Modifier and Type | Method and Description |
|---|---|
void |
bounce(float vX,
float vY,
float tpf,
BehaviourUtilities.RelativePosition bouncePosition)
Causes item to bounce.
|
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.
|
void |
flick(com.jme3.math.Vector2f newVelocity)
Flicks the item without the need for initiation from a user gesture.
|
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 |
reset()
Halts the item's current movement if travelling under its own momentum.
|
void |
setActive(boolean active)
Set whether a behaviour executes events
|
void |
setDeceleration(float deceleration)
Sets the deceleration at which the managed item's momentum is reduced.
|
void |
setEventSource(IItem eventSourceItem)
The item whose multi-touch event dispatcher will generate the events that
this behaviour will respond to.
|
void |
setItemActingOn(IItem item)
The item that the behaviour should operate on.
|
void |
setMaxDimension(float maxDimension)
Sets the predetermined max dimension of the managed item.
|
void |
setStage(IStage stage)
Behaviours usually need to know about the stage.
|
public void bounce(float vX,
float vY,
float tpf,
BehaviourUtilities.RelativePosition bouncePosition)
vX - X component of the velocity the item that the managed item is
bouncing off.vY - Y component of the velocity the item that the managed item is
bouncing off.rp - public void cursorChanged(MultiTouchCursorEvent event)
IMultiTouchEventListenercursorChanged in interface IMultiTouchEventListenerpublic void cursorClicked(MultiTouchCursorEvent event)
IMultiTouchEventListenercursorClicked in interface IMultiTouchEventListenerpublic void cursorPressed(MultiTouchCursorEvent event)
IMultiTouchEventListenercursorPressed in interface IMultiTouchEventListenerpublic void cursorReleased(MultiTouchCursorEvent event)
IMultiTouchEventListenercursorReleased in interface IMultiTouchEventListenerpublic void flick(com.jme3.math.Vector2f newVelocity)
newVelocity - Direction (and force) the item should be flicked in.public void objectAdded(MultiTouchObjectEvent event)
IMultiTouchEventListenerobjectAdded in interface IMultiTouchEventListenerpublic void objectChanged(MultiTouchObjectEvent event)
IMultiTouchEventListenerobjectChanged in interface IMultiTouchEventListenerpublic void objectRemoved(MultiTouchObjectEvent event)
IMultiTouchEventListenerobjectRemoved in interface IMultiTouchEventListenerpublic void reset()
public void setActive(boolean active)
IBehavioursetActive in interface IBehaviourpublic void setDeceleration(float deceleration)
drag - The deceleration at which the managed item's momentum is
reduced.public void setEventSource(IItem eventSourceItem)
IBehavioursetEventSource in interface IBehaviourpublic void setItemActingOn(IItem item)
IBehavioursetItemActingOn in interface IBehaviourpublic void setMaxDimension(float maxDimension)
maxDim - The predetermined max dimension of the managed itempublic void setStage(IStage stage)
IBehavioursetStage in interface IBehaviour