Class MainEditorGizmoViewport
Main editor gizmo viewport used by the EditGameWindow.
Inheritance
Implements
Namespace: FlaxEditor.Viewport
Assembly: FlaxEngine.CSharp.dll
Syntax
public class MainEditorGizmoViewport : EditorGizmoViewport, IComparable, IDrawable, IGizmoOwner, IEditorPrimitivesOwner
Constructors
MainEditorGizmoViewport(Editor)
Initializes a new instance of the MainEditorGizmoViewport class.
Declaration
public MainEditorGizmoViewport(Editor editor)
Parameters
Editor
editor
Editor instance. |
Fields
DragHandlers
Drag and drop handlers
Declaration
public readonly ViewportDragHandlers DragHandlers
Field Value
ViewportDragHandlers
|
DrawDebugDraw
Gets or sets a value indicating whether draw DebugDraw shapes.
Declaration
public bool DrawDebugDraw
Field Value
System.Boolean
|
EditFoliageGizmo
The edit foliage gizmo.
Declaration
public EditFoliageGizmoMode EditFoliageGizmo
Field Value
EditFoliageGizmoMode
|
EditorPrimitives
The editor primitives postFx.
Declaration
public EditorPrimitives EditorPrimitives
Field Value
FlaxEditor.Gizmo.EditorPrimitives
|
EditTerrainGizmo
The edit terrain gizmo.
Declaration
public EditTerrainGizmoMode EditTerrainGizmo
Field Value
FlaxEditor.Tools.Terrain.EditTerrainGizmoMode
|
Grid
The grid gizmo.
Declaration
public readonly GridGizmo Grid
Field Value
FlaxEditor.Gizmo.GridGizmo
|
PaintFoliageGizmo
The paint foliage gizmo.
Declaration
public PaintFoliageGizmoMode PaintFoliageGizmo
Field Value
PaintFoliageGizmoMode
|
PaintTerrainGizmo
The paint terrain gizmo.
Declaration
public PaintTerrainGizmoMode PaintTerrainGizmo
Field Value
FlaxEditor.Tools.Terrain.PaintTerrainGizmoMode
|
SculptTerrainGizmo
The sculpt terrain gizmo.
Declaration
public SculptTerrainGizmoMode SculptTerrainGizmo
Field Value
FlaxEditor.Tools.Terrain.SculptTerrainGizmoMode
|
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
DebugDrawData
Gets the debug draw data for the viewport.
Declaration
public ViewportDebugDrawData DebugDrawData { get; }
Property Value
FlaxEditor.ViewportDebugDrawData
|
ShowNavigation
Methods
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 void DrawEditorPrimitives(GPUContext context, ref RenderContext renderContext, GPUTexture target, GPUTexture targetDepth)
Parameters
GPUContext
context
|
RenderContext
renderContext
|
GPUTexture
target
|
GPUTexture
targetDepth
|
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. |
LockFocusSelection()
Lock focus on the current selection gizmo.
Declaration
public void LockFocusSelection()
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
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
OnDragLeave()
When mouse dragging leaves control's area
Declaration
public override void OnDragLeave()
Overrides
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
OnLeftMouseButtonUp()
Called when left mouse button goes up (on release).
Declaration
protected override void OnLeftMouseButtonUp()
Overrides
OpenContextMenu()
OrientViewport(ref Quaternion)
Orients the viewport.
Declaration
protected override void OrientViewport(ref Quaternion orientation)
Parameters
Quaternion
orientation
The orientation. |
Overrides
OverrideSelectionOutline(SelectionOutline)
Overrides the selection outline effect or restored the default one.
Declaration
public void OverrideSelectionOutline(SelectionOutline customSelectionOutline)
Parameters
FlaxEditor.Gizmo.SelectionOutline
customSelectionOutline
The custom selection outline or null if use default one. |
RotateSelection()
Press "R" to rotate the selected gizmo objects 45 degrees.
Declaration
public void RotateSelection()
Select(List<SceneGraphNode>)
Declaration
public override void Select(List<SceneGraphNode> nodes)
Parameters
System.Collections.Generic.List<FlaxEditor.SceneGraph.SceneGraphNode>
nodes
|
Overrides
Spawn(Actor)
UnlockFocusSelection()
Unlock focus on the current selection.
Declaration
public void UnlockFocusSelection()
Update(Single)
Perform control update and all its children
Declaration
public override void Update(float deltaTime)
Parameters
System.Single
deltaTime
Delta time in seconds |