here is a little code snippet from my virtual world work with java3d
if you want to move the view around with mouse behavior and key navigator, use
the cameratransform as your transform group to send to them.
You must create your own viewplatform and put it under a transform that you
control. This is where you will always be looking.
ViewPlatform vp = new ViewPlatform();
//reset the camera and the position transforms
mCameraTransform = new TransformGroup();
mCameraTransform.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
mCameraTransform.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);
mCameraTransform.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND);
mCameraTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
mCameraTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
Transform3D td = new Transform3D();
//the avatar should be about 5 foot 11
//or, in meters, 1.56
td.setTranslation(new Vector3d(0,1.56,0));
mCameraTransform.setTransform(td);
mCameraTransform.addChild(vp);
//vpTGRoot.addChild(vp);
sceneRoot.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
sceneRoot.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);
sceneRoot.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);
sceneRoot.addChild(vpBGRoot);
sceneRoot.addChild(mCameraTransform);
ViewingPlatform viewplat = new ViewingPlatform();
viewplat.setViewPlatform(vp);
s_u = new SimpleUniverse(s_c);
s_u.getViewer().setViewingPlatform(viewplat);
s_u.getViewer().getView().setBackClipDistance(100000);
s_u.addBranchGraph(sceneRoot);
Scott Decker
Research Scientist
Pacific Northwest National Labs
[EMAIL PROTECTED]
please feed the squirrels
===========================================================================
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".