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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
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
FieldsModifier and TypeFieldDescriptionfinal SoSFString
Specifies the name of a group of patterns.final SoSFString
Specifies the name of a pattern within a category.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addPattern
(String category, String name, byte[] bytes) Adds a new pattern specified as an array of 128 bytes.static String[]
Gets the list names of all loaded patterns.static String[]
getPatternNames
(String category) Gets the list names of all loaded patterns in the specified category.static boolean
loadPatterns
(String fileName) Calls loadPatterns(fileName, (int)0, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).static boolean
loadPatterns
(String fileName, int numFilters) Calls loadPatterns(fileName, numFilters, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).static boolean
loadPatterns
(String fileName, int numFilters, String[] filterNames) Calls loadPatterns(fileName, numFilters, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).static boolean
loadPatterns
(String fileName, int numFilters, String[] filterNames, SoPattern.FilterTypes filterType) Loads a pattern file, with optional filtering of patterns.static boolean
loadPatterns
(String fileName, String[] filterNames) Calls loadPatterns(fileName, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )).static boolean
loadPatterns
(String fileName, 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 Details
-
category
Specifies the name of a group of patterns. If the category name is invalid or not found, the default pattern is used. -
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
Gets the list names of all loaded patterns. -
getPatternNames
Gets the list names of all loaded patterns in the specified category. -
loadPatterns
Calls loadPatterns(fileName, (int)0, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )). -
loadPatterns
Calls loadPatterns(fileName, numFilters, filterNames, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )). -
loadPatterns
Calls loadPatterns(fileName, numFilters, (java.lang.String[])null, SoPattern.FilterTypes.valueOf( SoPattern.FilterTypes.INCLUSIVE_FILTER.getValue() )). -
loadPatterns
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
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.
-