Interface ResultFeature

    • Method Detail

      • create

        ResultFeature create​(java.lang.String tag,
                             java.lang.String type)
        Create a result feature.
        Parameters:
        tag - Feature tag.
        type - Type of feature.
        Returns:
        Created result feature.
      • createTable

        TableFeature createTable​(java.lang.String tableTag)
        Creates a table containing the data for the plot.
        Parameters:
        tableTag - The table tag.
        Returns:
        The table.
      • discardFile

        void discardFile()
        Discard the file that this plot feature uses.
      • exportFile

        void exportFile​(java.lang.String filename)
        Export the file that this plot feature uses.
        Parameters:
        filename - File name.
      • feature

        ResultFeatureList feature()
        Gets the list of sub-features for this ResultFeature.
        Returns:
        List of result features.
      • feature

        ResultFeature feature​(java.lang.String tag)
        Get the sub-feature with the given name, or an exception otherwise.
        Parameters:
        tag - Result feature tag.
        Returns:
        Result feature.
      • getAxisUnits

        java.lang.String[] getAxisUnits()
        Returns the units of the coordinate axes for the plot group to which the feature belong; null for 1D plot groups.
        Returns:
        An array of length 2 or 3 containing LaTeX-formatted units, or null if no units are available.
      • getBoundaryElements

        int[][] getBoundaryElements​(int renderIndex,
                                    int groupIndex)
        Get the elements for the boundary of the current plot, if applicable.
        Parameters:
        renderIndex - Rendering index indicating rendering type within plot.
        groupIndex - Group index indicating groups or part within rendering group index.
        Returns:
        Matrix of boundary indices.
      • getColor

        double[] getColor​(java.lang.String name,
                          java.lang.String colorTheme)
        Returns the color specified by a property. If the property's string value is "custom", the value of the corresponding "custom"-color property will be returned. If the string value is "fromtheme", the theme color will be returned.
        Parameters:
        name - Property name.
        colorTheme - If the property is set to take the color from a color theme, use this theme.
        Returns:
        The color as an array with the RGB values.
      • getColor

        double[] getColor​(java.lang.String name,
                          boolean useGraphicsTheme)
        Returns the color specified by a property. If the property's string value is "custom", the value of the corresponding "custom"-color property will be returned. If the string value is "fromtheme", the theme color will be returned.
        Parameters:
        name - Property name.
        useGraphicsTheme - If true, use the model's graphics color theme, If false, use the model's image export color theme.
        Returns:
        The color as an array with the RGB values.
      • getData

        float[] getData​(int renderIndex,
                        int groupIndex,
                        java.lang.String dataType)
        Get the data vector for a specific data type.
        Parameters:
        renderIndex - Rendering index indicating rendering type within plot.
        groupIndex - Group index indicating groups or part within rendering group index.
        dataType - Plot data type; use getDataTypes to determine supported plot data types.
        Returns:
        Data associated with each vertex of the plot.
      • getDataMinMax

        float[] getDataMinMax​(int renderIndex,
                              int groupIndex,
                              java.lang.String dataType)
        Get the maximum and minimum data for a specific data type.
        Parameters:
        renderIndex - Rendering index indicating rendering type within plot.
        groupIndex - Group index indicating groups or part within rendering group index.
        dataType - Plot data type; use getDataTypes to determine supported plot data types.
        Returns:
        Two elements vector with minimum and maximum values.
      • getDataTypes

        java.lang.String[] getDataTypes​(int renderIndex)
        Gets the available data types within the plot.
        Parameters:
        renderIndex - Rendering index indicating rendering type within plot.
        Returns:
        Available plot data types within the plot, for example, Color.
      • getElements

        int[][] getElements​(int renderIndex,
                            int groupIndex)
        Gets the elements of the plot.
        Parameters:
        renderIndex - Rendering index indicating rendering type within plot.
        groupIndex - Group index indicating groups or part within rendering group index.
        Returns:
        Matrix of element indices.
      • getGroups

        int getGroups​(int renderIndex)
        Retrieves the number of groups for a rendering type.
        Parameters:
        renderIndex - Rendering type index.
        Returns:
        Number of groups.
      • getNormals

        float[][] getNormals​(int renderIndex,
                             int groupIndex)
        Gets the vertex normals.
        Parameters:
        renderIndex - Rendering index indicating rendering type within plot.
        groupIndex - Group index indicating groups or part within rendering group index.
        Returns:
        Matrix of vertex normals with each column corresponding to a single vertex. Empty if no normals are available for the plot.
      • getPlotGroup

        ResultFeature getPlotGroup()
        Resolves the plot group this result feature belongs to. If the feature is a plot group, returns itself.
        Returns:
        The plot group.
      • getRenderGroups

        int getRenderGroups()
        Returns the number of rendering types within the plot.
        Returns:
        Number of rendering types with a plot.
      • getSDim

        int getSDim()
        Get this feature's space dimension. This is the same as the plot group's dimension.
        Returns:
        Space dimension.
      • getVertexElements

        int[] getVertexElements​(int renderIndex,
                                int groupIndex)
        Gets the element each vertex belongs to.
        Parameters:
        renderIndex - Rendering index indicating rendering type within plot.
        groupIndex - Group index indicating groups or part within rendering group index.
        Returns:
        Vector of element index for each vertex.
      • getVertices

        float[][] getVertices​(int renderIndex,
                              int groupIndex)
        Gets the vertex coordinates.
        Parameters:
        renderIndex - Rendering index indicating rendering type within plot.
        groupIndex - Group index indicating groups or part within rendering group index.
        Returns:
        Matrix of vertex coordinates with each column corresponding to a single vertex.
      • importFile

        void importFile()
        Import the file that this plot feature uses.
      • isPlotGroup

        boolean isPlotGroup()
        Returns true if this result feature is a plot group.
        Returns:
        true if a plot group.
      • prepareView

        ViewFeature prepareView​(boolean create)
        Returns the view to use when plotting the plot group to which the feature belongs.
        Parameters:
        create - If true, the view is created if needed.
        Returns:
        The view to use; null if none.
      • refreshFile

        void refreshFile()
        Refresh the file that this plot feature uses.
      • run

        void run()
        Generate and render data for plot group.
      • selection

        LocalSelection selection​(java.lang.String name)
        Returns a selection property.
        Specified by:
        selection in interface PropFeature
        Parameters:
        name - Selection property name.
        Returns:
        Requested selection property.