The deprecated mouse event method still works for me (proscene), i.e., parent.registerMouseEvent, but no the parent.registerKeyEvent, as I'm getting the following runtime error:
Exception in thread "Animation Thread" java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1076) at processing.core.PApplet.handleKeyEvent(PApplet.java:2848) at processing.core.PApplet.dequeueKeyEvents(PApplet.java:2793) at processing.core.PApplet.handleDraw(PApplet.java:2132)
The main goal of the upcoming final release is to add support for Human Interface Devices (HID) with six (or less) degrees-of-freedom to control both, the camera and any interactive frame attached to the scene. It's achieved by declaring an HIDevice and "feed" it with the output generated by the physical device reported by a third party hardware controller. Details are given here.
I was able to test it only with a 3d space navigator and it works fine (only for Windows, as procontroll seems to be broken for Linux and haven't tested it under Mac). I wish to test it with other devices, such as the wii or the kinect (which I don't have access to). It would be great if people playing with this devices (or similar) under Processing can give it a try. Detailed instructions regarding how to set up your scene are given here.
New scene external draw handler registration (see the Scene documentation for details).
New analytical computation of the frustum planes equations which enables view frustum culling against the proscene camera.
New THIRD_PERSON camera mode.
New registration of the keyboard and mouse handlers which provides tighter integration with processing. It also means that proscene enabled sketches comprises even less code.
New examples: Flock, StandardCamera, ThirdPersonCamera and ViewFrustumCulling.
Code polishing.
Developed and fully tested in Processing-1.2.1 under x86_64 GNU/Linux (Kubuntu-10.04).
Your suggestions (new features wanted, bugs found, etc.) are more than welcome. I'm interested in knowing which projects are using proscene. Please let me know it if this is the case.
I'm working on the next version of the
proscene library and I want to implement my drawing and event handling methods using the processing register mechanism discussed
here (which I found pretty neat and useful
). I have two questions:
1. I have no problem with the keyboard and the main mouse events, but Is there a way to handle the mouse wheel? Otherwise I need to declare my main class as:
public class Scene implements MouseWheelListener, PConstants { ...
which I read is discouraged.
2. I have some drawing stuff that I also want to register at the papplet (in order to avoid the scene.beginDraw()/scene.endDraw() calls when using my library). However, if I register my drawing at the pre() nothing gets drawn. If I register it at the draw(), it gets drawn but I get some visual artifacts. I would like to try my drawing at the pre() (or just before the papplet draw() method is called) to check if it works fine and I was wondering if it is possible?