Search Results for

    Show / Hide Table of Contents

    Class AnimatedModelPreview

    Animated model asset preview editor viewport.

    Inheritance
    System.Object
    Control
    ContainerControl
    FlaxEngine.GUI.RenderOutputControl
    EditorViewport
    AssetPreview
    AnimatedModelPreview
    AnimationPreview
    SkinnedModelPreview
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    AssetPreview.PreviewLight
    AssetPreview.EnvProbe
    AssetPreview.Sky
    AssetPreview.SkyLight
    AssetPreview.PostFxVolume
    AssetPreview.add_CustomDebugDraw(AssetPreview.CustomDebugDrawDelegate)
    AssetPreview.remove_CustomDebugDraw(AssetPreview.CustomDebugDrawDelegate)
    AssetPreview.DrawEditorPrimitives(GPUContext, RenderContext, GPUTexture, GPUTexture)
    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.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.OnLeftMouseButtonUp()
    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.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.IsControllingMouse
    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.OnDragEnter(Float2, DragData)
    ContainerControl.OnDragMove(Float2, DragData)
    ContainerControl.OnDragLeave()
    ContainerControl.OnDragDrop(Float2, DragData)
    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.AddUpdateCallbacks(RootControl)
    Control.RemoveUpdateCallbacks(RootControl)
    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.Previews
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public class AnimatedModelPreview : AssetPreview, IComparable, IDrawable, IEditorPrimitivesOwner

    Constructors

    AnimatedModelPreview(Boolean)

    Initializes a new instance of the AnimatedModelPreview class.

    Declaration
    public AnimatedModelPreview(bool useWidgets)
    Parameters
    System.Boolean useWidgets

    if set to true use widgets.

    Fields

    _snapToOrigin

    Snaps the preview actor to the world origin.

    Declaration
    protected bool _snapToOrigin
    Field Value
    System.Boolean

    Properties

    NodesMask

    Gets or sets the custom mask for the skeleton nodes. Nodes missing from this list will be skipped during rendering. Works only if ShowNodes is set to true and the array matches the attached SkinnedModel nodes hierarchy.

    Declaration
    public bool[] NodesMask { get; set; }
    Property Value
    System.Boolean[]

    PlayAnimation

    Gets or sets a value indicating whether play the animation in editor.

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

    PlaySpeed

    Gets or sets the animation playback speed.

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

    PreviewActor

    Gets the skinned model actor used to preview selected asset.

    Declaration
    public AnimatedModel PreviewActor { get; }
    Property Value
    AnimatedModel

    ScaleToFit

    Gets or sets a value indicating whether scale the model to the normalized bounds.

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

    ShowBounds

    Gets or sets a value indicating whether show animated model bounding box debug view.

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

    ShowFloor

    Gets or sets a value indicating whether show floor model.

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

    ShowNodes

    Gets or sets a value indicating whether show animated model skeleton nodes debug view.

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

    ShowNodesNames

    Gets or sets a value indicating whether show animated model skeleton nodes names debug view.

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

    SkinnedModel

    Gets or sets the skinned model asset to preview.

    Declaration
    public SkinnedModel SkinnedModel { get; set; }
    Property Value
    SkinnedModel

    Methods

    GetBounds()

    Gets the skinned model bounds. Handles skeleton-only assets.

    Declaration
    public BoundingBox GetBounds()
    Returns
    BoundingBox

    The local bounds.

    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
    AssetPreview.OnDestroy()

    OnKeyDown(KeyboardKeys)

    When key goes down

    Declaration
    public override bool OnKeyDown(KeyboardKeys key)
    Parameters
    KeyboardKeys key

    Key value

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    EditorViewport.OnKeyDown(KeyboardKeys)

    Pause()

    Pauses the animation playback.

    Declaration
    public void Pause()

    Play()

    Starts the animation playback.

    Declaration
    public void Play()

    ResetCamera()

    Resets the camera to focus on a object.

    Declaration
    public void ResetCamera()

    SetBlendShapeWeight(String, Single)

    Sets the weight of the blend shape and updates the preview model (if not animated right now).

    Declaration
    public void SetBlendShapeWeight(string name, float value)
    Parameters
    System.String name

    The blend shape name.

    System.Single value

    The normalized weight of the blend shape (in range -1:1).

    Stop()

    Stops the animation playback.

    Declaration
    public void Stop()

    Update(Single)

    Perform control update and all its children

    Declaration
    public override void Update(float deltaTime)
    Parameters
    System.Single deltaTime

    Delta time in seconds

    Overrides
    EditorViewport.Update(Single)

    Events

    PlayAnimationChanged

    Occurs when animation playback state gets changed.

    Declaration
    public event Action PlayAnimationChanged
    Event Type
    System.Action

    Extension Methods

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

    See Also

    AssetPreview
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat