Documentation of 'visad.java3d.ShadowTypeJ3D' Java class
ShadowTypeJ3D
visad.java3d

Class ShadowTypeJ3D

    • Field Detail

      • appearanceCnt

        public static int appearanceCnt
        For logging the number of Appearance objects created
      • shape3DCnt

        public static int shape3DCnt
        For logging the number of Shape3D objects created
    • Constructor Detail

      • ShadowTypeJ3D

        public ShadowTypeJ3D(MathType type,
                             DataDisplayLink link,
                             ShadowType parent)
                      throws VisADException,
                             java.rmi.RemoteException
        Create a new ShadowTypeJ3D
        Parameters:
        type - MathType of the data
        link - the data/display link
        parent - parent ShadowType
        Throws:
        java.rmi.RemoteException - problem creating remote instance
        VisADException - problem creating local instance
    • Method Detail

      • getAdaptedParent

        public static ShadowType getAdaptedParent(ShadowType parent)
        Get the adapted ShadowType for the parent
        Parameters:
        parent - the parent object to test
        Returns:
        the adapted ShadowType
      • getParentText

        public java.lang.String getParentText()
        Overrides:
        getParentText in class ShadowType
        Returns:
        inherited text
      • setText

        public void setText(java.lang.String text,
                            TextControl control)
        Overrides:
        setText in class ShadowType
        Parameters:
        text -
        control -
      • getData

        public Data getData()
        Get the data
        Overrides:
        getData in class ShadowType
        Returns:
        the data
      • getType

        public MathType getType()
        Get the MathType of the Data
        Overrides:
        getType in class ShadowType
        Returns:
        the MathType
      • getLevelOfDifficulty

        public int getLevelOfDifficulty()
        Get the level of difficulty for this transform
        Overrides:
        getLevelOfDifficulty in class ShadowType
        Returns:
        the level of difficulty
      • getDisplayIndices

        public int[] getDisplayIndices()
        Overrides:
        getDisplayIndices in class ShadowType
        Returns:
        int array display indices
      • getValueIndices

        public int[] getValueIndices()
        Overrides:
        getValueIndices in class ShadowType
        Returns:
        int array value indices
      • checkIndices

        public int checkIndices(int[] indices,
                                int[] display_indices,
                                int[] value_indices,
                                boolean[] isTransform,
                                int levelOfDifficulty)
                         throws VisADException,
                                java.rmi.RemoteException
        checkIndices: check for rendering difficulty, etc
        Overrides:
        checkIndices in class ShadowType
        Parameters:
        indices -
        display_indices -
        value_indices -
        isTransform -
        levelOfDifficulty -
        Returns:
        num occcurrences RealType and DisplayRealType
        Throws:
        java.rmi.RemoteException
        VisADException
      • doTransform

        public boolean doTransform(java.lang.Object group,
                                   Data data,
                                   float[] value_array,
                                   float[] default_values,
                                   DataRenderer renderer)
                            throws VisADException,
                                   java.rmi.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)
        Parameters:
        group - group to add to
        data - the data to transform
        value_array - the values
        default_values - the default values
        renderer - the renderer
        Returns:
        false
        Throws:
        java.rmi.RemoteException
        VisADException
      • postProcess

        public void postProcess(java.lang.Object group)
                         throws VisADException
        render accumulated Vector of value_array-s to and add to group; then clear AccumulationVector
        Parameters:
        group -
        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
        Parameters:
        display_values -
        values -
        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
        Parameters:
        display_values -
        values -
        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
        Parameters:
        display_values -
        values -
        reals -
        copy -
        Throws:
        VisADException
      • makePointGeometry

        public static VisADGeometryArray makePointGeometry(float[][] spatial_values,
                                                           byte[][] color_values)
                                                    throws VisADException
        Parameters:
        spatial_values -
        color_values -
        Returns:
        point geometry array
        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)
        Make an Appearance object for this display
        Parameters:
        mode - GraphicsModeControl
        constant_alpha - the constant alpha value
        constant_color - the constant color value
        geometry - the GeometryArray
        no_material - flag for material
        Returns:
        appearance object constructed from geometry array
      • 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
        Returns:
        The new appearance
      • assembleShape

        public VisADGeometryArray[] assembleShape(float[][] display_values,
                                                  int valueArrayLength,
                                                  int[] valueToMap,
                                                  java.util.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,
                                                  java.rmi.RemoteException
        collect and transform Shape DisplayRealType values from display_values; offset by spatial_values, selected by range_select
        Overrides:
        assembleShape in class ShadowType
        Parameters:
        display_values -
        valueArrayLength -
        valueToMap -
        MapVector -
        valueToScalar -
        display -
        default_values -
        inherited_values -
        spatial_values -
        color_values -
        range_select -
        index -
        shadow_api -
        Returns:
        transformed Shape values
        Throws:
        java.rmi.RemoteException
        VisADException
      • 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,
                                   java.rmi.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
        Parameters:
        spatial_values -
        display_values -
        valueArrayLength -
        valueToScalar -
        display -
        default_values -
        inherited_values -
        domain_set -
        allSpatial -
        set_for_shape -
        spatialDimensions -
        range_select -
        flow1_values -
        flow2_values -
        flowScale -
        swap -
        renderer -
        shadow_api -
        Returns:
        spatial Set from spatial values
        Throws:
        java.rmi.RemoteException
        VisADException
      • assembleFlow

        public void assembleFlow(float[][] flow1_values,
                                 float[][] flow2_values,
                                 float[] flowScale,
                                 float[] arrowScale,
                                 float[][] display_values,
                                 int valueArrayLength,
                                 int[] valueToScalar,
                                 DisplayImpl display,
                                 float[] default_values,
                                 boolean[][] range_select,
                                 DataRenderer renderer,
                                 ShadowType shadow_api)
                          throws VisADException,
                                 java.rmi.RemoteException
        assemble Flow components; Flow components are 'single', so no compositing is required
        Overrides:
        assembleFlow in class ShadowType
        Parameters:
        flow1_values -
        flow2_values -
        flowScale -
        display_values -
        valueArrayLength -
        valueToScalar -
        display -
        default_values -
        range_select -
        renderer -
        shadow_api -
        Throws:
        java.rmi.RemoteException
        VisADException
      • makeFlow

        public VisADGeometryArray[] makeFlow(int which,
                                             float[][] flow_values,
                                             float flowScale,
                                             float arrowScale,
                                             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
        Parameters:
        which -
        flow_values -
        flowScale -
        spatial_values -
        color_values -
        range_select -
        Returns:
        flow geometry array
        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,
                                                   java.util.Vector MapVector)
                                            throws VisADException
        Overrides:
        makeStreamline in class ShadowType
        Parameters:
        which -
        flow_values -
        flowScale -
        spatial_values -
        spatial_set -
        spatialManifoldDimension -
        color_values -
        range_select -
        valueArrayLength -
        valueToMap -
        MapVector -
        Returns:
        streamline geometry array
        Throws:
        VisADException
      • makeContour

        public boolean makeContour(int valueArrayLength,
                                   int[] valueToScalar,
                                   float[][] display_values,
                                   int[] inherited_values,
                                   java.util.Vector MapVector,
                                   int[] valueToMap,
                                   int domain_length,
                                   boolean[][] range_select,
                                   int spatialManifoldDimension,
                                   Set spatial_set,
                                   byte[][] color_values,
                                   boolean indexed,
                                   java.lang.Object group,
                                   GraphicsModeControl mode,
                                   boolean[] swap,
                                   float constant_alpha,
                                   float[] constant_color,
                                   ShadowType shadow_api,
                                   ShadowRealTupleType Domain,
                                   ShadowRealType[] DomainReferenceComponents,
                                   Set domain_set,
                                   Unit[] domain_units,
                                   CoordinateSystem dataCoordinateSystem)
                            throws VisADException
        Overrides:
        makeContour in class ShadowType
        Parameters:
        valueArrayLength -
        valueToScalar -
        display_values -
        inherited_values -
        MapVector -
        valueToMap -
        domain_length -
        range_select -
        spatialManifoldDimension -
        spatial_set -
        color_values -
        indexed -
        group -
        mode -
        swap -
        constant_alpha -
        constant_color -
        shadow_api -
        Domain -
        DomainReferenceComponents -
        domain_set -
        domain_units -
        dataCoordinateSystem -
        Returns:
        true if any contours created
        Throws:
        VisADException
      • makeText

        public VisADGeometryArray makeText(java.lang.String[] text_values,
                                           TextControl text_control,
                                           float[][] spatial_values,
                                           byte[][] color_values,
                                           boolean[][] range_select)
                                    throws VisADException
        Overrides:
        makeText in class ShadowType
        Parameters:
        text_values -
        text_control -
        spatial_values -
        color_values -
        range_select -
        Returns:
        text geometry array
        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,
                                      java.rmi.RemoteException
        composite and transform color and Alpha DisplayRealType values from display_values, and return as (Red, Green, Blue, Alpha)
        Overrides:
        assembleColor in class ShadowType
        Parameters:
        display_values -
        valueArrayLength -
        valueToScalar -
        display -
        default_values -
        range_select -
        single_missing -
        shadow_api -
        Returns:
        byte color array
        Throws:
        java.rmi.RemoteException
        VisADException
      • 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
        Parameters:
        display_values -
        domain_length -
        valueArrayLength -
        valueToScalar -
        display -
        shadow_api -
        Returns:
        array of booleans as described above
        Throws:
        VisADException
      • terminalTupleOrScalar

        public boolean terminalTupleOrScalar(java.lang.Object group,
                                             float[][] display_values,
                                             java.lang.String text_value,
                                             TextControl text_control,
                                             int valueArrayLength,
                                             int[] valueToScalar,
                                             float[] default_values,
                                             int[] inherited_values,
                                             DataRenderer renderer)
                                      throws VisADException,
                                             java.rmi.RemoteException
        Parameters:
        group -
        display_values -
        text_value -
        text_control -
        valueArrayLength -
        valueToScalar -
        default_values -
        inherited_values -
        renderer -
        Returns:
        true if post-processing needed
        Throws:
        java.rmi.RemoteException
        VisADException
      • ensureNotEmpty

        public void ensureNotEmpty(java.lang.Object obj)
        this is a work-around for the NullPointerException at javax.media.j3d.Shape3DRetained.setLive(Shape3DRetained.java:448)
        Parameters:
        obj -
      • ensureNotEmpty

        public static void ensureNotEmpty(java.lang.Object obj,
                                          DisplayImpl display)
        Parameters:
        obj -
        display -
      • addToGroup

        public boolean addToGroup(java.lang.Object group,
                                  VisADGeometryArray array,
                                  GraphicsModeControl mode,
                                  float constant_alpha,
                                  float[] constant_color)
                           throws VisADException
        Add the GeometryArray to the group
        Overrides:
        addToGroup in class ShadowType
        Parameters:
        group - Group
        array - array to add
        mode - GraphicsModeControl
        constant_alpha - constant alpha value
        constant_color - constant color value
        Returns:
        true if successful
        Throws:
        VisADException - unable to add the array to the group
      • addToDetachableGroup

        public javax.media.j3d.BranchGroup addToDetachableGroup(java.lang.Object group,
                                                                VisADGeometryArray array,
                                                                GraphicsModeControl mode,
                                                                float constant_alpha,
                                                                float[] constant_color)
                                                         throws VisADException
        Convenience method that returns a Branch node, which may be parented, and whose only child can be detached. Acts also as an id since its parent may have multiple children.
        Overrides:
        addToDetachableGroup in class ShadowType
        Throws:
        VisADException
      • allowConstantColorSurfaces

        public boolean allowConstantColorSurfaces()
        Do we allo constant color surfaces?
        Overrides:
        allowConstantColorSurfaces in class ShadowType
        Returns:
        false
      • toString

        public java.lang.String toString()
        Get a String representation of this object
        Overrides:
        toString in class ShadowType
        Returns:
        the String representation of this object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.