| 3668 | } |
| 3669 | |
| 3670 | void Node3DEditorViewport::_menu_option(int p_option) { |
| 3671 | EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); |
| 3672 | switch (p_option) { |
| 3673 | case VIEW_TOP: { |
| 3674 | cursor.y_rot = 0; |
| 3675 | cursor.x_rot = Math::PI / 2.0; |
| 3676 | set_message(TTR("Top View."), 2); |
| 3677 | view_type = VIEW_TYPE_TOP; |
| 3678 | _set_auto_orthogonal(); |
| 3679 | _update_name(); |
| 3680 | |
| 3681 | } break; |
| 3682 | case VIEW_BOTTOM: { |
| 3683 | cursor.y_rot = 0; |
| 3684 | cursor.x_rot = -Math::PI / 2.0; |
| 3685 | set_message(TTR("Bottom View."), 2); |
| 3686 | view_type = VIEW_TYPE_BOTTOM; |
| 3687 | _set_auto_orthogonal(); |
| 3688 | _update_name(); |
| 3689 | |
| 3690 | } break; |
| 3691 | case VIEW_LEFT: { |
| 3692 | cursor.x_rot = 0; |
| 3693 | cursor.y_rot = Math::PI / 2.0; |
| 3694 | set_message(TTR("Left View."), 2); |
| 3695 | view_type = VIEW_TYPE_LEFT; |
| 3696 | _set_auto_orthogonal(); |
| 3697 | _update_name(); |
| 3698 | |
| 3699 | } break; |
| 3700 | case VIEW_RIGHT: { |
| 3701 | cursor.x_rot = 0; |
| 3702 | cursor.y_rot = -Math::PI / 2.0; |
| 3703 | set_message(TTR("Right View."), 2); |
| 3704 | view_type = VIEW_TYPE_RIGHT; |
| 3705 | _set_auto_orthogonal(); |
| 3706 | _update_name(); |
| 3707 | |
| 3708 | } break; |
| 3709 | case VIEW_FRONT: { |
| 3710 | cursor.x_rot = 0; |
| 3711 | cursor.y_rot = 0; |
| 3712 | set_message(TTR("Front View."), 2); |
| 3713 | view_type = VIEW_TYPE_FRONT; |
| 3714 | _set_auto_orthogonal(); |
| 3715 | _update_name(); |
| 3716 | |
| 3717 | } break; |
| 3718 | case VIEW_REAR: { |
| 3719 | cursor.x_rot = 0; |
| 3720 | cursor.y_rot = Math::PI; |
| 3721 | set_message(TTR("Rear View."), 2); |
| 3722 | view_type = VIEW_TYPE_REAR; |
| 3723 | _set_auto_orthogonal(); |
| 3724 | _update_name(); |
| 3725 | |
| 3726 | } break; |
| 3727 | case VIEW_CENTER_TO_ORIGIN: { |
no test coverage detected