Ehlo
> Does anyone know how or when to get the ViewingPlatform from the SimpleUniverse so
>that i can change the capabilities of the ViewingPlatform. I always get a
>RestrictedAccessException because you can't change the capabilities of al live or
>compiled object...
Hmm that's interesting normally it doesn't matter. But I'm not sure what
branches are you compiling?
> Or can anyone explain me how to construct a Universe yourself instead of using the
>SimpleUniverse-class.
Simple you have to make a VirtualUniverse, add a Locale to it and in this
locale add a BranchGroup with a ViewPlatform, Viewer,
Canvas3D, PhysicalBody,
PhysicalEnvironment and add a BranchGroup with your Shapes, Transform of
the Shapes : So something like this
Canvas3D myCanvas = new Canvas3D();
VirtualUniverse myUniverse = new VirtualUniverse();
Locale myLocal = new Locale(myUniverse);
BranchGroup viewBranch = new BranchGroup();
ViewPlatform myPlatform = new ViewPlatform();
myPlatform.setActivationRadius(15.0f);
myPlatform.setViewAttachPolicy(javax.media.j3d.View.NOMINAL_SCREEN);
View myView = new View();
myView.setPhysicalBody(new PhysicalBody());
myView.setPhysicalEnvironment(new PhysicalEnvironment());
myView.addCanvas3D(myCanvas);
myView.attachViewPlatform(myPlatform);
viewBranch.add(myPlatform);
myLocal.addBranchGroup(viewBranch);
[Build Geometry]
.
.
.
myLocal.addBranchGroup(geometryBranch);
.
.
.
That's about the minimum you have to do.
But I think it's easier and wiser to stick with SimpleUniverse unless
you're doing something really special.
EOF,
J.D.
--
Realtime Raytrace in JAVA
(http://www.antiflash.net/jmark)
===========================================================================
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".