Class SoSFBitMask<EnumType extends java.lang.Enum<EnumType> & IntegerValuedEnum>

  • public class SoSFBitMask<EnumType extends java.lang.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:

     // Add sides to the set of parts rendered | SoText3.PartType.SIDES.getValue() );
     // Remove sides from the set of parts rendered & ~SoText3.PartType.SIDES.getValue() );
    SoSFBitMasks are written to file as one or more mnemonic enumerated type names, in this format:

     ( flag1 | flag2 | ... )
    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.

    The field values may also be represented as integers, but this is not guaranteed to be portable.

    See Also:
    SoField, SoSField, SoMFBitMask