I have an application where I have multiple ViewPlatforms that I move
between. I have been using the ViewingPlatform class to handle the
ViewPlatform because it lets me use the OrbitBehavior and I like the
behavior.

Also I am using the overlay library that I just posted about and the
overlays are just textures right in front of the camera (attached to the
ViewPlatformTransform.)

The problem that I am having is if I use viewingPlatform.setViewPlatform
it does change the attached ViewPlatform but the ViewPlatformTransform
stays attached to the default position. This is a problem because A, I no
longer have the orbit behavior to change my position and B, it leaves the
overlays suspended in space.

The obvious solution is to move the whole thing, but the scene graph for
the ViewingPlatform is compiled when the object is created so I can't do
something like:

SimpleUniverse universe = new SimpleUniverse(canvas);
ViewingPlatform viewingPlatform = universe.getViewingPlatform();
TransformGroup viewTransform = viewingPlatform.getViewPlatformTransform();
BranchGroup cameraBase = (BranchGroup)viewTransform.getParent();
cameraBase.setCapability(BranchGroup.ALLOW_DETACH);

I get an exception thrown trying to access the parent of a compiled graph.

Is there any way to both use the OrbitBehavior and to be able to change
the group that the ViewPlatform is a child of (or to use multiple
ViewPlatforms?)

Will Holcomb

===========================================================================
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".

Reply via email to