Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    UIRenderFeature Class

    Namespace: Stride.Rendering.UI
    Assembly: Stride.UI.dll
    System.Object → DisposeBase → ComponentBase → RenderFeature → RootRenderFeature → UIRenderFeature
    Derived from UIRenderFeature:

    public class UIRenderFeature : RootRenderFeature, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
    Name Description
    Constructors
    UIRenderFeature()
    Properties
    SupportedRenderObjectType
    UIElementUnderMouseCursor

    Represents the UI-element thats currently under the mouse cursor. Only elements with CanBeHitByUser == true are taken into account. Last processed element_state / ?UIComponent? with a valid element will be used.

    Methods
    Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)
    GetElementAtScreenPosition(UIElement, ref Ray, ref Matrix, ref Vector3)

    Gets the element with which the clickRay intersects, or null if none is found

    GetElementsAtPosition(UIElement, ref Ray, ref Matrix)

    Gets all elements that the given ray intersects.

    GetRenderer(UIElement)
    InitializeCore()
    RegisterRenderer(UIElement, ElementRenderer)
    RegisterRendererFactory(Type, IElementRendererFactory)
    | Improve this Doc View Source

    Constructors


    UIRenderFeature()

    public UIRenderFeature()
    | Improve this Doc View Source

    Properties


    SupportedRenderObjectType

    public override Type SupportedRenderObjectType { get; }
    Property Value
    Type Description
    System.Type
    Overrides
    RootRenderFeature.SupportedRenderObjectType

    UIElementUnderMouseCursor

    Represents the UI-element thats currently under the mouse cursor. Only elements with CanBeHitByUser == true are taken into account. Last processed element_state / ?UIComponent? with a valid element will be used.

    public UIElement UIElementUnderMouseCursor { get; }
    Property Value
    Type Description
    UIElement
    | Improve this Doc View Source

    Methods


    Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)

    public override void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage, int startIndex, int endIndex)
    Parameters
    Type Name Description
    RenderDrawContext context
    RenderView renderView
    RenderViewStage renderViewStage
    System.Int32 startIndex
    System.Int32 endIndex
    Overrides
    RenderFeature.Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)

    GetElementAtScreenPosition(UIElement, ref Ray, ref Matrix, ref Vector3)

    Gets the element with which the clickRay intersects, or null if none is found

    public static UIElement GetElementAtScreenPosition(UIElement rootElement, ref Ray clickRay, ref Matrix worldViewProj, ref Vector3 intersectionPoint)
    Parameters
    Type Name Description
    UIElement rootElement

    The root UIElement from which it should test

    Ray clickRay

    Ray from the click in object space of the ui component in (-Resolution.X/2 .. Resolution.X/2, -Resolution.Y/2 .. Resolution.Y/2) range

    Matrix worldViewProj
    Vector3 intersectionPoint

    Intersection point between the ray and the element

    Returns
    Type Description
    UIElement

    The UIElement with which the ray intersects


    GetElementsAtPosition(UIElement, ref Ray, ref Matrix)

    Gets all elements that the given ray intersects.

    public static ICollection<UIRenderFeature.HitTestResult> GetElementsAtPosition(UIElement rootElement, ref Ray ray, ref Matrix worldViewProj)
    Parameters
    Type Name Description
    UIElement rootElement

    The root UIElement from which it should test

    Ray ray

    Ray from the click in object space of the ui component in (-Resolution.X/2 .. Resolution.X/2, -Resolution.Y/2 .. Resolution.Y/2) range

    Matrix worldViewProj
    Returns
    Type Description
    System.Collections.Generic.ICollection<UIRenderFeature.HitTestResult>

    A collection of all elements hit by this ray, or an empty collection if no hit.


    GetRenderer(UIElement)

    public ElementRenderer GetRenderer(UIElement element)
    Parameters
    Type Name Description
    UIElement element
    Returns
    Type Description
    ElementRenderer

    InitializeCore()

    protected override void InitializeCore()
    Overrides
    RenderFeature.InitializeCore()

    RegisterRenderer(UIElement, ElementRenderer)

    public void RegisterRenderer(UIElement element, ElementRenderer renderer)
    Parameters
    Type Name Description
    UIElement element
    ElementRenderer renderer

    RegisterRendererFactory(Type, IElementRendererFactory)

    public void RegisterRendererFactory(Type uiElementType, IElementRendererFactory factory)
    Parameters
    Type Name Description
    System.Type uiElementType
    IElementRendererFactory factory

    Inherited Members

    RootRenderFeature.RenderData
    RootRenderFeature.Index
    RootRenderFeature.SortKey
    RootRenderFeature.RenderObjects
    RootRenderFeature.ObjectNodeReferences
    RootRenderFeature.RenderNodes
    RootRenderFeature.RenderStageSelectors
    RootRenderFeature.Unload()
    RootRenderFeature.GetRenderNode(RenderNodeReference)
    RootRenderFeature.GetViewObjectNode(ViewObjectNodeReference)
    RootRenderFeature.GetObjectNode(ObjectNodeReference)
    RootRenderFeature.CreateViewObjectNode(RenderView, RenderObject)
    RootRenderFeature.OnAddRenderObject(RenderObject)
    RootRenderFeature.OnRemoveRenderObject(RenderObject)
    RootRenderFeature.Reset()
    RootRenderFeature.PrepareDataArrays()
    RootRenderFeature.ComputeDataArrayExpectedSize(DataType)
    RenderFeature.Context
    RenderFeature.RenderSystem
    RenderFeature.Initialized
    RenderFeature.Enabled
    RenderFeature.Initialize(RenderContext)
    RenderFeature.Destroy()
    RenderFeature.Collect()
    RenderFeature.Extract()
    RenderFeature.PrepareEffectPermutations(RenderDrawContext)
    RenderFeature.Prepare(RenderDrawContext)
    RenderFeature.Draw(RenderDrawContext, RenderView, RenderViewStage)
    RenderFeature.Flush(RenderDrawContext)
    RenderFeature.OnRenderSystemChanged()
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation