Package com.openinventor.inventor.nodes
Class SoPattern
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.inventor.nodes.SoPattern
-
- All Implemented Interfaces:
SafeDisposable
public class SoPattern extends SoNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoPattern.FilterTypes
Possible value of the filterType used by the method loadPatterns.-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFString
category
Specifies the name of a group of patterns.SoSFString
name
Specifies the name of a pattern within a category.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoPattern()
Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addPattern(java.lang.String category, java.lang.String name, byte[] bytes)
Adds a new pattern specified as an array of 128 bytes.static java.lang.String[]
getPatternNames()
Gets the list names of all loaded patterns.static java.lang.String[]
getPatternNames(java.lang.String category)
Gets the list names of all loaded patterns in the specified category.static boolean
loadPatterns(java.lang.String fileName)
Calls loadPatterns(fileName, (int)0, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).static boolean
loadPatterns(java.lang.String fileName, int numFilters)
Calls loadPatterns(fileName, numFilters, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).static boolean
loadPatterns(java.lang.String fileName, int numFilters, java.lang.String[] filterNames)
Calls loadPatterns(fileName, numFilters, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).static boolean
loadPatterns(java.lang.String fileName, int numFilters, java.lang.String[] filterNames, SoPattern.FilterTypes filterType)
Loads a pattern file, with optional filtering of patterns.static boolean
loadPatterns(java.lang.String fileName, java.lang.String[] filterNames)
Calls loadPatterns(fileName, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).static boolean
loadPatterns(java.lang.String fileName, java.lang.String[] filterNames, SoPattern.FilterTypes filterType)
Loads a pattern file, with optional filtering of patterns.-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
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.
-
-
Method Detail
-
getPatternNames
public static java.lang.String[] getPatternNames()
Gets the list names of all loaded patterns.
-
getPatternNames
public static java.lang.String[] getPatternNames(java.lang.String category)
Gets the list names of all loaded patterns in the specified category.
-
loadPatterns
public static boolean loadPatterns(java.lang.String fileName)
Calls loadPatterns(fileName, (int)0, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).
-
loadPatterns
public static boolean loadPatterns(java.lang.String fileName, int numFilters, java.lang.String[] filterNames)
Calls loadPatterns(fileName, numFilters, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).
-
loadPatterns
public static boolean loadPatterns(java.lang.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(java.lang.String fileName, java.lang.String[] filterNames)
Calls loadPatterns(fileName, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).
-
loadPatterns
public static boolean loadPatterns(java.lang.String fileName, int numFilters, java.lang.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(java.lang.String category, java.lang.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(java.lang.String fileName, java.lang.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.
-
-