Class ScenePicker
Implements the scene picker.
Inheritance
Implements
Inherited Members
Namespace: Fusee.Engine.Core
Assembly: Fusee.Engine.Core.dll
Syntax
public class ScenePicker : Viserator<PickResult, ScenePicker.PickerState, SceneNode, SceneComponent>, IEnumerator<PickResult>, IEnumerator, IDisposable
Constructors
ScenePicker(SceneContainer)
The constructor to initialize a new ScenePicker.
Declaration
public ScenePicker(SceneContainer scene)
Parameters
Type | Name | Description |
---|---|---|
SceneContainer | scene | The SceneContainer to pick from. |
Properties
PickPosClip
The pick position on the screen.
Declaration
public float2 PickPosClip { get; set; }
Property Value
Type | Description |
---|---|
float2 |
Projection
The current projection matrix.
Declaration
public float4x4 Projection { get; }
Property Value
Type | Description |
---|---|
float4x4 |
View
The current view matrix.
Declaration
public float4x4 View { get; }
Property Value
Type | Description |
---|---|
float4x4 |
Methods
InitState()
This method is called when traversal starts to initialize the traversal state.
Declaration
protected override void InitState()
Overrides
Pick(RenderContext, float2)
Returns a collection of objects that fall in the area of the pick position and that can be iterated over.
Declaration
public IEnumerable<PickResult> Pick(RenderContext rc, float2 pickPos)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | rc | |
float2 | pickPos | The pick position. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PickResult> |
PickMesh(Mesh)
Creates pick results from a given mesh if it is within the pick position.
Declaration
public void PickMesh(Mesh mesh)
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The given Mesh. |
RenderCanvasTransform(CanvasTransform)
Sets the state of the model matrices and UiRects.
Declaration
public void RenderCanvasTransform(CanvasTransform ctc)
Parameters
Type | Name | Description |
---|---|---|
CanvasTransform | ctc | The CanvasTransformComponent. |
RenderRectTransform(RectTransform)
If a RectTransformComponent is visited the model matrix and MinMaxRect get updated in the RendererState.
Declaration
public void RenderRectTransform(RectTransform rtc)
Parameters
Type | Name | Description |
---|---|---|
RectTransform | rtc | The XFormComponent. |
RenderTransform(Transform)
If a TransformComponent is visited the model matrix of the RenderContext and RendererState is updated. It additionally updates the view matrix of the RenderContext.
Declaration
public void RenderTransform(Transform transform)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The TransformComponent. |
RenderXForm(XForm)
If a XFormComponent is visited the model matrix gets updated in the RendererState and set in the RenderContext.
Declaration
public void RenderXForm(XForm xfc)
Parameters
Type | Name | Description |
---|---|---|
XForm | xfc | The XFormComponent. |
RenderXFormText(XFormText)
If a XFormTextComponent is visited the model matrix gets updated in the RendererState and set in the RenderContext.
Declaration
public void RenderXFormText(XFormText xfc)
Parameters
Type | Name | Description |
---|---|---|
XFormText | xfc | The XFormTextComponent. |