Please send me the complete source code for this problem and I'll look
into it. This code does contain the createSceneGraph() method. Thanks!
andrea
matthias sweertvaegher wrote:
>
> Hello
>
> I have a problem concerning the orbitbehavior class. When I move the mouse for some
>time (rotate and zoom) , suddenly no more movement is possible, so the app
> "freezes". I added the boundingleaf of the behavior to the platformgeometry, so the
>behavior should be always on.
> I haven't been able to create a lockup without zooming out first. The scene consists
>of only some cubes and triangles (less than 100 triangles in total)
> I can't understand why such a basic app like mine can have problems. Please have a
>look at the very simple source code.
>
> I also had the following problem : I didn't see anything on my screen until I
>pressed a mousebutton on the canvas (ie until the behavior got triggered). When I
>inserted
> an extra transformgroup (in the code vpTG2) instead of using directly the one
>obtained from getViewPlatformTransform(), the problem was solved. Is this normal?
>
> any help appreciated,
>
> mattie
>
> public void init()
> {
> setLayout(new BorderLayout());
> GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
> Canvas3D canvas = new Canvas3D(config);
> add("Center", canvas);
>
> ViewingPlatform viewingPlatform = new ViewingPlatform();
> iVpBoundingLeaf = new BoundingLeaf(new BoundingSphere(new
>Point3d(0.0,0.0,0.0),100.0));
> PlatformGeometry pg = new PlatformGeometry();
> pg.addChild(iVpBoundingLeaf);
> viewingPlatform.setPlatformGeometry(pg);
> OrbitBehavior orbitBehavior = new
>OrbitBehavior(canvas,OrbitBehavior.REVERSE_ALL);
> orbitBehavior.setSchedulingBoundingLeaf(iVpBoundingLeaf);
> orbitBehavior.setZoomFactor(50.0);
> viewingPlatform.setViewPlatformBehavior(orbitBehavior);
> TransformGroup vpTG = viewingPlatform.getViewPlatformTransform();
> TransformGroup vpTG2 = new TransformGroup();
> vpTG.addChild(vpTG2);
> Transform3D vptrans = new Transform3D();
> vptrans.setTranslation(new Vector3d(0.0,0.0,20.0));
> Transform3D vprot0 = new Transform3D();
> Transform3D vprot1 = new Transform3D();
> vprot0.rotX(-0.75);
> vprot1.rotY(0.75);
> vprot0.mul(vprot1);
> vptrans.mul(vprot0);
> vpTG2.setTransform(vptrans);
>
> Viewer viewer = new Viewer(canvas);
> viewer.getView().setBackClipDistance(100.0);
> iSimpleUniverse = new SimpleUniverse(viewingPlatform,viewer);
> BranchGroup scene = createSceneGraph();
> iSimpleUniverse.addBranchGraph(scene);
> }
>
> ===========================================================================
> 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".