Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Another Alpha Question


Hi Bill, all,

This suggestion works great, thank you! I have run into another problem in that I have a set of these wedges (several Irregular2DSets) and I group them as a UnionSet.


/** UnionSet of Irregular2DSets */
UnionSet apFF = (UnionSet)MakeAP();
DataReferenceImpl apRef = new DataReferenceImpl("apRef");
apRef.setData(apFF);

ConstantMap[] pointMap0 = { new ConstantMap (1.0f, Display.Red),
                            new ConstantMap (0.0f, Display.Green),
                            new ConstantMap (0.0f, Display.Blue),
                            new ConstantMap (0.5f, Display.Alpha),
                            new ConstantMap(-0.9f, Display.ZAxis) };

ppiDisplay.addReference(apRef, pointMap0);



However, when I try to add the data reference containing the UnionSet with a ConstantMap (to describe the Alpha) I get an error regarding the color_value dimensions of the make2DGeometry method called by UnionSet.

> visad.SetException: UnionSet.make2DGeometry: color_values dimension should be 3, not 4


Is there a way to pair a UnionSet with a ConstantMap?

Thank you!!

-kevin.



Bill Hibbard wrote:
Hi Kevin,

There may be some problems with alpha in a 2-D display, since
ZAxis is a bit artificial in 2-D. The Australian BOM does its
2-D actually in 3-D, but with PARALLEL_PROJECTION and setting
the MouseHelper to disallow 3-D rotations. That way they can
explicitly control the ZAxis depths off its layers. Perhaps
Don is doing something like this? Or perhaps he will tell
you how he gets his displays to work the way you want yours
to.



--
+------------------------------------------------------------+
Kevin L. Manross        [KD5MYD] <><          (405)-366-0557
CIMMS Research Associate               kevin.manross@xxxxxxxx
[NSSL-WRDD/SWATN]           http://www.cimms.ou.edu/~kmanross

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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690