BaseTransformationController

public abstract class BaseTransformationController
Known Direct Subclasses

Manipulates the transform properties (i.e. scale/rotation/translation) of a BaseTransformableNode by responding to Gestures via a BaseGestureRecognizer.

Example's include, changing the TransformableNode's Scale based on a Pinch Gesture.

Public Constructors

Public Methods

T
BaseTransformableNode
boolean
boolean
void
onActivated(Node node)
Notifies the listener that onActivate() was called.
void
onDeactivated(Node node)
Notifies the listener that onDeactivate() was called.
void
onFinished(T gesture)
void
onGestureStarted(T gesture)
void
onUpdated(T gesture)
void
onUpdated(Node node, FrameTime frameTime)
Notifies the listener that onUpdate(FrameTime) was called.
void
setEnabled(boolean enabled)

Protected Methods

abstract boolean
abstract void
abstract void
onEndTransformation(T gesture)

Inherited Methods

Public Constructors

public BaseTransformationController (BaseTransformableNode transformableNode, BaseGestureRecognizer<T> gestureRecognizer)

Parameters
transformableNode
gestureRecognizer

Public Methods

public T getActiveGesture ()

public BaseTransformableNode getTransformableNode ()

public boolean isEnabled ()

public boolean isTransforming ()

public void onActivated (Node node)

Notifies the listener that onActivate() was called.

Parameters
node the node that was activated

public void onDeactivated (Node node)

Notifies the listener that onDeactivate() was called.

Parameters
node the node that was deactivated

public void onFinished (T gesture)

Parameters
gesture

public void onGestureStarted (T gesture)

Parameters
gesture

public void onUpdated (T gesture)

Parameters
gesture

public void onUpdated (Node node, FrameTime frameTime)

Notifies the listener that onUpdate(FrameTime) was called.

Parameters
node the node that was updated
frameTime provides time information for the current frame

public void setEnabled (boolean enabled)

Parameters
enabled

Protected Methods

protected abstract boolean canStartTransformation (T gesture)

Parameters
gesture

protected abstract void onContinueTransformation (T gesture)

Parameters
gesture

protected abstract void onEndTransformation (T gesture)

Parameters
gesture