very nice, thank youy Anthony have a good day,
Burrows Anthony wrote: >Hi >If you know the original view platform transform, you can simply have a >method which sets the VPT back to the original start value, for example, >from some of my code (note that you must set the transform write capability: > >protected BranchGroup addViewBranch(Canvas3D canvas) { > BranchGroup viewBranch = new BranchGroup(); > viewTransform = new TransformGroup(); > viewTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_READ); > viewTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); > viewTransform.setCapability(TransformGroup.ALLOW_LOCAL_TO_VWORLD_READ); > viewTransform.setCapability(TransformGroup.ALLOW_CHILDREN_READ); > resetView(); > ViewPlatform myViewPlatform = new ViewPlatform(); > myViewPlatform.setCapability(ViewPlatform.ALLOW_LOCAL_TO_VWORLD_READ); > PhysicalBody myBody = new PhysicalBody(); > PhysicalEnvironment myEnvironment = new PhysicalEnvironment(); > viewTransform.addChild(myViewPlatform); > viewBranch.addChild(viewTransform); > View myView = new View(); > myView.addCanvas3D(canvas); > myView.attachViewPlatform(myViewPlatform); > myView.setPhysicalBody(myBody); > myView.setPhysicalEnvironment(myEnvironment); > return viewBranch; > } > > public void resetView() { > Transform3D t = new Transform3D(); > t.set(new Vector3d(-0.25f, 0.75f, 6.0f)); > Transform3D t2 = new Transform3D(); > t2.rotY(Math.PI/2); > t2.mul(t); > viewTransform.setTransform(t); > } > >Tony > >-----Original Message----- >From: oda [mailto:[EMAIL PROTECTED]] >Sent: 09 November 2001 07:44 >To: [EMAIL PROTECTED] >Subject: [JAVA3D] How to reset view please > > >Hi all !!! > >I have an application which loads a .obj file in four views (left top front >perspective). >How can I reset these views to original after mouse manipulation (zoom >translate rotate ) ? > >=========================================================================== >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". > >=========================================================================== >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". > > =========================================================================== 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".