Class TransformationSystem

    • Constructor Detail

      • TransformationSystem

        public TransformationSystem​(android.util.DisplayMetrics displayMetrics,
                                    SelectionVisualizer selectionVisualizer)
    • Method Detail

      • setSelectionVisualizer

        public void setSelectionVisualizer​(SelectionVisualizer selectionVisualizer)
        Sets the selection visualizer used to visualize which BaseTransformableNode is currently selected. If there is already a selected node, then the old selection visual is removed and the new one is applied immediately.
      • getGesturePointersUtility

        public GesturePointersUtility getGesturePointersUtility()
        Gets the utility used by BaseGestureRecognizer subclasses to retain/release pointer Ids so that each pointer can only be used in one gesture at a time.
      • getDragRecognizer

        public DragGestureRecognizer getDragRecognizer()
        Gets the gesture recognizer for determining when the user performs a drag motion on the touch screen.
      • getPinchRecognizer

        public PinchGestureRecognizer getPinchRecognizer()
        Gets the gesture recognizer for determining when the user performs a two-finger pinch motion on the touch screen.
      • getTwistRecognizer

        public TwistGestureRecognizer getTwistRecognizer()
        Gets the gesture recognizer for determining when the user performs a two-finger twist motion on the touch screen.
      • getSelectedNode

        @Nullable
        public BaseTransformableNode getSelectedNode()
        Gets the currently selected node. Only the currently selected node can be transformed. Nodes are selected automatically when they are tapped, or when the user begins to translate the node with a drag gesture.
      • selectNode

        public boolean selectNode​(@Nullable
                                  BaseTransformableNode node)
        Sets a BaseTransformableNode as the selected node if there is no currently selected node or if the currently selected node is not actively being transformed. If null, then deselects the currently selected node if the node is not transforming.
        Returns:
        true if the node was successfully selected
        See Also:
        BaseTransformableNode.isTransforming()
      • onTouch

        public void onTouch​(pro.streem.ar.sceneform.HitTestResult hitTestResult,
                            android.view.MotionEvent motionEvent)
        Dispatches touch events to the gesture recognizers contained by this transformation system.