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

  • public class SoMFBitMask<EnumType extends java.lang.Enum<EnumType> & IntegerValuedEnum>
    extends SoMFEnum<EnumType>
    Multiple-value field containing any number of masks of bit flags. A multiple-value field that contains any number of masks of bit flags, stored as ints. Nodes or engines 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.

    SoMFBitMasks 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 the reference pages for specific nodes or engines for the names.

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

    When more than one value is present, all of the values are enclosed in square brackets and separated by commas.

    Data copying:

    SoMF fields are a kind of "smart container", automatically expanding as necessary to hold the data provided by the application. This is very convenient, but for large blocks of data it may be desireable to avoid making a copy of the application data. The setValuesBuffer() methods allow Open Inventor to directly use an array of values supplied by the application. The application data is not copied. Please see SoMFVec3f for more information and example code.

    • Method Detail

      • setValuesBuffer

        public void setValuesBuffer​(java.nio.ByteBuffer userData)
        Sets the field to contain the values stored in userData. This data will not be copied into the field: it will be directly used by the field.
        setValuesBuffer in class SoMFEnum<EnumType extends java.lang.Enum<EnumType> & IntegerValuedEnum>