Open Inventor Reference
SoSFBitMask Class Reference

Single-value field containing a set of bit flags. More...

#include <Inventor/fields/SoSFBitMask.h>

Inheritance diagram for SoSFBitMask:
SoSFEnum SoSField SoField

List of all members.

Static Public Member Functions

static void initClass ()

Protected Member Functions

virtual SbBool findEnumValue (const SbName &name, int &val)
 Inherits other stuff from Enum field.

Detailed Description

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, to turn on the sides of a 3D text node and turn off the back you would write:

text3->parts = text3->parts.getValue() | SoText3::SIDES;
text3->parts = text3->parts.getValue() & ~SoText3::BACK;

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 man 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

Definition at line 99 of file SoSFBitMask.h.


Member Function Documentation

virtual SbBool SoSFBitMask::findEnumValue ( const SbName name,
int &  val 
) [protected, virtual]

Looks up enum name, returns value. Returns FALSE if not found.

Reimplemented from SoSFEnum.

static void SoSFBitMask::initClass ( ) [static]

Reimplemented from SoSFEnum.


The documentation for this class was generated from the following file: