public void ChangeGuestType(ObjectGestureType type)
        {
            switch (type)
            {
            case ObjectGestureType.Move:
                MoveButton.SetActive(true);
                RotateButton.SetActive(false);
                ScaleButton.SetActive(false);

                break;

            case ObjectGestureType.Rotate:
                MoveButton.SetActive(false);
                RotateButton.SetActive(true);
                ScaleButton.SetActive(false);
                break;

            case ObjectGestureType.Scale:
                MoveButton.SetActive(false);
                RotateButton.SetActive(false);
                ScaleButton.SetActive(true);
                break;

            default:
                MoveButton.SetActive(false);
                RotateButton.SetActive(false);
                ScaleButton.SetActive(false);
                break;
            }

            guestBehavior.ChangeGestureType(type);
        }
Beispiel #2
0
        public void ChangeGestureType(ObjectGestureType type)
        {
            gestureType = type;

            if (type == ObjectGestureType.Move)
            {
                inputManager.ChangeToManipulationRecognizer();
            }
            else if (type == ObjectGestureType.Rotate)
            {
                inputManager.ChangeToNavigationRecognizer();
            }
            else if (type == ObjectGestureType.Scale)
            {
                inputManager.ChangeToNavigationRecognizer();
            }
            else if (type == ObjectGestureType.Fitting)
            {
                inputManager.ChangeToManipulationRecognizer();
                //currentAnchorInfo.mark.SetAdjustType(AnchorAdjestType.Free);
                // 直接开始fitting
                //Debug.Log("start fitting!");
                StartFit();
            }
            else
            {
                inputManager.ChangeToManipulationRecognizer();
                //currentAnchorInfo.mark.SetAdjustType(AnchorAdjestType.None);
                //anchorUI.SelectAnAnchor();
            }
        }
Beispiel #3
0
    public void ChangeGestureType(ObjectGestureType type)
    {
        gestureType = type;

        if (type == ObjectGestureType.Move)
        {
            inputManager.ChangeToManipulationRecognizer();
        }
        else if (type == ObjectGestureType.Rotate)
        {
            inputManager.ChangeToNavigationRecognizer();
        }
    }