Class SceneInteractionHandler
Needed for adding interactions/events to objects in the scene graph. Traverses the scene via a ScenePicker and invokes the necessary events.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Gui
Assembly: Fusee.Engine.Gui.dll
Syntax
public class SceneInteractionHandler : Visitor<SceneNode, SceneComponent>
Constructors
SceneInteractionHandler(SceneContainer)
Initializes a new instance of the SceneInteractionHandler class.
Declaration
public SceneInteractionHandler(SceneContainer scene)
Parameters
Type | Name | Description |
---|---|---|
SceneContainer | scene | The scene the interaction handler belongs to. |
Methods
CheckForInteractiveObjects(RenderContext, float2, Int32, Int32)
Picks at the mouse position and traverses the picked objects components. If a corresponding component is found the suitable visit method is called which invokes the event.
Declaration
public void CheckForInteractiveObjects(RenderContext rc, float2 mousePos, int canvasWidth, int canvasHeight)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | rc | The RenderContext, used for picking operations. |
float2 | mousePos | The current mouse position. |
System.Int32 | canvasWidth | Canvas width - needed to determine the mouse position in clip space. |
System.Int32 | canvasHeight | Canvas height - needed to determine the mouse position in clip space. |
InvokeInteraction(GuiButton)
Invokes an interaction on a given button.
Declaration
public void InvokeInteraction(GuiButton btn)
Parameters
Type | Name | Description |
---|---|---|
GuiButton | btn | The button to invoke an interaction on. |