TranslationController

public class TranslationController

Manipulates the position of a BaseTransformableNode using a DragGestureRecognizer. If not selected, the BaseTransformableNode will become selected when the DragGesture starts.

Public Constructors

TranslationController(BaseTransformableNode transformableNode, DragGestureRecognizer gestureRecognizer)

Public Methods

boolean
EnumSet<Plane.Type>
getAllowedPlaneTypes()
Gets a reference to the EnumSet that determines which types of ArCore Planes this TranslationController is allowed to translate on.
boolean
void
void
void
onUpdated(Node node, FrameTime frameTime)
Notifies the listener that onUpdate(FrameTime) was called.
void
setAllowedPlaneTypes(EnumSet<Plane.Type> allowedPlaneTypes)
Sets which types of ArCore Planes this TranslationController is allowed to translate on.

Inherited Methods

Public Constructors

public TranslationController (BaseTransformableNode transformableNode, DragGestureRecognizer gestureRecognizer)

Parameters
transformableNode
gestureRecognizer

Public Methods

public boolean canStartTransformation (DragGesture gesture)

Parameters
gesture

public EnumSet<Plane.Type> getAllowedPlaneTypes ()

Gets a reference to the EnumSet that determines which types of ArCore Planes this TranslationController is allowed to translate on.

public boolean isTransforming ()

public void onContinueTransformation (DragGesture gesture)

Parameters
gesture

public void onEndTransformation (DragGesture 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 setAllowedPlaneTypes (EnumSet<Plane.Type> allowedPlaneTypes)

Sets which types of ArCore Planes this TranslationController is allowed to translate on.

Parameters
allowedPlaneTypes