Show / Hide Table of Contents

Class SceneInteractionHandler

Needed for adding interactions/events to objects in the scene graph. Traverses the scene via a ScenePicker and invokes the necessary events.

Inheritance
System.Object
Visitor<SceneNode, SceneComponent>
SceneInteractionHandler
Inherited Members
Visitor<SceneNode, SceneComponent>.IgnoreInactiveComponents
Visitor<SceneNode, SceneComponent>.Traverse(SceneNode)
Visitor<SceneNode, SceneComponent>.Traverse(IEnumerable<SceneNode>)
Visitor<SceneNode, SceneComponent>.InitState()
Visitor<SceneNode, SceneComponent>.PushState()
Visitor<SceneNode, SceneComponent>.PopState()
Visitor<SceneNode, SceneComponent>.CurrentNode
Visitor<SceneNode, SceneComponent>.CurrentComponent
Visitor<SceneNode, SceneComponent>.YieldOnCurrentNode
Visitor<SceneNode, SceneComponent>.YieldOnCurrentComponent
Visitor<SceneNode, SceneComponent>.YieldEnumeration
Visitor<SceneNode, SceneComponent>.EnumInit(IEnumerator<SceneNode>)
Visitor<SceneNode, SceneComponent>.EnumMoveNext()
Visitor<SceneNode, SceneComponent>.EnumMoveNextNoComponent()
Visitor<SceneNode, SceneComponent>.VisitorModules
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.

Generated by DocFX
GitHub Repo
Back to top