Package pro.streem.ar.sceneform.ux
Class TranslationController
- java.lang.Object
-
- pro.streem.ar.sceneform.ux.BaseTransformationController<DragGesture>
-
- pro.streem.ar.sceneform.ux.TranslationController
-
- All Implemented Interfaces:
pro.streem.ar.sceneform.Node.LifecycleListener,BaseGesture.OnGestureEventListener<DragGesture>,BaseGestureRecognizer.OnGestureStartedListener<DragGesture>
public class TranslationController extends BaseTransformationController<DragGesture>
Manipulates the position of aBaseTransformableNodeusing aDragGestureRecognizer. If not selected, theBaseTransformableNodewill become selected when theDragGesturestarts.
-
-
Constructor Summary
Constructors Constructor Description TranslationController(BaseTransformableNode transformableNode, DragGestureRecognizer gestureRecognizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanStartTransformation(DragGesture gesture)java.util.EnumSet<com.google.ar.core.Plane.Type>getAllowedPlaneTypes()Gets a reference to the EnumSet that determines which types of ArCore Planes this TranslationController is allowed to translate on.booleanisTransforming()voidonContinueTransformation(DragGesture gesture)voidonEndTransformation(DragGesture gesture)voidonUpdated(pro.streem.ar.sceneform.Node node, pro.streem.ar.sceneform.FrameTime frameTime)voidsetAllowedPlaneTypes(java.util.EnumSet<com.google.ar.core.Plane.Type> allowedPlaneTypes)Sets which types of ArCore Planes this TranslationController is allowed to translate on.-
Methods inherited from class pro.streem.ar.sceneform.ux.BaseTransformationController
getActiveGesture, getTransformableNode, isEnabled, onActivated, onDeactivated, onFinished, onGestureStarted, onUpdated, setEnabled
-
-
-
-
Constructor Detail
-
TranslationController
public TranslationController(BaseTransformableNode transformableNode, DragGestureRecognizer gestureRecognizer)
-
-
Method Detail
-
setAllowedPlaneTypes
public void setAllowedPlaneTypes(java.util.EnumSet<com.google.ar.core.Plane.Type> allowedPlaneTypes)
Sets which types of ArCore Planes this TranslationController is allowed to translate on.
-
getAllowedPlaneTypes
public java.util.EnumSet<com.google.ar.core.Plane.Type> getAllowedPlaneTypes()
Gets a reference to the EnumSet that determines which types of ArCore Planes this TranslationController is allowed to translate on.
-
onUpdated
public void onUpdated(pro.streem.ar.sceneform.Node node, pro.streem.ar.sceneform.FrameTime frameTime)- Specified by:
onUpdatedin interfacepro.streem.ar.sceneform.Node.LifecycleListener- Overrides:
onUpdatedin classBaseTransformationController<DragGesture>
-
isTransforming
public boolean isTransforming()
- Overrides:
isTransformingin classBaseTransformationController<DragGesture>
-
canStartTransformation
public boolean canStartTransformation(DragGesture gesture)
- Specified by:
canStartTransformationin classBaseTransformationController<DragGesture>
-
onContinueTransformation
public void onContinueTransformation(DragGesture gesture)
- Specified by:
onContinueTransformationin classBaseTransformationController<DragGesture>
-
onEndTransformation
public void onEndTransformation(DragGesture gesture)
- Specified by:
onEndTransformationin classBaseTransformationController<DragGesture>
-
-