# Introduction

A package providing interactivity to Frames (coordinate systems) allowing picking and motion control of objects. Dandelion supports different interaction mechanisms, including the standard mouse and keyboard, but it is not particularly tie to any of them, i.e., it’s device agnostic by design. Frames may be attached not only to user-space objects (thus controlling their motion), but to the Eye to control the Scene viewpoint. The powerful Frame API allows transforming points and vectors among different Frame instances, thus providing means to easily implement Scene-Graphs.

# Action-driven package

The whole package is based on a pre-defined (pre-implemented) action set whose elements can be related to different interaction mechanisms, simply according to their degrees-of-freedom (DOFs). DOFs provide a nice interface between (motion) actions and input data, representing a convenient abstraction layer for it. Dandelion actions are thus grouped together according to their DOFs in the following sub-sets:

1. ClickActions, that may be triggered when a button is clicked.
2. KeyboardActions, that may be triggered when a key is pressed.
3. WheelActions, that may be triggered when a wheel event occurred.
4. DOF2Actions, that may be triggered when a DOF2 gesture is captured (such as a mouse button drag).
5. DOF3Actions, that may be triggered when a DOF3 gesture is captured (such those performed with some joystics).
6. DOF6Actions, that may be triggered when a DOF6 gesture is captured (such those performed with a kinect).

Sub-group constitutions with their individual action descriptions are available here.

This action-driven design allows to easily support all sorts of interaction mechanisms, such as when adding an HID, without having the need to re-implement any of the supported actions.

# Usage

Third party (concrete) Scenes should derive from the AbstractScene and then:

1. (Optionally) Define a custom matrixHelper, only if the target platform (such as Processing) provides its own matrix handling.
2. Call setEye(Eye) to set the eye(), once it’s known if the Scene is2D() or is3D().
3. Instantiate the (default) motionAgent and keyboardAgent.
4. (Optionally) When willing to use non-standard intertaction means (such as the kinect): Instantiate some agents and register them at the inputHandler().
5. Define whether or not the Scene isOffscreen().
6. Call init() at the end of the constructor.

finally, implement all the abstract methods which mainly deals with how the visual hints are drawn.

For an example, please refer to ProScene which provides a Processing implementation of Dandelion.

# Hacking

The package is developed as a git subtree (see also “here”). It should thus be made part of a bigger (container) project (like ProScene, see Figure 1). The package dependencies are BIAS, FPSTiming and util (package based on Daniel Bell gwt-hashcode-equals which provides hashCode(), equals() and clone() Java implementations compatible with gwt). Note that BIAS, FPSTIMING and UTIL are distributed as another git subtrees.

## Initial setup

First (and only) time setup. Here <my_repo> is the project repo where you plan to include the DANDELION, FPSTIMING, BIAS and UTIL trees.

Now git push will push the trees into your remote repo. From now on you will be able to use your repo as any other basic git repo:

(do the initial setup above first)

Clone the repo and add the remotes: