Search Results for

    Show / Hide Table of Contents

    Class PrefabWindowViewport

    Editor viewport used by the PrefabWindow

    Inheritance
    System.Object
    Control
    ContainerControl
    FlaxEngine.GUI.RenderOutputControl
    EditorViewport
    AssetPreview
    PrefabPreview
    PrefabWindowViewport
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    PrefabPreview.Update(Single)
    PrefabPreview.Prefab
    PrefabPreview.Instance
    AssetPreview.PreviewLight
    AssetPreview.EnvProbe
    AssetPreview.Sky
    AssetPreview.SkyLight
    AssetPreview.PostFxVolume
    AssetPreview.add_CustomDebugDraw(AssetPreview.CustomDebugDrawDelegate)
    AssetPreview.remove_CustomDebugDraw(AssetPreview.CustomDebugDrawDelegate)
    AssetPreview.ShowDefaultSceneActors
    AssetPreview.ShowDebugDraw
    AssetPreview.ShowEditorPrimitives
    AssetPreview.EditorPrimitives
    AssetPreview.HasLoadedAssets
    AssetPreview.CustomDebugDraw
    EditorViewport.FpsCameraFilteringFrames
    EditorViewport._cameraWidget
    EditorViewport._cameraButton
    EditorViewport._orthographicModeButton
    EditorViewport._prevInput
    EditorViewport._input
    EditorViewport._viewMousePos
    EditorViewport._mouseDelta
    EditorViewport.MouseSpeed
    EditorViewport.MouseWheelZoomSpeedFactor
    EditorViewport.ViewWidgetButtonMenu
    EditorViewport.ViewWidgetShowMenu
    EditorViewport.InputActions
    EditorViewport.OrientViewport(Quaternion)
    EditorViewport.AdjustCameraMoveSpeed(Int32)
    EditorViewport.TakeScreenshot(String)
    EditorViewport.CopyViewData(RenderView)
    EditorViewport.GetInput(EditorViewport.Input)
    EditorViewport.GetPrevInput(EditorViewport.Input)
    EditorViewport.CreateProjectionMatrix(Matrix)
    EditorViewport.CreateViewMatrix(Float3, Matrix)
    EditorViewport.ConvertMouseToRay(Float2)
    EditorViewport.ProjectPoint(Vector3, Float2)
    EditorViewport.OnControlMouseBegin(Window)
    EditorViewport.OnControlMouseEnd(Window)
    EditorViewport.OnLeftMouseButtonDown()
    EditorViewport.OnRightMouseButtonDown()
    EditorViewport.OnRightMouseButtonUp()
    EditorViewport.OnMiddleMouseButtonDown()
    EditorViewport.OnMiddleMouseButtonUp()
    EditorViewport.UpdateView(Single, Vector3, Float2, Boolean)
    EditorViewport.OnMouseDown(Float2, MouseButton)
    EditorViewport.OnMouseWheel(Float2, Single)
    EditorViewport.OnChildResized(Control)
    EditorViewport.OnKeyDown(KeyboardKeys)
    EditorViewport.PerformLayoutBeforeChildren()
    EditorViewport.Draw()
    EditorViewport.OnLostFocus()
    EditorViewport.MovementSpeed
    EditorViewport.MinMovementSpeed
    EditorViewport.MaxMovementSpeed
    EditorViewport.UseCameraEasing
    EditorViewport.MousePositionDelta
    EditorViewport.ViewTransform
    EditorViewport.ViewPosition
    EditorViewport.ViewOrientation
    EditorViewport.ViewDirection
    EditorViewport.ViewRay
    EditorViewport.ViewFrustum
    EditorViewport.Yaw
    EditorViewport.Pitch
    EditorViewport.YawPitch
    EditorViewport.EulerAngles
    EditorViewport.ViewportCamera
    EditorViewport.NearPlane
    EditorViewport.FarPlane
    EditorViewport.FieldOfView
    EditorViewport.OrthographicScale
    EditorViewport.UseOrthographicProjection
    EditorViewport.RelativePanning
    EditorViewport.InvertPanning
    EditorViewport.PanningSpeed
    EditorViewport.ShowFpsCounter
    EditorViewport.MouseRay
    ContainerControl._children
    ContainerControl._containsFocus
    ContainerControl._isLayoutLocked
    ContainerControl.LockChildrenRecursive()
    ContainerControl.UnlockChildrenRecursive()
    ContainerControl.RemoveChildren()
    ContainerControl.DisposeChildren()
    ContainerControl.AddChild<T>()
    ContainerControl.AddChild<T>(T)
    ContainerControl.RemoveChild(Control)
    ContainerControl.GetChild(Int32)
    ContainerControl.GetChild<T>()
    ContainerControl.GetChildIndex(Control)
    ContainerControl.GetChildIndexAt(Float2)
    ContainerControl.GetChildAt(Float2)
    ContainerControl.GetChildAt(Float2, Func<Control, Boolean>)
    ContainerControl.GetChildAtRecursive(Float2)
    ContainerControl.GetClientArea()
    ContainerControl.SortChildren()
    ContainerControl.SortChildrenRecursive()
    ContainerControl.OnChildrenChanged()
    ContainerControl.GetDesireClientArea(Rectangle)
    ContainerControl.IntersectsChildContent(Control, Float2, Float2)
    ContainerControl.OnNavigate(NavDirection, Float2, Control, List<Control>)
    ContainerControl.CanNavigateChild(Control)
    ContainerControl.NavigationWrap(NavDirection, Float2, List<Control>, Float2)
    ContainerControl.UpdateContainsFocus()
    ContainerControl.UpdateChildrenBounds()
    ContainerControl.PerformLayoutAfterChildren()
    ContainerControl.ClearState()
    ContainerControl.DrawSelf()
    ContainerControl.DrawChildren()
    ContainerControl.ContainsPoint(Float2, Boolean)
    ContainerControl.PerformLayout(Boolean)
    ContainerControl.RayCast(Float2, Control)
    ContainerControl.OnMouseEnter(Float2)
    ContainerControl.OnMouseMove(Float2)
    ContainerControl.OnMouseLeave()
    ContainerControl.OnMouseUp(Float2, MouseButton)
    ContainerControl.OnMouseDoubleClick(Float2, MouseButton)
    ContainerControl.IsTouchPointerOver(Int32)
    ContainerControl.OnTouchEnter(Float2, Int32)
    ContainerControl.OnTouchDown(Float2, Int32)
    ContainerControl.OnTouchMove(Float2, Int32)
    ContainerControl.OnTouchUp(Float2, Int32)
    ContainerControl.OnTouchLeave(Int32)
    ContainerControl.OnCharInput(Char)
    ContainerControl.OnKeyUp(KeyboardKeys)
    ContainerControl.OnSizeChanged()
    ContainerControl.Children
    ContainerControl.ChildrenCount
    ContainerControl.HasChildren
    ContainerControl.ContainsFocus
    ContainerControl.ClipChildren
    ContainerControl.CullChildren
    ContainerControl.IsTouchOver
    Control.Resize(Float2)
    Control.UpdateBounds()
    Control.UpdateTransform()
    Control.SetAnchorPreset(AnchorPresets, Boolean, Boolean)
    Control.Dispose()
    Control.Focus()
    Control.Defocus()
    Control.OnGotFocus()
    Control.OnStartContainsFocus()
    Control.OnEndContainsFocus()
    Control.Focus(Control)
    Control.StartMouseCapture(Boolean)
    Control.EndMouseCapture()
    Control.OnEndMouseCapture()
    Control.GetNavTarget(NavDirection)
    Control.GetNavOrigin(NavDirection)
    Control.NavigationFocus()
    Control.OnSubmit()
    Control.OnTouchLeave()
    Control.DoDragDrop(DragData)
    Control.LinkTooltip(String, Tooltip)
    Control.UnlinkTooltip()
    Control.OnShowTooltip(String, Float2, Rectangle)
    Control.OnTooltipShown(Tooltip)
    Control.OnTestTooltipOverControl(Float2)
    Control.IntersectsContent(Float2, Float2)
    Control.PointToParent(ContainerControl, Float2)
    Control.PointToParent(Float2)
    Control.PointToParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(ContainerControl, Float2)
    Control.PointToWindow(Float2)
    Control.PointFromWindow(Float2)
    Control.PointToScreen(Float2)
    Control.PointFromScreen(Float2)
    Control.OnLocationChanged()
    Control.SetScaleInternal(Float2)
    Control.SetPivotInternal(Float2)
    Control.SetShearInternal(Float2)
    Control.SetRotationInternal(Single)
    Control.OnVisibleChanged()
    Control.OnParentChangedInternal()
    Control.SetUpdate(Control.UpdateDelegate, Control.UpdateDelegate)
    Control.OnParentResized()
    Control.CompareTo(Object)
    Control.Compare(Control)
    Control.Top
    Control.Bottom
    Control.Left
    Control.Right
    Control.UpperLeft
    Control.UpperRight
    Control.BottomRight
    Control.BottomLeft
    Control.Scale
    Control.Pivot
    Control.Shear
    Control.Rotation
    Control.HasParent
    Control.BackgroundColor
    Control.BackgroundBrush
    Control.Enabled
    Control.EnabledInHierarchy
    Control.Visible
    Control.VisibleInHierarchy
    Control.IsDisposing
    Control.Root
    Control.RootWindow
    Control.DpiScale
    Control.ScreenPos
    Control.AutoFocus
    Control.IsFocused
    Control.IsNavFocused
    Control.IsMouseOver
    Control.IsDragOver
    Control.Tooltip
    Control.ShowTooltip
    Control.EditorBounds
    Control.LocationChanged
    Control.SizeChanged
    Control.ParentChanged
    Control.VisibleChanged
    Namespace: FlaxEditor.Viewport
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public class PrefabWindowViewport : PrefabPreview, IComparable, IDrawable, IEditorPrimitivesOwner, IGizmoOwner

    Constructors

    PrefabWindowViewport(PrefabWindow)

    Initializes a new instance of the PrefabWindowViewport class.

    Declaration
    public PrefabWindowViewport(PrefabWindow window)
    Parameters
    PrefabWindow window

    Editor window.

    Fields

    DragHandlers

    Drag and drop handlers

    Declaration
    public readonly ViewportDragHandlers DragHandlers
    Field Value
    ViewportDragHandlers

    SelectionOutline

    The selection outline postFx.

    Declaration
    public SelectionOutline SelectionOutline
    Field Value
    FlaxEditor.Gizmo.SelectionOutline

    TransformGizmo

    The transform gizmo.

    Declaration
    public readonly TransformGizmo TransformGizmo
    Field Value
    FlaxEditor.Gizmo.TransformGizmo

    Properties

    Gizmos

    Declaration
    public GizmosCollection Gizmos { get; }
    Property Value
    FlaxEditor.Gizmo.GizmosCollection

    IsAltKeyDown

    Declaration
    public bool IsAltKeyDown { get; }
    Property Value
    System.Boolean

    IsControlDown

    Declaration
    public bool IsControlDown { get; }
    Property Value
    System.Boolean

    IsControllingMouse

    Gets a value indicating whether this viewport is using mouse currently (eg. user moving objects).

    Declaration
    protected override bool IsControllingMouse { get; }
    Property Value
    System.Boolean

    Overrides
    EditorViewport.IsControllingMouse

    IsLeftMouseButtonDown

    Declaration
    public bool IsLeftMouseButtonDown { get; }
    Property Value
    System.Boolean

    IsRightMouseButtonDown

    Declaration
    public bool IsRightMouseButtonDown { get; }
    Property Value
    System.Boolean

    MouseDelta

    Declaration
    public Float2 MouseDelta { get; }
    Property Value
    Float2

    RenderTask

    Declaration
    public SceneRenderTask RenderTask { get; }
    Property Value
    SceneRenderTask

    SceneGraphRoot

    Declaration
    public RootNode SceneGraphRoot { get; }
    Property Value
    FlaxEditor.SceneGraph.RootNode

    ShowUI

    Whether to show the UI mode or not.

    Declaration
    public bool ShowUI { get; set; }
    Property Value
    System.Boolean

    SnapToGround

    Declaration
    public bool SnapToGround { get; }
    Property Value
    System.Boolean

    SnapToVertex

    Declaration
    public bool SnapToVertex { get; }
    Property Value
    System.Boolean

    Undo

    Declaration
    public Undo Undo { get; }
    Property Value
    Undo

    UseDuplicate

    Declaration
    public bool UseDuplicate { get; }
    Property Value
    System.Boolean

    UseSnapping

    Declaration
    public bool UseSnapping { get; }
    Property Value
    System.Boolean

    ViewFarPlane

    Declaration
    public float ViewFarPlane { get; }
    Property Value
    System.Single

    Viewport

    Declaration
    public EditorViewport Viewport { get; }
    Property Value
    EditorViewport

    Methods

    AddUpdateCallbacks(RootControl)

    Adds the custom control logic update callbacks to the root.

    Declaration
    protected override void AddUpdateCallbacks(RootControl root)
    Parameters
    RootControl root

    The root.

    Overrides
    Control.AddUpdateCallbacks(RootControl)

    ApplyTransform(List<SceneGraphNode>, ref Vector3, ref Quaternion, ref Vector3)

    Applies the transform to the collection of scene graph nodes.

    Declaration
    public void ApplyTransform(List<SceneGraphNode> selection, ref Vector3 translationDelta, ref Quaternion rotationDelta, ref Vector3 scaleDelta)
    Parameters
    System.Collections.Generic.List<FlaxEditor.SceneGraph.SceneGraphNode> selection

    The selection.

    Vector3 translationDelta

    The translation delta.

    Quaternion rotationDelta

    The rotation delta.

    Vector3 scaleDelta

    The scale delta.

    DrawEditorPrimitives(GPUContext, ref RenderContext, GPUTexture, GPUTexture)

    Declaration
    public override void DrawEditorPrimitives(GPUContext context, ref RenderContext renderContext, GPUTexture target, GPUTexture targetDepth)
    Parameters
    GPUContext context

    RenderContext renderContext

    GPUTexture target

    GPUTexture targetDepth

    Overrides
    AssetPreview.DrawEditorPrimitives(GPUContext, ref RenderContext, GPUTexture, GPUTexture)

    FocusSelection()

    Focuses the viewport on the current selection of the gizmo.

    Declaration
    public void FocusSelection()

    FocusSelection(ref Quaternion)

    Focuses the viewport on the current selection of the gizmo.

    Declaration
    public void FocusSelection(ref Quaternion orientation)
    Parameters
    Quaternion orientation

    The target view orientation.

    OnDebugDraw(GPUContext, ref RenderContext)

    Called when drawing debug shapes with DebugDraw for this viewport.

    Declaration
    protected override void OnDebugDraw(GPUContext context, ref RenderContext renderContext)
    Parameters
    GPUContext context

    The GPU context.

    RenderContext renderContext

    The render context.

    Overrides
    AssetPreview.OnDebugDraw(GPUContext, ref RenderContext)

    OnDestroy()

    Declaration
    public override void OnDestroy()
    Overrides
    PrefabPreview.OnDestroy()

    OnDragDrop(ref Float2, DragData)

    When mouse dragging drops on control's area

    Declaration
    public override DragDropEffect OnDragDrop(ref Float2 location, DragData data)
    Parameters
    Float2 location

    Mouse location in Control Space

    DragData data

    The data. See DragDataText and DragDataFiles.

    Returns
    DragDropEffect

    The drag event result effect.

    Overrides
    ContainerControl.OnDragDrop(ref Float2, DragData)

    OnDragEnter(ref Float2, DragData)

    When mouse dragging enters control's area

    Declaration
    public override DragDropEffect OnDragEnter(ref Float2 location, DragData data)
    Parameters
    Float2 location

    Mouse location in Control Space

    DragData data

    The data. See DragDataText and DragDataFiles.

    Returns
    DragDropEffect

    The drag event result effect.

    Overrides
    ContainerControl.OnDragEnter(ref Float2, DragData)

    OnDragLeave()

    When mouse dragging leaves control's area

    Declaration
    public override void OnDragLeave()
    Overrides
    ContainerControl.OnDragLeave()

    OnDragMove(ref Float2, DragData)

    When mouse dragging moves over control's area

    Declaration
    public override DragDropEffect OnDragMove(ref Float2 location, DragData data)
    Parameters
    Float2 location

    Mouse location in Control Space

    DragData data

    The data. See DragDataText and DragDataFiles.

    Returns
    DragDropEffect

    The drag event result effect.

    Overrides
    ContainerControl.OnDragMove(ref Float2, DragData)

    OnLeftMouseButtonUp()

    Called when left mouse button goes up (on release).

    Declaration
    protected override void OnLeftMouseButtonUp()
    Overrides
    EditorViewport.OnLeftMouseButtonUp()

    OpenContextMenu()

    Declaration
    public void OpenContextMenu()

    OrientViewport(ref Quaternion)

    Orients the viewport.

    Declaration
    protected override void OrientViewport(ref Quaternion orientation)
    Parameters
    Quaternion orientation

    The orientation.

    Overrides
    EditorViewport.OrientViewport(ref Quaternion)

    RemoveUpdateCallbacks(RootControl)

    Removes the custom control logic update callbacks from the root.

    Declaration
    protected override void RemoveUpdateCallbacks(RootControl root)
    Parameters
    RootControl root

    The root.

    Overrides
    Control.RemoveUpdateCallbacks(RootControl)

    Select(List<SceneGraphNode>)

    Declaration
    public void Select(List<SceneGraphNode> nodes)
    Parameters
    System.Collections.Generic.List<FlaxEditor.SceneGraph.SceneGraphNode> nodes

    SetInitialUIMode(Boolean)

    set the initial UI mod

    Declaration
    public void SetInitialUIMode(bool value)
    Parameters
    System.Boolean value

    the initial ShowUI value

    ShowSelectedActors()

    Moves the viewport to visualize selected actors.

    Declaration
    public void ShowSelectedActors()

    Spawn(Actor)

    Declaration
    public void Spawn(Actor actor)
    Parameters
    Actor actor

    Events

    UIModeToggled

    Event fired when the UI Mode is toggled.

    Declaration
    public event Action<bool> UIModeToggled
    Event Type
    System.Action<System.Boolean>

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)

    See Also

    PrefabWindow
    PrefabPreview
    FlaxEditor.Gizmo.IGizmoOwner
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat