Re: Axis flipping: how to check the display range has finished initia lising?

  • To: "Wilson, Andrew, J" <andrew.wilson@xxxxxxxxxxxx>
  • Subject: Re: Axis flipping: how to check the display range has finished initia lising?
  • From: Bill Hibbard <billh@xxxxxxxxxxxxx>
  • Date: Tue, 4 Feb 2003 13:44:04 -0600 (CST)
Hi Andrew,

Define a class implementing ScalarMapListener whose
mapChanged() method checks for ScalarMapEvent.AUTO_SCALE
events, and flips the range of your ScalarMap to ZAxis.
Pass an instance to the addScalarMapListener() method of
your ScalarMap to ZAxis.

Good luck,
Bill

On Tue, 4 Feb 2003, Wilson, Andrew, J wrote:

> Is there a smart way to pause until a display Range has
> finished initialising?
>
> I am working in 3D with surfaces where the "Z" axis is the
> time it takes for an acoustic pulse to travel down into the
> ground, reflect off a layer interface and return to the
> surface.
>
> So the Z axis needs to increase downwards.
>
> I have been successfully using
>
>       double[] range = timeMap3D.getRange();
>       timeMap3D.setRange(range[1],range[0]);
>
> to flip the range of the axes. This works for small horizons
> of 50,000 points but does not work for 500,000 points because
> the display range has not yet finished calculating by the
> time it reaches the above code. OK, so I could write a little
> loop to spin until the ranges are not yet NaN but I was
> wondering if there is a smarter way to do this? Maybe some
> kind of call back that I've missed?
>
> Cheers,
>
> Andrew
>
> ______________________________________________________________________
> BG Energy Holdings Limited (a member of BG Group)
> Registered in England No: 3763515
> Registered Address:
>                       100 Thames Valley Park Drive
>                       Reading
>                       Berkshire   RG6 1PT   UK
> Telephone:            +44 (0) 118 935 3222
> Website:              http://www.BG-Group.com
>
> This e-mail is intended only for the addressee named above.  As this
> e-mail may contain confidential or privileged information, please
> advise us immediately if you are not the named addressee or the person
> responsible for delivering the message to the named addressee.  The
> contents should not be disclosed to any other person nor copies taken.
> ______________________________________________________________________
>
>


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