DOKK / manpages / debian 12 / inventor-doc / SoSFBitMask.3iv.en
SoSFBitMask(3IV)() SoSFBitMask(3IV)()

SoSFBitMask — single-value field containing a set of bit flags

SoField > SoSField > SoSFEnum > SoSFBitMask

#include <Inventor/fields/SoSFBitMask.h>


Methods from class SoSFBitMask:


static SoType getClassTypeId()

virtual void getTypeId() const

int getValue() const

void setValue(int newValue)

int operator =(int newValue)

int operator ==(const SoSFBitMask &f) const

int operator !=(const SoSFBitMask &f) const


Methods from class SoField:


void setIgnored(SbBool ignore)

SbBool isIgnored() const

SbBool isDefault() const

virtual SbBool isOfType(SoType type) const

SbBool set(const char *valueString)

void get(SbString &valueString)

void touch()

SbBool connectFrom(SoField *fromField)

SbBool connectFrom(SoEngineOutput *fromEngine)

void disconnect()

SbBool isConnected() const

SbBool isConnectedFromField() const

SbBool getConnectedField(SoField *&writingField) const

SbBool isConnectedFromEngine() const

SbBool getConnectedEngine(SoEngineOutput *&engineOutput) const

void enableConnection(SbBool flag)

SbBool isConnectionEnabled() const

int getForwardConnections(SoFieldList &list) const

SoFieldContainer * getContainer() const

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.


static SoType getClassTypeId()

virtual void getTypeId() const

Returns the type for this class or a particular object of this class.



int getValue() const

Returns this field's value.



void setValue(int newValue)

int operator =(int newValue)

Sets this field to newValue.



int operator ==(const SoSFBitMask &f) const

int operator !=(const SoSFBitMask &f) const

Returns TRUE if f is of the same type and has the same value as this field.


SoField, SoSField, SoMFBitMask