Hi,
Hi,
OK, we seem to have the build problem fixed. (However, since we determined
the real problem is in using DisplayImplJ2D rather than DisplayImplJ3D, it
isn't necessary to try to print debug messages anymore. But I could do that
next time ;-)
I also seem to have fixed the aspect ratio problem by determining through
trial and error that the following seems to work:
ProjectionControl pc = display.getProjectionControl();
double ratio = width / height;
if(ratio < 1) {
pc.setAspectCartesian(new double[] {ratio, 1, 1});
} else {
pc.setAspectCartesian(new double[] {1, 1 / ratio, 1});
}
keeping in mind that this is a 2D display renderer in a 3D display. The
arithmetic is to keep it from scaling. I didn't have to do that arithmetic
with the 2D display. The following was enough:
pc.setAspectCartesian(new double[] {width, height});
I still have the following question:
What is the difference between ProjectionControl.setAspect(),
ProjectionControl.setAspectCartesian(), and Renderer.setBoxAspect()? The
Javadoc isn't very clear on those points. Test37 uses both of the first
two.
BTW, now I have a box without doing anything special. That problem went
away, and I think I'm back in business (but without the slow triangles).
Thanks,
-Ken
-----Original Message-----
From: Kenneth Evans [mailto:evans@xxxxxxxxxxx]
Sent: Monday, April 16, 2007 4:18 PM
To: Visad (visad@xxxxxxxxxxxxxxxx)
Subject: RE: More GriddedNDSet Questions
Hi,
Now that that part is fixed, I am having a problem with the aspect ratio. I
was using ProjectionControl.setAspectCartesian for the displayImplJ2D. I
can't get that to work for displayImplJ3D, possibly because that one scales
and I don't know what to do about z.
Also, I no longer have a box and TwoDDisplayRendererJ3D.setBoxOn(true)
doesn't seem to work. Nor does TwoDDisplayRendererJ3D.setBoxAspect(new
double[] {width, height, 1}) or anything else I've tried.
Thanks,
-Ken
-----Original Message-----
From: owner-visad@xxxxxxxxxxxxxxxx [mailto:owner-visad@xxxxxxxxxxxxxxxx] On
Behalf Of Kenneth Evans
Sent: Monday, April 16, 2007 2:48 PM
To: Visad
Subject: RE: More GriddedNDSet Questions
Don,
Good guess! That fixed it. Thanks a lot.
-Ken
-----Original Message-----
From: Don Murray [mailto:dmurray@xxxxxxxxxxxxxxxx]
Sent: Monday, April 16, 2007 2:28 PM
To: Bill Hibbard
Cc: Kenneth Evans; Visad
Subject: Re: More GriddedNDSet Questions
Hi Bill/Ken-
Bill Hibbard wrote:
> I took a hard look at the various criteria for computing the
> boolean flags isTextureMap and curvedTexture, and the
> only reasonable cause for curvedTexture == false when
> isTextureMap == true in your case is that you must be
> using a DisplayImplJ2D. The only other possible causes
> I can see are that you may be explicitly setting curvedSize
> to 0, or have a ConstantMap of false to Display.TextureEnable,
> both very unlikely.
I was going to guess Ken's using a DisplayImplJ2D based on
his comment about slowness.
> Curved texture maps are not supported in Java2D and so
> won't work in a DisplayImplJ2D. If you are using a
> DisplayImplJ2D, can you switch to a DisplayImplJ3D?
You could still have a 2D application by using:
DisplayImpl display
new DisplayImplJ3D("display", new TwoDDisplayRendererJ3D());
but performance should be greatly improved. Of course, you'll
need to install Java 3D.
Don
*************************************************************
Don Murray UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000
(303) 497-8628 Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************
===========================================================================
==
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===========================================================================
==
==============================================================================
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================