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.

1
2
3
4
5
6
7
8
9
10
git clone <my_repo>
cd <my_repo>
git remote add -f dandelion https://github.com/remixlab/dandelion_tree.git
git subtree add --prefix src/remixlab/dandelion dandelion master --squash
git remote add -f fpstiming https://github.com/remixlab/fpstiming_tree.git
git subtree add --prefix src/remixlab/dandelion dandelion master --squash
git remote add -f bias https://github.com/remixlab/bias_tree.git
git subtree add --prefix src/remixlab/bias bias master --squash
git remote add -f util https://github.com/remixlab/util_tree.git
git subtree add --prefix src/remixlab/util util master --squash

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:

1
2
3
4
5
#clone it:
git clone <my_repo>
cd <my_repo>
#If you want to submit changes to some the trees please
#refer to: https://help.github.com/articles/using-pull-requests

Read-write access setup (only for developers who have been granted read-write access to the trees)

(do the initial setup above first)

Clone the repo and add the remotes:

1
2
3
4
5
6
git clone <my_repo>
cd <my_repo>
git remote add -f dandelion https://github.com/remixlab/dandelion_tree.git
git remote add -f fpstiming https://github.com/remixlab/fpstiming_tree.git
git remote add -f bias https://github.com/remixlab/bias_tree.git
git remote add -f util https://github.com/remixlab/util_tree.git

To update your DANDELION subtree:

1
2
3
4
5
6
#fetching command:
git fetch dandelion master
git subtree pull --prefix src/remixlab/dandelion dandelion maAn {@link #inputHandler()} which handles all user input through {@link remixlab.bias.core.Agent}s (for details
 * please refer to the {@link remixlab.bias.core.InputHandler} class). The {@link #inputHandler()} holds a (default)
 * {@link #motionAgent()} and a (default) {@link #keyboardAgent()} which should be instantiated by derived classes at
 * construction time.ster --squash

To update your BIAS subtree:

1
2
3
#fetching command:
git fetch bias master
git subtree pull --prefix src/remixlab/bias bias master --squash

To update your FPSTIMING subtree:

1
2
3
#fetching command:
git fetch fpstiming master
git subtree pull --prefix src/remixlab/fpstiming fpstiming master --squash

To update your UTIL subtree:

1
2
3
#fetching command:
git fetch util master
git subtree pull --prefix src/remixlab/util util master --squash

To contribute to the main project:

1
git push

To contribute to the DANDELION subtree:

1
git subtree push --prefix=src/remixlab/dandelion dandelion master

To contribute to the BIAS subtree:

1
git subtree push --prefix=src/remixlab/bias bias master

To contribute to the UTIL subtree:

1
git subtree push --prefix=src/remixlab/util util master