Package com.openinventor.inventor.fields
Class SoSFBitMask<EnumType extends Enum<EnumType> & IntegerValuedEnum>
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.fields.SoField
com.openinventor.inventor.fields.SoSField
com.openinventor.inventor.fields.SoSFEnum<EnumType>
com.openinventor.inventor.fields.SoSFBitMask<EnumType>
public class SoSFBitMask<EnumType extends Enum<EnumType> & IntegerValuedEnum>
extends SoSFEnum<EnumType>
Single-value field containing a set of bit flags.
A single-value field that contains a mask of bit flags, stored as an integer. Nodes that use this field class define mnemonic names for the bit flags. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.
The bit-wise "&" and "|" operators should be used when testing and setting flags in a mask. For example:
SoSFBitMasks are written to file as one or more mnemonic enumerated type names, in this format:// Add sides to the set of parts rendered text.parts.setValue( text.parts.getValue() | SoText3.PartType.SIDES.getValue() ); // Remove sides from the set of parts rendered text.parts.setValue( text.parts.getValue() & ~SoText3.PartType.SIDES.getValue() );
If only one flag is used in a mask, the parentheses are optional. These names differ among uses of this field in various node or engine classes. See their reference pages for the names.( flag1 | flag2 | ... )
The field values may also be represented as integers, but this is not guaranteed to be portable.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.fields.SoField
SoField.FieldTypes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
ConstructorsConstructorDescriptionSoSFBitMask
(SoFieldContainer fieldContainer, String fieldName, SoField.FieldTypes fieldType, Class<EnumType> enumClass, EnumType defaultValue) Default constructor. -
Method Summary
Methods inherited from class com.openinventor.inventor.fields.SoSFEnum
equals, getValue, getValue, setValue, setValue, setValue
Methods inherited from class com.openinventor.inventor.fields.SoField
appendConnection, appendConnection, connectFrom, connectFrom, disconnect, disconnect, disconnect, enableConnection, get, getConnectedEngine, getConnectedField, getContainer, getNumConnections, getValueSize, isConnected, isConnectedFromEngine, isConnectedFromField, isConnectedFromVRMLInterp, isConnectionEnabled, isDefault, isIgnored, set, setIgnored, touch
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoSFBitMask
public SoSFBitMask(SoFieldContainer fieldContainer, String fieldName, SoField.FieldTypes fieldType, Class<EnumType> enumClass, EnumType defaultValue) Default constructor.
-