Search Results for

    Show / Hide Table of Contents

    Class BezierCurveEditor<T>

    The Bezier curve editor control.

    Inheritance
    System.Object
    Control
    ContainerControl
    FlaxEditor.GUI.CurveEditorBase
    CurveEditor<T>
    BezierCurveEditor<T>
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    CurveEditor<T>.LabelsSize
    CurveEditor<T>.UnitsPerSecond
    CurveEditor<T>.KeyframesSize
    CurveEditor<T>.Colors
    CurveEditor<T>.TickSteps
    CurveEditor<T>._contents
    CurveEditor<T>._mainPanel
    CurveEditor<T>._refreshAfterEdit
    CurveEditor<T>._showCollapsed
    CurveEditor<T>._points
    CurveEditor<T>._tangents
    CurveEditor<T>.Accessor
    CurveEditor<T>.DefaultValue
    CurveEditor<T>.OnKeyframesDeselect(IKeyframesEditor)
    CurveEditor<T>.OnKeyframesSelection(IKeyframesEditor, ContainerControl, Rectangle)
    CurveEditor<T>.OnKeyframesSelectionCount()
    CurveEditor<T>.OnKeyframesDelete(IKeyframesEditor)
    CurveEditor<T>.OnKeyframesMove(IKeyframesEditor, ContainerControl, Float2, Boolean, Boolean)
    CurveEditor<T>.OnKeyframesCopy(IKeyframesEditor, Nullable<Single>, StringBuilder)
    CurveEditor<T>.OnKeyframesPaste(IKeyframesEditor, Nullable<Single>, String[], Int32)
    CurveEditor<T>.UpdateTooltips()
    CurveEditor<T>.FocusSelection()
    CurveEditor<T>.ShowWholeCurve()
    CurveEditor<T>.Evaluate(Object, Single, Boolean)
    CurveEditor<T>.ClearSelection()
    CurveEditor<T>.SelectAll()
    CurveEditor<T>.DeselectAll()
    CurveEditor<T>.PointToKeyframes(Float2, Rectangle)
    CurveEditor<T>.PointFromKeyframes(Float2, Rectangle)
    CurveEditor<T>.Draw()
    CurveEditor<T>.OnSizeChanged()
    CurveEditor<T>.OnKeyDown(KeyboardKeys)
    CurveEditor<T>.ViewOffset
    CurveEditor<T>.ViewScale
    CurveEditor<T>.IsUserEditing
    CurveEditor<T>.ScrollBars
    CurveEditor<T>.ValueType
    CurveEditor<T>.FPS
    CurveEditor<T>.ShowCollapsed
    CurveEditor<T>.KeyframesChanged
    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.OnChildResized(Control)
    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.PerformLayoutBeforeChildren()
    ContainerControl.PerformLayoutAfterChildren()
    ContainerControl.Update(Single)
    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.OnMouseWheel(Float2, Single)
    ContainerControl.OnMouseDown(Float2, MouseButton)
    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.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.OnLostFocus()
    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.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.GUI
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public class BezierCurveEditor<T> : CurveEditor<T>, IComparable, IDrawable, IKeyframesEditor where T : new()
    Type Parameters
    T

    The keyframe value type.

    Constructors

    BezierCurveEditor()

    Initializes a new instance of the BezierCurveEditor<T> class.

    Declaration
    public BezierCurveEditor()

    Fields

    _keyframes

    The keyframes collection.

    Declaration
    protected List<BezierCurve<T>.Keyframe> _keyframes
    Field Value
    System.Collections.Generic.List<BezierCurve.Keyframe<>>

    Properties

    Keyframes

    Gets the keyframes collection (read-only).

    Declaration
    public IReadOnlyList<BezierCurve<T>.Keyframe> Keyframes { get; }
    Property Value
    System.Collections.Generic.IReadOnlyList<BezierCurve.Keyframe<>>

    KeyframesCount

    Declaration
    public override int KeyframesCount { get; }
    Property Value
    System.Int32

    Overrides
    FlaxEditor.GUI.CurveEditorBase.KeyframesCount

    Methods

    AddKeyframe(BezierCurve<T>.Keyframe)

    Adds the new keyframe.

    Declaration
    public int AddKeyframe(BezierCurve<T>.Keyframe k)
    Parameters
    BezierCurve.Keyframe<> k

    The keyframe to add.

    Returns
    System.Int32

    The index of the keyframe.

    AddKeyframe(Float2)

    Adds a new keyframe at the given location (in keyframes space).

    Declaration
    protected override void AddKeyframe(Float2 keyframesPos)
    Parameters
    Float2 keyframesPos

    The new keyframe position (in keyframes space).

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.AddKeyframe(FlaxEngine.Float2)

    AddKeyframe(Single, Object)

    Declaration
    public override int AddKeyframe(float time, object value)
    Parameters
    System.Single time

    System.Object value

    Returns
    System.Int32

    Overrides
    FlaxEditor.GUI.CurveEditorBase.AddKeyframe(System.Single, System.Object)

    AddKeyframe(Single, Object, Object, Object)

    Declaration
    public override int AddKeyframe(float time, object value, object tangentIn, object tangentOut)
    Parameters
    System.Single time

    System.Object value

    System.Object tangentIn

    System.Object tangentOut

    Returns
    System.Int32

    Overrides
    FlaxEditor.GUI.CurveEditorBase.AddKeyframe(System.Single, System.Object, System.Object, System.Object)

    DrawCurve(ref Rectangle)

    Draws the curve.

    Declaration
    protected override void DrawCurve(ref Rectangle viewRect)
    Parameters
    Rectangle viewRect

    The main panel client area used as a view bounds.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.DrawCurve(FlaxEngine.Rectangle)

    Evaluate(out T, Single, Boolean)

    Evaluates the animation curve value at the specified time.

    Declaration
    public override void Evaluate(out T result, float time, bool loop = false)
    Parameters
    T result

    The interpolated value from the curve at provided time.

    System.Single time

    The time to evaluate the curve at.

    System.Boolean loop

    If true the curve will loop when it goes past the end or beginning. Otherwise the curve value will be clamped.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.Evaluate(T, System.Single, System.Boolean)

    GetAllKeyframesEditingProxy()

    Gets proxy object for all keyframes list.

    Declaration
    protected override CurveEditor<T>.IAllKeyframesProxy GetAllKeyframesEditingProxy()
    Returns
    CurveEditor.IAllKeyframesProxy<>

    The proxy object.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.GetAllKeyframesEditingProxy()

    GetKeyframe(Int32)

    Declaration
    public override object GetKeyframe(int index)
    Parameters
    System.Int32 index

    Returns
    System.Object

    Overrides
    FlaxEditor.GUI.CurveEditorBase.GetKeyframe(System.Int32)

    GetKeyframe(Int32, out Single, out Object, out Object, out Object)

    Declaration
    public override void GetKeyframe(int index, out float time, out object value, out object tangentIn, out object tangentOut)
    Parameters
    System.Int32 index

    System.Single time

    System.Object value

    System.Object tangentIn

    System.Object tangentOut

    Overrides
    FlaxEditor.GUI.CurveEditorBase.GetKeyframe(System.Int32, System.Single, System.Object, System.Object, System.Object)

    GetKeyframePoint(Int32, Int32)

    Declaration
    public override Float2 GetKeyframePoint(int index, int component)
    Parameters
    System.Int32 index

    System.Int32 component

    Returns
    Float2

    Overrides
    FlaxEditor.GUI.CurveEditorBase.GetKeyframePoint(System.Int32, System.Int32)

    GetKeyframes()

    Declaration
    public override object[] GetKeyframes()
    Returns
    System.Object[]

    Overrides
    FlaxEditor.GUI.CurveEditorBase.GetKeyframes()

    GetKeyframeTangentInternal(Int32, Boolean, Int32)

    Gets the keyframe tangent value (internally).

    Declaration
    protected override float GetKeyframeTangentInternal(int index, bool isIn, int component)
    Parameters
    System.Int32 index

    The keyframe index.

    System.Boolean isIn

    True if tangent is In, otherwise it's Out.

    System.Int32 component

    The value component index.

    Returns
    System.Single

    The tangent component value.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.GetKeyframeTangentInternal(System.Int32, System.Boolean, System.Int32)

    GetKeyframeTime(Int32)

    Gets the time of the keyframe.

    Declaration
    protected override float GetKeyframeTime(int index)
    Parameters
    System.Int32 index

    The keyframe index.

    Returns
    System.Single

    The keyframe time.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.GetKeyframeTime(System.Int32)

    GetKeyframeTime(Object)

    Gets the time of the keyframe.

    Declaration
    protected override float GetKeyframeTime(object keyframe)
    Parameters
    System.Object keyframe

    The keyframe object.

    Returns
    System.Single

    The keyframe time.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.GetKeyframeTime(System.Object)

    GetKeyframeValue(Object)

    Gets the value of the keyframe.

    Declaration
    protected override T GetKeyframeValue(object keyframe)
    Parameters
    System.Object keyframe

    The keyframe object.

    Returns
    T

    The keyframe value.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.GetKeyframeValue(System.Object)

    GetKeyframeValue(Object, Int32)

    Gets the value of the keyframe (single component).

    Declaration
    protected override float GetKeyframeValue(object keyframe, int component)
    Parameters
    System.Object keyframe

    The keyframe object.

    System.Int32 component

    The keyframe value component index.

    Returns
    System.Single

    The keyframe component value.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.GetKeyframeValue(System.Object, System.Int32)

    OnDestroy()

    Method called when managed instance should be destroyed

    Declaration
    public override void OnDestroy()
    Overrides
    FlaxEditor.GUI.CurveEditor<T>.OnDestroy()

    OnKeyframesChanged()

    Called when keyframes collection gets changed (keyframe added or removed).

    Declaration
    protected override void OnKeyframesChanged()
    Overrides
    FlaxEditor.GUI.CurveEditor<T>.OnKeyframesChanged()

    OnKeyframesGet(String, Action<String, Single, Object>)

    Declaration
    public override void OnKeyframesGet(string trackName, Action<string, float, object> get)
    Parameters
    System.String trackName

    System.Action<System.String, System.Single, System.Object> get

    Overrides
    FlaxEditor.GUI.CurveEditorBase.OnKeyframesGet(System.String, System.Action<System.String, System.Single, System.Object>)

    OnKeyframesSet(List<KeyValuePair<Single, Object>>)

    Declaration
    public override void OnKeyframesSet(List<KeyValuePair<float, object>> keyframes)
    Parameters
    System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.Single, System.Object>> keyframes

    Overrides
    FlaxEditor.GUI.CurveEditorBase.OnKeyframesSet(System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.Single, System.Object>>)

    OnShowContextMenu(ContextMenu, Int32)

    Called when showing a context menu. Can be used to add custom buttons with actions.

    Declaration
    protected override void OnShowContextMenu(ContextMenu cm, int selectionCount)
    Parameters
    FlaxEditor.GUI.ContextMenu.ContextMenu cm

    The menu.

    System.Int32 selectionCount

    The amount of selected keyframes.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.OnShowContextMenu(FlaxEditor.GUI.ContextMenu.ContextMenu, System.Int32)

    RemoveKeyframesInternal(HashSet<Int32>)

    Removes the keyframes data (internally).

    Declaration
    protected override void RemoveKeyframesInternal(HashSet<int> indicesToRemove)
    Parameters
    System.Collections.Generic.HashSet<System.Int32> indicesToRemove

    The list of indices of the keyframes to remove.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.RemoveKeyframesInternal(System.Collections.Generic.HashSet<System.Int32>)

    SetKeyframeInternal(Int32, Object)

    Sets the keyframe data (internally).

    Declaration
    protected override void SetKeyframeInternal(int index, object keyframe)
    Parameters
    System.Int32 index

    The keyframe index.

    System.Object keyframe

    The keyframe to set.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.SetKeyframeInternal(System.Int32, System.Object)

    SetKeyframeInternal(Int32, Single, Single, Int32)

    Sets the keyframe data (internally).

    Declaration
    protected override void SetKeyframeInternal(int index, float time, float value, int component)
    Parameters
    System.Int32 index

    The keyframe index.

    System.Single time

    The time to set.

    System.Single value

    The value to set.

    System.Int32 component

    The value component.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.SetKeyframeInternal(System.Int32, System.Single, System.Single, System.Int32)

    SetKeyframes(IEnumerable<BezierCurve<T>.Keyframe>)

    Sets the keyframes collection.

    Declaration
    public void SetKeyframes(IEnumerable<BezierCurve<T>.Keyframe> keyframes)
    Parameters
    System.Collections.Generic.IEnumerable<BezierCurve.Keyframe<>> keyframes

    The keyframes.

    SetKeyframes(Object[])

    Declaration
    public override void SetKeyframes(object[] keyframes)
    Parameters
    System.Object[] keyframes

    Overrides
    FlaxEditor.GUI.CurveEditorBase.SetKeyframes(System.Object[])

    SetKeyframeTangentInternal(Int32, Boolean, Int32, Single)

    Sets the keyframe tangent value (internally).

    Declaration
    protected override void SetKeyframeTangentInternal(int index, bool isIn, int component, float value)
    Parameters
    System.Int32 index

    The keyframe index.

    System.Boolean isIn

    True if tangent is In, otherwise it's Out.

    System.Int32 component

    The value component index.

    System.Single value

    The tangent component value.

    Overrides
    FlaxEditor.GUI.CurveEditor<T>.SetKeyframeTangentInternal(System.Int32, System.Boolean, System.Int32, System.Single)

    SetKeyframeValue(Int32, Object)

    Declaration
    public override void SetKeyframeValue(int index, object value)
    Parameters
    System.Int32 index

    System.Object value

    Overrides
    FlaxEditor.GUI.CurveEditorBase.SetKeyframeValue(System.Int32, System.Object)

    SetKeyframeValue(Int32, Object, Object, Object)

    Declaration
    public override void SetKeyframeValue(int index, object value, object tangentIn, object tangentOut)
    Parameters
    System.Int32 index

    System.Object value

    System.Object tangentIn

    System.Object tangentOut

    Overrides
    FlaxEditor.GUI.CurveEditorBase.SetKeyframeValue(System.Int32, System.Object, System.Object, System.Object)

    SetScaleInternal(ref Float2)

    Sets the scale and updates the transform.

    Declaration
    protected override void SetScaleInternal(ref Float2 scale)
    Parameters
    Float2 scale

    The scale.

    Overrides
    Control.SetScaleInternal(ref Float2)

    UpdateFPS()

    Updates the keyframes to match the FPS.

    Declaration
    protected override void UpdateFPS()
    Overrides
    FlaxEditor.GUI.CurveEditor<T>.UpdateFPS()

    UpdateKeyframes()

    Declaration
    public override void UpdateKeyframes()
    Overrides
    FlaxEditor.GUI.CurveEditorBase.UpdateKeyframes()

    UpdateTangents()

    Declaration
    public override void UpdateTangents()
    Overrides
    FlaxEditor.GUI.CurveEditorBase.UpdateTangents()

    Extension Methods

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

    See Also

    BezierCurve<T>
    CurveEditor<T>
    FlaxEditor.GUI.CurveEditorBase
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat