Re: Alpha Blending?

Hi Bill

Bill Hibbard wrote:
> Hi Kevin,
>>Well, I have an array of Irregular2DSets.  I want to give each set a
>>different color.  I then want to be able to toggle on and off the
>>collection of Irregular2DSets at the same time.
>>I'm sure that I can loop through the array of Iregular2DSets, and their
>>associated DataReferences/DataRenderers and turn each one off
>>individually, but I would like to do turn the array off and on in one
>>step instead of a loop.  Is there a way to do this elegantly (i.e. w/o a
>>loop)?  Is there and example?
> Sure. Combine all your Sets in a FieldImpl with MathType
> something like (index -> (r, g, b, Set(x, y))). Each Set
> has a different color, and you can toggle the whole thing
> on and off in one step.

OK, I think this makes sense. Use an Integer1DSet as my domain (index) and map each Irregular2DSet to the domain. (index -> Set(x,y)).

But how is this done since a FunctionType requires (MathType, MathType) and what we have above is (MathType, ThingImpl)? Can I wrap the Set in a RealTupleType which is a MathType?

Also, how do I get the colors involved? Do I make r, g, and b RealTypes and give them values as a RealTuple and map them to ScalarMaps?

VisAD keeps me humble!  ;-)



Kevin L. Manross        [KD5MYD] <><          (405)-366-0557
CIMMS Research Associate               kevin.manross@xxxxxxxx

"My opinions are my own and not representative of CIMMS, NSSL,
  NOAA or any affiliates"

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