// Copyright (c) Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using FlaxEngine;
namespace FlaxEditor.Gizmo
{
///
/// Describes objects that can own gizmo tools.
///
[HideInEditor]
public interface IGizmoOwner
{
///
/// Gets the gizmos collection.
///
FlaxEditor.Viewport.EditorViewport Viewport { get; }
///
/// Gets the gizmos collection.
///
GizmosCollection Gizmos { get; }
///
/// Gets the render task used by the owner to render the scene and the gizmos.
///
SceneRenderTask RenderTask { get; }
///
/// Gets a value indicating whether left mouse button is pressed down.
///
bool IsLeftMouseButtonDown { get; }
///
/// Gets a value indicating whether right mouse button is pressed down.
///
bool IsRightMouseButtonDown { get; }
///
/// Gets a value indicating whether Alt key is pressed down.
///
bool IsAltKeyDown { get; }
///
/// Gets a value indicating whether Control key is pressed down.
///
bool IsControlDown { get; }
///
/// Gets a value indicating whether snap selected objects to ground (check if user pressed the given input key to call action).
///
bool SnapToGround { get; }
///
/// Gets a value indicating whether to use vertex snapping (check if user pressed the given input key to call action).
///
bool SnapToVertex { get; }
///
/// Gets the view forward direction.
///
Float3 ViewDirection { get; }
///
/// Gets the view position.
///
Vector3 ViewPosition { get; }
///
/// Gets the view orientation.
///
Quaternion ViewOrientation { get; }
///
/// Gets the view far clipping plane.
///
float ViewFarPlane { get; }
///
/// Gets the mouse ray (in world space of the viewport).
///
Ray MouseRay { get; }
///
/// Gets the mouse movement delta.
///
Float2 MouseDelta { get; }
///
/// Gets a value indicating whether use grid snapping during gizmo operations.
///
bool UseSnapping { get; }
///
/// Gets a value indicating whether duplicate objects during gizmo operation (eg. when transforming).
///
bool UseDuplicate { get; }
///
/// Gets a object used by the gizmo owner.
///
Undo Undo { get; }
///
/// Gets the root tree node for the scene graph.
///
SceneGraph.RootNode SceneGraphRoot { get; }
///
/// Selects the scene objects.
///
/// The nodes to select
void Select(List nodes);
///
/// Spawns the actor in the viewport hierarchy.
///
/// The new actor to spawn.
void Spawn(Actor actor);
///
/// Opens the context menu at the current mouse location (using current selection).
///
void OpenContextMenu();
}
}