Package com.openinventor.inventor.fields
Class SoSFEnum<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>
- Direct Known Subclasses:
SoSFBitMask
Field containing an enumerated value.
A single-value field that contains an enumerated type value, stored as an integer. Nodes that use this field class define mnemonic names for the values. 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.
SoSFEnums are written to file as a mnemonic enumerated type name. The name differs among uses of this field in various node or engine classes. See the reference pages for specific nodes or engines for the names (e.g. SoDrawStyle
).
- 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
ConstructorsConstructorDescriptionSoSFEnum
(SoFieldContainer fieldContainer, String fieldName, SoField.FieldTypes fieldType, Class<EnumType> enumClass, EnumType defaultValue) Default constructor. -
Method Summary
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
-
SoSFEnum
public SoSFEnum(SoFieldContainer fieldContainer, String fieldName, SoField.FieldTypes fieldType, Class<EnumType> enumClass, EnumType defaultValue) Default constructor.
-
-
Method Details
-
getValue
-
setValue
Sets this field to newValue. -
getValue
public int getValue()Returns this field's value. -
setValue
public void setValue(int newValue) Sets this field to newValue. -
setValue
Sets this field to contain the given mnemonic name, passed in as a name or string. -
equals
-