Hi . you must disable the call to setNominalViewingTransform(); or you camera will go back to old value ;-) And you also must get your viewing platform from your simpleUniverse as show below
Try this time:
SimpleUniverse simpleU = new SimpleUniverse(canvas3D); BranchGroup scene = createSceneGraph(canvas3D, simpleU); scene.compile();
Transform3D t3d = new Transform3D(); double viewDistance = 10.0; t3d.set(new Vector3d(0.0, 0.0, viewDistance)); simpleU.getViewingPlatform().getViewPlatformTransform().setTransform(t3d);
// disable below line or the above lines will lost effect // simpleU.getViewingPlatform().setNominalViewingTransform(); simpleU.addBranchGraph(scene); }
Alessandro
Zack FC escreveu:
Hi, thanks Alessandro
SimpleUniverse simpleU = new SimpleUniverse(canvas3D); BranchGroup scene = createSceneGraph(canvas3D, simpleU); scene.compile();
Transform3D t3d = new Transform3D(); double viewDistance = 10.0; t3d.set(new Vector3d(0.0, 0.0, viewDistance)); viewingPlatform.getViewPlatformTransform().setTransform(t3d);
simpleU.getViewingPlatform().setNominalViewingTransform(); simpleU.addBranchGraph(scene); }
still got error. how to fix it?Please help..
Faithfully, Zack
Alessandro Borges <[EMAIL PROTECTED]> wrote:
Try
Transform3D t3d = new Transform3D(); double viewDistance = myZDistance; // put your double Z value here. t3d.set(new Vector3d(0.0, 0.0, viewDistance)); viewingPlatform.getViewPlatformTransform().setTransform(t3d);
Alessandro
Zack FC escreveu:
> Hi, > How to manually set the eye position? I want to make the z position > fear a bit. I try to put some value inside and it display a error message: > > setNominalViewingTransform() in > com.sun.j3d.utils.universe.ViewingPlatform cannot be applied to > (double,double,double) > > Please help... > > Faithfully, > Zack > > > ------------------------------------------------------------------------ > Do you Yahoo!? > Yahoo! Platinum > > - Watch CBS' NCAA March Madness, live on your desktop > !
=========================================================================== 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".
------------------------------------------------------------------------ Do you Yahoo!? Yahoo! Platinum <http://rd.yahoo.com/platinum/evt=8162/*http://platinum.yahoo.com/splash.html> - Watch CBS' NCAA March Madness, live on your desktop <http://rd.yahoo.com/platinum/evt=8162/*http://platinum.yahoo.com/splash.html>!
=========================================================================== 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".
