Hi
I'm trying to set up a view with to canvas3D attached which should
be showed in two screens (left and right).
My problem is that when I modify the view TransformGroup the objects in
the scene seems to be stretched in the x-direction as they move from
left to right.
I suspect that the problem can be that I create the two
Canvas3D with the same GraphicsConfiguration object...
Anybody who can see what I'm doing wrong?
Thanks in advance
Svein T. Edvardsen
Here is my code:
GraphicsConfigTemplate3D tmpl = new GraphicsConfigTemplate3D();
GraphicsEnvironment graphicsEnv =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice device = graphicsEnv.getDefaultScreenDevice();
GraphicsConfiguration config = device.getBestConfiguration(tmpl);
leftCanvas3D = new Canvas3D(config);
Screen3D leftScreen = leftCanvas3D.getScreen3D();
//set the physical width and height of the screen
leftScreen.setPhysicalScreenWidth(physicalScreenWidth);
leftScreen.setPhysicalScreenHeight(physicalScreenHeight);
//set the center of coexistence to the center between the screens
Transform3D leftTrackerBaseToImagePlateT3D = new Transform3D();
Vector3d leftTranslateV3d = new Vector3d(physicalScreenWidth,
physicalScreenHeight/2 ,0);
leftTrackerBaseToImagePlateT3D.set(leftTranslateV3d);
leftScreen.setTrackerBaseToImagePlate(leftTrackerBaseToImagePlateT3D);
rightCanvas3D = new Canvas3D(config);
Screen3D rightScreen = rightCanvas3D.getScreen3D();
//set the physical width and height of the screen
rightScreen.setPhysicalScreenWidth(physicalScreenWidth);
rightScreen.setPhysicalScreenHeight(physicalScreenHeight);
//set the center of coexistence to the center between the screens
Transform3D rightTrackerBaseToImagePlateT3D = new Transform3D();
Vector3d rightTranslateV3d = new Vector3d(0,
physicalScreenHeight/2 ,0);
rightTrackerBaseToImagePlateT3D.set(rightTranslateV3d);
rightScreen.setTrackerBaseToImagePlate(rightTrackerBaseToImagePlateT3D);
viewPlatform = new ViewPlatform();
viewPlatform.setViewAttachPolicy(View.NOMINAL_SCREEN);
viewT3D = new Transform3D();
viewTG = new TransformGroup();
/* set capabilities on view transformgroup */
viewTG.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
viewTG.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
body = new PhysicalBody();
env = new PhysicalEnvironment();
env.setCoexistenceCenterInPworldPolicy(View.NOMINAL_SCREEN);//default
view = new View();
//set up view for a room mounted system with multiple (two) screens
view.setViewPolicy(View.SCREEN_VIEW);
view.setWindowEyepointPolicy(View.RELATIVE_TO_COEXISTENCE);
view.setWindowMovementPolicy(View.VIRTUAL_WORLD);
view.setWindowResizePolicy(View.VIRTUAL_WORLD);
view.setCoexistenceCenteringEnable(false);
//set up the viewers eyes relative to the center of coexistence
view.setLeftManualEyeInCoexistence(new
Point3d(-(eyeSeparation/2), 0.0, viewerDistanceFromScreen));
view.setRightManualEyeInCoexistence(new Point3d(eyeSeparation/2,
0.0, viewerDistanceFromScreen));
view.addCanvas3D(leftCanvas3D);
view.addCanvas3D(rightCanvas3D);
view.setBackClipDistance(200);
view.setFrontClipDistance(0.1);
view.setPhysicalBody(body);
view.setPhysicalEnvironment(env);
view.attachViewPlatform(viewPlatform);
viewTG.setTransform(viewT3D);
viewTG.addChild(viewPlatform);
===========================================================================
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".