Hi Tim,
On Tue, 15 Apr 2003, tsc wrote:
> Thanks for the suggestion about super(). I now have a version of SpreadSheet
> that works in stereo, but I need to fix the eye separation problem now. I
> have used the following code to fix it in other apps, but I am unsure as to
> how to make it work with visad:
>
> PhysicalBody myBody = simpleU.getViewer().getPhysicalBody();
> myBody.setLeftEyePosition( new Point3d(-.0033, 0.0, 0.0));
> // default is(-0.033, 0.0, 0.0)
> myBody.setRightEyePosition(new Point3d(+.0033, 0.0, 0.0));
>
> What I am wondering is where I would 'getPhysicalBody()' from. I see that
> visad uses VirtualUniverse rather than SimpleUniverse, and I would think that
> their interfaces would be similar (though I'm looking through the
> java/j3d/visad javadocs right now and can't find anything on
> SimpleUniverse...weird), but it also appears that there is no way to directly
> access a VirtualUniverse, as when a VirtualUniverse is created, it is private
> and there are no methods to access it in UniverseBuilder.java. Is there
> another way to go about getting the relevent viewer or physical body?
Try:
DisplayRendererJ3D dr
(DisplayRendererJ3D) display.getDisplayRenderer()
PhysicalBody pb = dr.getView().getPhysicalBody();
Good luck,
Bill
p.s., your emails would be easier to read if you
inserted end-of-line characters - as it is each
paragraph is one ling line