Re: Transform an object.

Hi Bill,

As usual, I stumbled on the answer minutes after posting (I _swear_ I 
check both the documentation and the archives before I post)!  

The DisplayRendererJ3D class has methods named getTrans(), and
getViewTrans() that sound suspiciously like what I need.  If not, then I 
can probably get myself into all kinds of trouble with 
createBasicSceneGraph...

Cheers,
Chris


On Tue, 27 May 2003, Bill Hibbard wrote:

> Hi Christopher,
> 
> > I'm trying to modify the TestStereo example to add a Transform3D to move
> > the object a bit farther from the viewer.  The example code uses
> > DisplayImpl.addMap, and all the geometry magically appears.
> >
> > What I'd like to do, is get ahold of the Group Node that the ScalarMaps
> > are added to, and insert a TransformGroup between the Group Node and the
> > root node (the Locale)?  Is there a way to get ahold of the scene graph?
> 
> ScalarMaps are not added to any Group (ScalarMaps are a purely
> VisAD concept, rather than Java3D). One possible approach to do
> what you want is to pass an appropriate 4x4 matrix to
> ProjectionControlJ3D.setMatrix(), which sets the Transform3D
> that is above all data depictions. You might call
> ProjectionControlJ3D.setMatrix() to get the matrix, multiply
> it be an appropriate translation back in Z (experiment with
> order to this multiply), and then pass the result back to
> ProjectionControlJ3D.setMatrix().
> 
> Please let me know if this solves your problem.
> 
> > I _have_ modified TestStereo to use the DisplayImpl3d constructor that
> > takes an instance of VisADCanvasJ3D so I could get ahold of the View and
> > change the PhysicalBody to adjust stereo eye separation and
> > EyeOffsetFromScreen.  But stereo separation is also effected by
> > ViewPlatform position and object distance to origin.  I'd like to change
> > both of these using a Transform3D.
> >
> > I'm a newbie - please feel free to point out that I've wandered off into
> > the weeds yet again...
> 
> You're in unfamiliar territory, so if my suggestion doesn't
> solve your problem we may need to modify some VisAD classes
> to help you.
> 
> Cheers,
> Bill
> 
> 


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: