Class SoPattern

All Implemented Interfaces:
SafeDisposable

public class SoPattern extends SoNode
  • Field Details

    • category

      public final SoSFString category
      Specifies the name of a group of patterns. If the category name is invalid or not found, the default pattern is used.
    • name

      public final SoSFString name
      Specifies the name of a pattern within a category. If the pattern name is invalid or not found, the default pattern is used.
  • Constructor Details

    • SoPattern

      public SoPattern()
      Constructor.
  • Method Details

    • getPatternNames

      public static String[] getPatternNames()
      Gets the list names of all loaded patterns.
    • getPatternNames

      public static String[] getPatternNames(String category)
      Gets the list names of all loaded patterns in the specified category.
    • loadPatterns

      public static boolean loadPatterns(String fileName)
      Calls loadPatterns(fileName, (int)0, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).
    • loadPatterns

      public static boolean loadPatterns(String fileName, int numFilters, String[] filterNames)
      Calls loadPatterns(fileName, numFilters, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).
    • loadPatterns

      public static boolean loadPatterns(String fileName, int numFilters)
      Calls loadPatterns(fileName, numFilters, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).
    • loadPatterns

      public static boolean loadPatterns(String fileName, String[] filterNames)
      Calls loadPatterns(fileName, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).
    • loadPatterns

      public static boolean loadPatterns(String fileName, int numFilters, String[] filterNames, SoPattern.FilterTypes filterType)
      Loads a pattern file, with optional filtering of patterns. You can specify the file name with or without a full path. If you specify the file name without the path, the file will be loaded from the directory $OIVHOME/data/patterns. If the file name is not found, a default pattern will be used.

      filterNames is an array of pattern names. This will be an array of patterns to include (or exclude) depending on the FilterType. The size of this array is numFilters.

    • addPattern

      public static void addPattern(String category, String name, byte[] bytes)
      Adds a new pattern specified as an array of 128 bytes. A category and a name are specified for this pattern. If the category and name are already in the list of patterns, the new pattern will not be added. If either the category or the name is an empty string, no pattern is added.
    • loadPatterns

      public static boolean loadPatterns(String fileName, String[] filterNames, SoPattern.FilterTypes filterType)
      Loads a pattern file, with optional filtering of patterns. You can specify the file name with or without a full path. If you specify the file name without the path, the file will be loaded from the directory $OIVHOME/data/patterns. If the file name is not found, a default pattern will be used.

      filterNames is an array of pattern names. This will be an array of patterns to include (or exclude) depending on the FilterType. The size of this array is numFilters.