ucar.visad
Class WindBarb

java.lang.Object
  extended by ucar.visad.WindBarb

public class WindBarb
extends Object

Class WindBarb to create wind barbs as shapes

Version:
$Revision: 1.5 $
Author:
IDV Development Team

Constructor Summary
WindBarb()
          Default constructor
 
Method Summary
static float[] makeBarb(boolean south, float x, float y, float z, float scale, float pt_size, float f0, float f1, float[] vx, float[] vy, float[] vz, int[] numv, float[] tx, float[] ty, float[] tz, int[] numt)
          Adapted from Don Murray's mind
static float[] makeBarb(boolean south, float x, float y, float z, float scale, float pt_size, float f0, float f1, float[] vx, float[] vy, float[] vz, int[] numv, float[] tx, float[] ty, float[] tz, int[] numt, boolean rotateToGlobe)
          Adapted from Don Murray's mind
static float[] makeBarbOld(boolean south, float x, float y, float z, float scale, float pt_size, float f0, float f1, float[] vx, float[] vy, float[] vz, int[] numv, float[] tx, float[] ty, float[] tz, int[] numt)
          adapted from Justin Baker's WindBarb, which is adapted from Mark Govett's barbs.pro IDL routine
static VisADGeometryArray[] staticMakeFlow(float[][] flow_values, float flowScale, float[][] spatial_values, byte[][] color_values, boolean[][] range_select, boolean isSouth)
          Static method to make flow components
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindBarb

public WindBarb()
Default constructor

Method Detail

staticMakeFlow

public static VisADGeometryArray[] staticMakeFlow(float[][] flow_values,
                                                  float flowScale,
                                                  float[][] spatial_values,
                                                  byte[][] color_values,
                                                  boolean[][] range_select,
                                                  boolean isSouth)
                                           throws VisADException
Static method to make flow components

Parameters:
flow_values - values of flow
flowScale - scale factors
spatial_values - spatial values
color_values - colors for flow depictions
range_select - checks for whether this is a range select
isSouth - barb orientation flag
Returns:
array of shapes as VisADGeometryArrays
Throws:
VisADException

makeBarbOld

public static float[] makeBarbOld(boolean south,
                                  float x,
                                  float y,
                                  float z,
                                  float scale,
                                  float pt_size,
                                  float f0,
                                  float f1,
                                  float[] vx,
                                  float[] vy,
                                  float[] vz,
                                  int[] numv,
                                  float[] tx,
                                  float[] ty,
                                  float[] tz,
                                  int[] numt)
adapted from Justin Baker's WindBarb, which is adapted from Mark Govett's barbs.pro IDL routine

Parameters:
south - north or south orientation flag
x - x value location
y - y value location
z - z value location
scale - scale factor
pt_size - spacing between barbs
f0 - u component
f1 - v component
vx - x coordinate of VisADLineArrays
vy - y coordinate of VisADLineArrays
vz - z coordinate of VisADLineArrays
numv - number of coordinates
tx - x coordinate of VisADTriangleArrays (wind flags)
ty - y coordinate of VisADTriangleArrays (wind flags)
tz - z coordinate of VisADTriangleArrays (wind flags)
numt - number of coordinates
Returns:
an array of the start and end points

makeBarb

public static float[] makeBarb(boolean south,
                               float x,
                               float y,
                               float z,
                               float scale,
                               float pt_size,
                               float f0,
                               float f1,
                               float[] vx,
                               float[] vy,
                               float[] vz,
                               int[] numv,
                               float[] tx,
                               float[] ty,
                               float[] tz,
                               int[] numt)
Adapted from Don Murray's mind

Parameters:
south - north or south orientation flag
x - x value location
y - y value location
z - z value location
scale - scale factor
pt_size - spacing between barbs
f0 - u component
f1 - v component
vx - x coordinate of VisADLineArrays
vy - y coordinate of VisADLineArrays
vz - z coordinate of VisADLineArrays
numv - number of coordinates
tx - x coordinate of VisADTriangleArrays (wind flags)
ty - y coordinate of VisADTriangleArrays (wind flags)
tz - z coordinate of VisADTriangleArrays (wind flags)
numt - number of coordinates
Returns:
an array of the start and end points

makeBarb

public static float[] makeBarb(boolean south,
                               float x,
                               float y,
                               float z,
                               float scale,
                               float pt_size,
                               float f0,
                               float f1,
                               float[] vx,
                               float[] vy,
                               float[] vz,
                               int[] numv,
                               float[] tx,
                               float[] ty,
                               float[] tz,
                               int[] numt,
                               boolean rotateToGlobe)
Adapted from Don Murray's mind

Parameters:
south - north or south orientation flag
x - x value location
y - y value location
z - z value location
scale - scale factor
pt_size - spacing between barbs
f0 - u component
f1 - v component
vx - x coordinate of VisADLineArrays
vy - y coordinate of VisADLineArrays
vz - z coordinate of VisADLineArrays
numv - number of coordinates
tx - x coordinate of VisADTriangleArrays (wind flags)
ty - y coordinate of VisADTriangleArrays (wind flags)
tz - z coordinate of VisADTriangleArrays (wind flags)
numt - number of coordinates
rotateToGlobe - if true, rotate vectors for globe
Returns:
an array of the start and end points