< Zurück | Inhalt | Weiter >

11.7 Using mouse behaviors

A mouse behavior is typically used to allow the user to interactively manipulate a graphical object within a 3D scene. Using a standard 2D mouse as a 3D input device can be problematic and has been extensively studied by human computer interaction (HCI) experts. Although I don’t think that anyone could claim that any of the techniques are intuitive, a number of usable standards have emerged for translating mouse movements into changes in translation, rotation, and scale in three dimensions.


If you decide to use the standard 2D mouse as a 3D input device, I suggest you review the literature and study the 3D applications that your target audience is likely to be familiar with. Emulate the paradigms that your users are experienced with wherever possible—it is unlikely that your application is so unique that no one has previously encountered your UI problems.


The simplest way to implement direct manipulation using the mouse is to use Java 3D’s built−in mouse behaviors. Be aware, however, that this is only one solution to a problem that is an ongoing research topic.


As an aside, you can also purchase a 3D mouse, which is a virtual reality input device that can track its position within three dimensions. The 3D mice fall outside the scope (and budget) of this text; however, it should be possible to integrate them with Java 3D using the Java 3D Sensor architecture.


 

Java 3D and the mouse
Building improved mouse behaviors
Example usage of the new behaviors, from MouseNavigateTest.java