help appreciated ...
Don Murray
dmurray at unidata.ucar.edu
Thu Oct 5 07:54:28 MDT 2006
Hi-
Bill Hibbard wrote:
> Sets are immutable, so to change the location of your
> points you'll have to construct a new DelaunayCustom,
> a new Irregular3DSet and a new FlatField, then pass
> the FlatField to tetref.setData(). Hopefully this won't
> be too slow for you - the good news is that DelaunayCustom
> is constructed much quicker than the other Delaunay
> subclasses. You may be able to speed it up a bit more
> by saving the Vertices, Walk and Edges arrays constructed
> by your first call to the DelaunayCustom constructor, then
> passing them to subsequent DelaunayCustom constructors.
To save on time/memory, you should be able to do something like
the following if your FlatField range does not change:
// create the new set
delaun = new DelaunayCustom(newpts, tri);
newgsp = new Irregular3DSet(xyz,newpts,null,null,null,delaun);
newvals_rgb = new FlatField( func_rgb, newgsp);
//use copy=false to use the same array of range values
newvals_rgb.setSamples(vals_rgb.getSamples(false),false);
tetref.setData(newvals_rgb);
so you'll just end up using the range for the new and old
set.
Don
*************************************************************
Don Murray UCAR Unidata Program
dmurray at unidata.ucar.edu 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
==============================================================================
More information about the visad
mailing list