Class UIRenderFeature
public class UIRenderFeature : RootRenderFeature, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
- Inheritance
-
UIRenderFeature
- Implements
- Inherited Members
- Extension Methods
Constructors
UIRenderFeature()
public UIRenderFeature()
Properties
SupportedRenderObjectType
Gets the type of render object supported by this RootRenderFeature.
public override Type SupportedRenderObjectType { get; }
Property Value
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
Methods
Draw(RenderDrawContext, RenderView, RenderViewStage, int, int)
Performs GPU updates and/or draw.
public override void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage, int startIndex, int endIndex)
Parameters
context
RenderDrawContextrenderView
RenderViewrenderViewStage
RenderViewStagestartIndex
intendIndex
int
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
rootElement
UIElementThe root UIElement from which it should test
clickRay
RayRay from the click in object space of the ui component in (-Resolution.X/2 .. Resolution.X/2, -Resolution.Y/2 .. Resolution.Y/2) range
worldViewProj
MatrixintersectionPoint
Vector3Intersection point between the ray and the element
Returns
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
rootElement
UIElementThe root UIElement from which it should test
ray
RayRay from the click in object space of the ui component in (-Resolution.X/2 .. Resolution.X/2, -Resolution.Y/2 .. Resolution.Y/2) range
worldViewProj
Matrix
Returns
- 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
element
UIElement
Returns
InitializeCore()
Initializes this instance. Query for specific cbuffer (either new one, like PerMaterial, or parts of an existing one, like PerObject=>Skinning)
protected override void InitializeCore()
RegisterRenderer(UIElement, ElementRenderer)
public void RegisterRenderer(UIElement element, ElementRenderer renderer)
Parameters
element
UIElementrenderer
ElementRenderer
RegisterRendererFactory(Type, IElementRendererFactory)
public void RegisterRendererFactory(Type uiElementType, IElementRendererFactory factory)
Parameters
uiElementType
Typefactory
IElementRendererFactory