## visad.java3d
Class ShadowTypeJ3D

    java.lang.Object
      visad.ShadowType
          visad.java3d.ShadowTypeJ3D

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  ShadowFunctionOrSetTypeJ3D, ShadowScalarTypeJ3D, ShadowTupleTypeJ3D

public abstract class ShadowTypeJ3D
extends ShadowType

The ShadowTypeJ3D hierarchy shadows the MathType hierarchy, within a DataDisplayLink, under Java3D.

See Also:
  Serialized Form

Field Summary
`(package private) ShadowType` `adaptedShadowType`
`(package private) DisplayImplJ3D` `display`
`(package private) String` `inheritedText`
`(package private) TextControl` `inheritedTextControl`
`(package private) DataDisplayLink` `Link`
`(package private) ProjectionControlListener` `projListener`
`(package private) MathType` `Type` basic information about this ShadowTypeJ3D

Fields inherited from class visad.ShadowType
`LEGAL, METERS_PER_DEGREE, NESTED, NOTHING_MAPPED, SIMPLE_ANIMATE_FIELD, SIMPLE_FIELD, SIMPLE_TUPLE`

Constructor Summary
`ShadowTypeJ3D(MathType type, DataDisplayLink link, ShadowType parent)`

Method Summary
`void` `addLabelsToGroup(Object group, VisADGeometryArray[][] arrays, GraphicsModeControl mode, ContourControl control, ProjectionControl p_cntrl, int[] cnt_a, float constant_alpha, float[] constant_color, float[][][] f_array)`
`boolean` `addTextToGroup(Object group, VisADGeometryArray array, GraphicsModeControl mode, float constant_alpha, float[] constant_color)`
`boolean` `addToGroup(Object group, VisADGeometryArray array, GraphicsModeControl mode, float constant_alpha, float[] constant_color)`
`boolean` `allowConstantColorSurfaces()`
`byte[][]` `assembleColor(float[][] display_values, int valueArrayLength, int[] valueToScalar, DisplayImpl display, float[] default_values, boolean[][] range_select, boolean[] single_missing, ShadowType shadow_api)` composite and transform color and Alpha DisplayRealType values from display_values, and return as (Red, Green, Blue, Alpha)
`void` `assembleFlow(float[][] flow1_values, float[][] flow2_values, float[] flowScale, float[][] display_values, int valueArrayLength, int[] valueToScalar, DisplayImpl display, float[] default_values, boolean[][] range_select, DataRenderer renderer, ShadowType shadow_api)` assemble Flow components; Flow components are 'single', so no compositing is required
`boolean[][]` `assembleSelect(float[][] display_values, int domain_length, int valueArrayLength, int[] valueToScalar, DisplayImpl display, ShadowType shadow_api)` return a composite of SelectRange DisplayRealType values from display_values, as 0.0 for select and Double.Nan for no select (these values can be added to other DisplayRealType values)

`VisADGeometryArray[]`

`assembleShape(float[][] display_values, int valueArrayLength, int[] valueToMap, Vector MapVector, int[] valueToScalar, DisplayImpl display, float[] default_values, int[] inherited_values, float[][] spatial_values, byte[][] color_values, boolean[][] range_select, int index, ShadowType shadow_api)`
collect and transform Shape DisplayRealType values from display_values; offset by spatial_values, selected by range_select

`Set`

`assembleSpatial(float[][] spatial_values, float[][] display_values, int valueArrayLength, int[] valueToScalar, DisplayImpl display, float[] default_values, int[] inherited_values, Set domain_set, boolean allSpatial, boolean set_for_shape, int[] spatialDimensions, boolean[][] range_select, float[][] flow1_values, float[][] flow2_values, float[] flowScale, boolean[] swap, DataRenderer renderer, ShadowType shadow_api)`
collect and transform spatial DisplayRealType values from display_values; add spatial offset DisplayRealType values; adjust flow1_values and flow2_values for any coordinate transform; if needed, return a spatial Set from spatial_values, with the same topology as domain_set (or an appropriate Irregular topology); domain_set = null and allSpatial = false if not called from ShadowFunctionType

`int` `checkIndices(int[] indices, int[] display_indices, int[] value_indices, boolean[] isTransform, int levelOfDifficulty)` checkIndices: check for rendering difficulty, etc

`boolean`

`doTransform(Object group, Data data, float[] value_array, float[] default_values, DataRenderer renderer)`
transform data into a Java3D scene graph; add generated scene graph components as children of group; value_array are inherited valueArray values; default_values are defaults for each display.DisplayRealTypeVector; return true if need post-process; this is default (for ShadowTextType)

`void` `ensureNotEmpty(Object obj)` this is a work-around for the NullPointerException at javax.media.j3d.Shape3DRetained.setLive(Shape3DRetained.java:448)
`static void` `ensureNotEmpty(Object obj, DisplayImpl display)`
`static ShadowType` `getAdaptedParent(ShadowType parent)`
`ShadowType` `getAdaptedShadowType()`
`ShadowRealType[]` `getComponents(ShadowType type, boolean doRef)`
`Data` `getData()`
`DisplayImpl` `getDisplay()`
`int[]` `getDisplayIndices()`
`int` `getLevelOfDifficulty()`
`boolean` `getMappedDisplayScalar()`
`boolean` `getMultipleDisplayScalar()`
`String` `getParentText()`
`TextControl` `getParentTextControl()`
`MathType` `getType()`
`int[]` `getValueIndices()`
`javax.media.j3d.Appearance` `makeAppearance(GraphicsModeControl mode, javax.media.j3d.TransparencyAttributes constant_alpha, javax.media.j3d.ColoringAttributes constant_color, javax.media.j3d.GeometryArray geometry, boolean no_material)`

`boolean`

`makeContour(int valueArrayLength, int[] valueToScalar, float[][] display_values, int[] inherited_values, Vector MapVector, int[] valueToMap, int domain_length, boolean[][] range_select, int spatialManifoldDimension, Set spatial_set, byte[][] color_values, boolean indexed, Object group, GraphicsModeControl mode, boolean[] swap, float constant_alpha, float[] constant_color, ShadowType shadow_api)`

`VisADGeometryArray[]` `makeFlow(int which, float[][] flow_values, float flowScale, float[][] spatial_values, byte[][] color_values, boolean[][] range_select)` which = 0 for Flow1 and which = 1 for Flow2
`static VisADGeometryArray` `makePointGeometry(float[][] spatial_values, byte[][] color_values)`
`VisADGeometryArray[]` `makeStreamline(int which, float[][] flow_values, float flowScale, float[][] spatial_values, Set spatial_set, int spatialManifoldDimension, byte[][] color_values, boolean[][] range_select, int valueArrayLength, int[] valueToMap, Vector MapVector)`
`VisADGeometryArray` `makeText(String[] text_values, TextControl text_control, float[][] spatial_values, byte[][] color_values, boolean[][] range_select)`
`static void` `mapValues(float[][] display_values, double[][] values, ShadowRealType[] reals)` map values into display_values according to ScalarMap-s in reals
`static void` `mapValues(float[][] display_values, float[][] values, ShadowRealType[] reals)` map values into display_values according to ScalarMap-s in reals
`static void` `mapValues(float[][] display_values, float[][] values, ShadowRealType[] reals, boolean copy)` map values into display_values according to ScalarMap-s in reals
`void` `postProcess(Object group)` render accumulated Vector of value_array-s to and add to group; then clear AccumulationVector
`void` `preProcess()` clear AccumulationVector
`void` `setText(String text, TextControl control)`
`static javax.media.j3d.Appearance` `staticMakeAppearance(GraphicsModeControl mode, javax.media.j3d.TransparencyAttributes constant_alpha, javax.media.j3d.ColoringAttributes constant_color, javax.media.j3d.GeometryArray geometry, boolean no_material)` Construct an Appearance object from a GeometryArray
`boolean` `terminalTupleOrScalar(Object group, float[][] display_values, String text_value, TextControl text_control, int valueArrayLength, int[] valueToScalar, float[] default_values, int[] inherited_values, DataRenderer renderer)`
`String` `toString()`

Methods inherited from class visad.ShadowType

`addSwitch, addToGroup, addToSwitch, adjustFlowToEarth, adjustZ, allowCurvedTexture, allowLinearContour, byteToFloat, floatToByte, getAdjustProjectionSeam, getAnyContour, getAnyFlow, getAnyShape, getAnyText, getComponentIndex, getComponentWithRef, getCurvedTexture, getDefaultColorIndex, getIsLinearContour3D, getIsTerminal, getIsTexture3D, getIsTextureMap, getLink, getMultipleSpatialDisplayScalar, getRefToComponent, getTextMaps, makeBranch, makePointGeometry, makeSpatialSet, makeSwitch, recurseComponent, recurseRange, setTex3DCoords, setTexCoords, setTexStackCoords, terminalTupleOrScalar, texture3DToGroup, textureDepth, textureHeight, textureStackToGroup, textureToGroup, textureWidth, wantIndexed`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### Type

    MathType Type

  basic information about this ShadowTypeJ3D

### Link

    transient DataDisplayLink Link

### display

    transient DisplayImplJ3D display

### inheritedText

    String inheritedText

### inheritedTextControl

    TextControl inheritedTextControl

### adaptedShadowType

    ShadowType adaptedShadowType

### projListener

    ProjectionControlListener projListener

Constructor Detail

### ShadowTypeJ3D

    public ShadowTypeJ3D(MathType type,
                         DataDisplayLink link,
                         ShadowType parent)
                  throws VisADException,
                         RemoteException

Method Detail

### getAdaptedParent

    public static ShadowType getAdaptedParent(ShadowType parent)

### getAdaptedShadowType

    public ShadowType getAdaptedShadowType()

  Overrides:
    `getAdaptedShadowType` in class `ShadowType`

### getComponents

    public ShadowRealType[] getComponents(ShadowType type,
                                          boolean doRef)
                                   throws VisADException

  Overrides:
    `getComponents` in class `ShadowType`
  Throws:
    `VisADException`

### getParentText

    public String getParentText()

  Overrides:
    `getParentText` in class `ShadowType`

### getParentTextControl

    public TextControl getParentTextControl()

  Overrides:
    `getParentTextControl` in class `ShadowType`

### setText

    public void setText(String text,
                        TextControl control)

  Overrides:
    `setText` in class `ShadowType`

### getData

    public Data getData()

  Overrides:
    `getData` in class `ShadowType`

### getDisplay

    public DisplayImpl getDisplay()

  Overrides:
    `getDisplay` in class `ShadowType`

### getType

    public MathType getType()

  Overrides:
    `getType` in class `ShadowType`

### getLevelOfDifficulty

    public int getLevelOfDifficulty()

  Overrides:
    `getLevelOfDifficulty` in class `ShadowType`

### getMultipleDisplayScalar

    public boolean getMultipleDisplayScalar()

  Overrides:
    `getMultipleDisplayScalar` in class `ShadowType`

### getMappedDisplayScalar

    public boolean getMappedDisplayScalar()

  Overrides:
    `getMappedDisplayScalar` in class `ShadowType`

### getDisplayIndices

    public int[] getDisplayIndices()

  Overrides:
    `getDisplayIndices` in class `ShadowType`

### getValueIndices

    public int[] getValueIndices()

  Overrides:
    `getValueIndices` in class `ShadowType`

### checkIndices

    public int checkIndices(int[] indices,
                            int[] display_indices,
                            int[] value_indices,
                            boolean[] isTransform,
                            int levelOfDifficulty)
                     throws VisADException,
                            RemoteException

  checkIndices: check for rendering difficulty, etc

  Overrides:
    `checkIndices` in class `ShadowType`
  Throws:
    `VisADException`
    `RemoteException`

### preProcess

    public void preProcess()
                    throws VisADException

  clear AccumulationVector

  Throws:
    `VisADException`

### doTransform

    public boolean doTransform(Object group,
                               Data data,
                               float[] value_array,
                               float[] default_values,
                               DataRenderer renderer)
                        throws VisADException,
                               RemoteException

  transform data into a Java3D scene graph; add generated scene graph components as children of group; value_array are inherited valueArray values; default_values are defaults for each display.DisplayRealTypeVector; return true if need post-process; this is default (for ShadowTextType)

  Throws:
    `VisADException`
    `RemoteException`

### postProcess

    public void postProcess(Object group)
                     throws VisADException

  render accumulated Vector of value_array-s to and add to group; then clear AccumulationVector

  Throws:
    `VisADException`

### mapValues

    public static void mapValues(float[][] display_values,
                                 double[][] values,
                                 ShadowRealType[] reals)
                          throws VisADException

  map values into display_values according to ScalarMap-s in reals

  Throws:
    `VisADException`

### mapValues

    public static void mapValues(float[][] display_values,
                                 float[][] values,
                                 ShadowRealType[] reals)
                          throws VisADException

  map values into display_values according to ScalarMap-s in reals

  Throws:
    `VisADException`

### mapValues

    public static void mapValues(float[][] display_values,
                                 float[][] values,
                                 ShadowRealType[] reals,
                                 boolean copy)
                          throws VisADException

  map values into display_values according to ScalarMap-s in reals

  Throws:
    `VisADException`

### makePointGeometry

    public static VisADGeometryArray makePointGeometry(float[][] spatial_values,
                                                       byte[][] color_values)
                                                throws VisADException

  Throws:
    `VisADException`

### makeAppearance

    public javax.media.j3d.Appearance makeAppearance(GraphicsModeControl mode,
                                                     javax.media.j3d.TransparencyAttributes constant_alpha,
                                                     javax.media.j3d.ColoringAttributes constant_color,
                                                     javax.media.j3d.GeometryArray geometry,
                                                     boolean no_material)

### staticMakeAppearance

    public static javax.media.j3d.Appearance staticMakeAppearance(GraphicsModeControl mode,
                                                                  javax.media.j3d.TransparencyAttributes constant_alpha,
                                                                  javax.media.j3d.ColoringAttributes constant_color,
                                                                  javax.media.j3d.GeometryArray geometry,
                                                                  boolean no_material)

  Construct an Appearance object from a GeometryArray

  Parameters:
    `mode` - GraphicsModeControl
    `constant_alpha` - transparency attributes
    `constant_color` - color to use
    `geometry` - geometry to use for the appearance
    `no_material` - true to not use a Material for illumination, false to use it for 2-D geometries

### assembleShape

    public VisADGeometryArray[] assembleShape(float[][] display_values,
                                              int valueArrayLength,
                                              int[] valueToMap,
                                              Vector MapVector,
                                              int[] valueToScalar,
                                              DisplayImpl display,
                                              float[] default_values,
                                              int[] inherited_values,
                                              float[][] spatial_values,
                                              byte[][] color_values,
                                              boolean[][] range_select,
                                              int index,
                                              ShadowType shadow_api)
                                       throws VisADException,
                                              RemoteException

  collect and transform Shape DisplayRealType values from display_values; offset by spatial_values, selected by range_select

  Overrides:
    `assembleShape` in class `ShadowType`
  Throws:
    `VisADException`
    `RemoteException`

### assembleSpatial

    public Set assembleSpatial(float[][] spatial_values,
                               float[][] display_values,
                               int valueArrayLength,
                               int[] valueToScalar,
                               DisplayImpl display,
                               float[] default_values,
                               int[] inherited_values,
                               Set domain_set,
                               boolean allSpatial,
                               boolean set_for_shape,
                               int[] spatialDimensions,
                               boolean[][] range_select,
                               float[][] flow1_values,
                               float[][] flow2_values,
                               float[] flowScale,
                               boolean[] swap,
                               DataRenderer renderer,
                               ShadowType shadow_api)
                        throws VisADException,
                               RemoteException

  collect and transform spatial DisplayRealType values from display_values; add spatial offset DisplayRealType values; adjust flow1_values and flow2_values for any coordinate transform; if needed, return a spatial Set from spatial_values, with the same topology as domain_set (or an appropriate Irregular topology); domain_set = null and allSpatial = false if not called from ShadowFunctionType

  Overrides:
    `assembleSpatial` in class `ShadowType`
  Throws:
    `VisADException`
    `RemoteException`

### assembleFlow

    public void assembleFlow(float[][] flow1_values,
                             float[][] flow2_values,
                             float[] flowScale,
                             float[][] display_values,
                             int valueArrayLength,
                             int[] valueToScalar,
                             DisplayImpl display,
                             float[] default_values,
                             boolean[][] range_select,
                             DataRenderer renderer,
                             ShadowType shadow_api)
                      throws VisADException,
                             RemoteException

  assemble Flow components; Flow components are 'single', so no compositing is required

  Overrides:
    `assembleFlow` in class `ShadowType`
  Throws:
    `VisADException`
    `RemoteException`

### makeFlow

    public VisADGeometryArray[] makeFlow(int which,
                                         float[][] flow_values,
                                         float flowScale,
                                         float[][] spatial_values,
                                         byte[][] color_values,
                                         boolean[][] range_select)
                                  throws VisADException

  Description copied from class: `ShadowType`
  which = 0 for Flow1 and which = 1 for Flow2

  Overrides:
    `makeFlow` in class `ShadowType`
  Throws:
    `VisADException`

### makeStreamline

    public VisADGeometryArray[] makeStreamline(int which,
                                               float[][] flow_values,
                                               float flowScale,
                                               float[][] spatial_values,
                                               Set spatial_set,
                                               int spatialManifoldDimension,
                                               byte[][] color_values,
                                               boolean[][] range_select,
                                               int valueArrayLength,
                                               int[] valueToMap,
                                               Vector MapVector)
                                        throws VisADException

  Overrides:
    `makeStreamline` in class `ShadowType`
  Throws:
    `VisADException`

### makeContour

    public boolean makeContour(int valueArrayLength,
                               int[] valueToScalar,
                               float[][] display_values,
                               int[] inherited_values,
                               Vector MapVector,
                               int[] valueToMap,
                               int domain_length,
                               boolean[][] range_select,
                               int spatialManifoldDimension,
                               Set spatial_set,
                               byte[][] color_values,
                               boolean indexed,
                               Object group,
                               GraphicsModeControl mode,
                               boolean[] swap,
                               float constant_alpha,
                               float[] constant_color,
                               ShadowType shadow_api)
                        throws VisADException

  Overrides:
    `makeContour` in class `ShadowType`
  Throws:
    `VisADException`

### addLabelsToGroup

    public void addLabelsToGroup(Object group,
                                 VisADGeometryArray[][] arrays,
                                 GraphicsModeControl mode,
                                 ContourControl control,
                                 ProjectionControl p_cntrl,
                                 int[] cnt_a,
                                 float constant_alpha,
                                 float[] constant_color,
                                 float[][][] f_array)
                          throws VisADException

  Overrides:
    `addLabelsToGroup` in class `ShadowType`
  Throws:
    `VisADException`

### makeText

    public VisADGeometryArray makeText(String[] text_values,
                                       TextControl text_control,
                                       float[][] spatial_values,
                                       byte[][] color_values,
                                       boolean[][] range_select)
                                throws VisADException

  Overrides:
    `makeText` in class `ShadowType`
  Throws:
    `VisADException`

### assembleColor

    public byte[][] assembleColor(float[][] display_values,
                                  int valueArrayLength,
                                  int[] valueToScalar,
                                  DisplayImpl display,
                                  float[] default_values,
                                  boolean[][] range_select,
                                  boolean[] single_missing,
                                  ShadowType shadow_api)
                           throws VisADException,
                                  RemoteException

  composite and transform color and Alpha DisplayRealType values from display_values, and return as (Red, Green, Blue, Alpha)

  Overrides:
    `assembleColor` in class `ShadowType`
  Throws:
    `VisADException`
    `RemoteException`

### assembleSelect

    public boolean[][] assembleSelect(float[][] display_values,
                                      int domain_length,
                                      int valueArrayLength,
                                      int[] valueToScalar,
                                      DisplayImpl display,
                                      ShadowType shadow_api)
                               throws VisADException

  return a composite of SelectRange DisplayRealType values from display_values, as 0.0 for select and Double.Nan for no select (these values can be added to other DisplayRealType values)

  Overrides:
    `assembleSelect` in class `ShadowType`
  Throws:
    `VisADException`

### terminalTupleOrScalar

    public boolean terminalTupleOrScalar(Object group,
                                         float[][] display_values,
                                         String text_value,
                                         TextControl text_control,
                                         int valueArrayLength,
                                         int[] valueToScalar,
                                         float[] default_values,
                                         int[] inherited_values,
                                         DataRenderer renderer)
                                  throws VisADException,
                                         RemoteException

  Throws:
    `VisADException`
    `RemoteException`

### ensureNotEmpty

    public void ensureNotEmpty(Object obj)

  this is a work-around for the NullPointerException at javax.media.j3d.Shape3DRetained.setLive(Shape3DRetained.java:448)

### ensureNotEmpty

    public static void ensureNotEmpty(Object obj,
                                      DisplayImpl display)

### addToGroup

    public boolean addToGroup(Object group,
                              VisADGeometryArray array,
                              GraphicsModeControl mode,
                              float constant_alpha,
                              float[] constant_color)
                       throws VisADException

  Overrides:
    `addToGroup` in class `ShadowType`
  Throws:
    `VisADException`

### addTextToGroup

    public boolean addTextToGroup(Object group,
                                  VisADGeometryArray array,
                                  GraphicsModeControl mode,
                                  float constant_alpha,
                                  float[] constant_color)
                           throws VisADException

  Overrides:
    `addTextToGroup` in class `ShadowType`
  Throws:
    `VisADException`

### allowConstantColorSurfaces

    public boolean allowConstantColorSurfaces()

  Overrides:
    `allowConstantColorSurfaces` in class `ShadowType`

### toString

    public String toString()

  Overrides:
    `toString` in class `ShadowType`