> Indeed, this is what we've done :-)
 >
 > Now, the exact same application can be used either in the CAVE or on
 >  a standard screen.  There's a bit of a kludge, since I have to
 > register the AWT Component with the MouseInputDevice explicitly in
 > the application.
 >
 > i.e. // u is the configured universe object Viewer[] viewers =
 > u.getViewers(); for(int j = 0; j < viewers.length; j++){
for(java.util.Enumeration
 >  e = viewers[j].getPhysicalEnvironment().getAllInputDevices();
e.hasMoreElements();){
 >

 > InputDevice device = (InputDevice) e.nextElement(); if (device !=
 > null && device instanceof
 > org.j3d.device.input.spaceball.MouseInputDevice ) { for(int i = 0;
 > i < canvases.length; i++){
((org.j3d.device.input.spaceball.MouseInputDevice)
 >  device).attachToComponent(canvases[i]); } } } }
 >
 > If the MouseInputDevice can be handed a view or PhysicalEnvironment
 > and find the Components itself it'd be completely transparent to the
application what input device is used [hint hint Paul :-)].
 >

When I was writing the code I had in mind that Canvas3D can be "opened"
and "closed" by the user and only certain Canvases should react to the
mouse input. I was not thinking of a VR environment like a CAVE with a
static number of Views.
Class View gives access to its Canvas3Ds. I could add a Constructor for
the MouseInputDevice taking an array of Views.
Is this what you would suggest. Or do you have something else in mind ?
Rememeber however View allows adding new Canvas3Ds. This Canvases still
have to be registered with the attachComponent method. And all Canvas3ds
have to be added to View before creating a MouseInputDevice.

regards
Paul

PS: Cool that you are using my stuff. Was it easy to find out how the
classes work together and how they have to be added to the scene ? Any
comments welcome.

PPS: Justin, when will you release the next zipped version of the code
archive ?

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to