Re: [Algorithms] Modifying the min and max altitude in a heightmap
Brought to you by:
vexxed72
From: Jamie F. <j.f...@re...> - 2000-08-01 10:35:08
|
Unless you maintain a list of heixels sorted by height, I'm pretty sure you can't do what you want. Sorry. Jamie Sam McGrath wrote: > This may have a simple solution, but I haven't thought of one yet... > > I have a heightmap of altitude values. The heightmap is subject to > modification during the course of my program. When I load the heightmap I > compute the maximum and minimum values (altitudes). During the program, if > a value in heightmap that is modified goes beyond the maximum altitude, I > assign that value to the maximum altitude (and similarly for the minimum > altitude). > > However, I also want to be able to tell if the maximum value has _shrunk_ > (or if this minimum value has increased). So far I can't think of a simple > way to do this other than rescanning the whole heightmap whenever a value is > modified, and clearly this is not a practical solution. > > Hopefully there's a nice simple method that I'm blind to, so please > enlighten me if you can. (-: > > -Sam > ______________________ > Sam McGrath > sa...@dn... > http://www.dnai.com/~sammy > ICQ 5151160 > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |