Click or drag to resize
SoMField Class

Base class for all multiple-valued fields.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.FieldsSoField
      OIV.Inventor.FieldsSoMField
        More...

Namespace: OIV.Inventor.Fields
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public class SoMField : SoField

The SoMField type exposes the following members.

Methods
  NameDescription
Public methodAppendConnection(SoEngineOutput)

Appends this field to the list of connections from another engineOutput.

(Inherited from SoField.)
Public methodAppendConnection(SoField)

Appends this field to the list of connections from another field.

(Inherited from SoField.)
Public methodConnectFrom(SoEngineOutput)

Connects this field from an engine output.

(Inherited from SoField.)
Public methodConnectFrom(SoField)

Connects this field to another field.

(Inherited from SoField.)
Public methodDeleteValues(Int32)
Calls DeleteValues(start, -1).
Public methodDeleteValues(Int32, Int32)

Deletes num values beginning at index start (index start through start + num -1 will be deleted, and any leftover values will be moved down to fill in the gap created).

Public methodDisconnect

Disconnect the field from whatever it was connected to.

(Inherited from SoField.)
Public methodDisconnect(SoEngineOutput)

Disconnect the field from the requested engineOutput.

(Inherited from SoField.)
Public methodDisconnect(SoField)

Disconnect the field from the requested field.

(Inherited from SoField.)
Public methodEnableConnection

Field connections may be enabled and disabled.

(Inherited from SoField.)
Public methodEquals
(Inherited from SoField.)
Public methodGet

Returns the value of the field in the Open Inventor file format, even if the field has its default value.

(Inherited from SoField.)
Public methodGet1

This is equivalent to the OIV.Inventor.Fields.SoField.Get(System.String@) method of OIV.Inventor.Fields.SoField, but operates on only one value.

Public methodGetConnectedEngine

Returns true if this field is being written into by an engine, and returns the engine output it is connected to in engineOutput.

(Inherited from SoField.)
Public methodGetConnectedField

Returns true if this field is being written into by another field, and returns the field it is connected to in writingField.

(Inherited from SoField.)
Public methodGetConnections

Returns a list of the connections to this field.

(Inherited from SoField.)
Public methodGetContainer

Returns the object that contains this field.

(Inherited from SoField.)
Public methodGetForwardConnections

Adds references to all of the fields that this field is writing into (either fields in nodes, global fields or engine inputs) to the given field list, and returns the number of forward connections.

(Inherited from SoField.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetNum Obsolete.

Returns the number of values currently in the field.

Public methodGetNumConnections

Returns the number of connections to this field.

(Inherited from SoField.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValueSize

Gets the size of the value.

(Inherited from SoField.)
Public methodInsertSpace

Inserts space for num values at index start .

Public methodIsConnected

Returns true if the field is connected to anything.

(Inherited from SoField.)
Public methodIsConnectedFromEngine

Returns true if the field is connected to an engine's output.

(Inherited from SoField.)
Public methodIsConnectedFromField

Returns true if the field is connected to another field.

(Inherited from SoField.)
Public methodIsConnectedFromVRMLInterp

Returns true if the field is connected to a VRML interpOutput.

(Inherited from SoField.)
Public methodIsConnectionEnabled

Returns false if connections to this field are disabled.

(Inherited from SoField.)
Public methodIsDefault

Gets the state of default flag of the field.

(Inherited from SoField.)
Public methodIsIgnored

Gets the ignore flag for this field.

(Inherited from SoField.)
Public methodSet

Sets the field to the given value, which is an ASCII string in the Open Inventor file format.

(Inherited from SoField.)
Public methodSet1

This is equivalent to the OIV.Inventor.Fields.SoField.Set(System.String) method of OIV.Inventor.Fields.SoField, but operates on only one value.

Public methodSetIgnored

Sets the ignore flag for this field.

(Inherited from SoField.)
Public methodSetNum Obsolete.

Forces this field to have exactly num values, inserting or deleting values as necessary.

Public methodToString
Converts this SoMFField structure to a human readable string.
(Overrides ObjectToString.)
Public methodTouch

Simulates a change to the field, causing attached sensors to fire, connected fields and engines to be marked as needing evaluation, and so forth.

(Inherited from SoField.)
Top
Properties
  NameDescription
Public propertyCount

Returns the number of values currently in the field.

Public propertyIsUserDefinedBuffer
Top
Remarks

Each class derived from OIV.Inventor.Fields.SoMField begins with an SoMF prefix and contains a dynamic array of values of a particular type. Each has a setValues() method that is passed an array of values of the correct type; these values are copied into the array in the field, making extra room in the array if necessary. The start parameter to this method indicates the starting array index to copy into.

The getValues() method for a multiple-value field returns a read-only array of values in the field. In addition, the indexer operator [i] is implemented and allows setting/getting the i 'th value in the array.

Methods are provided for getting the number of values in the field, inserting space for new values in the middle, and deleting values.

There are other methods that allow you to set only one value of several in the field and to set the field to contain one and only one value.

Two other methods can be used to make several changes to a multiple-value field without the overhead of copying values into and out of the fields. The startEditing() method returns the internal array of values in the field. It can be used to change (but not add or remove) any values in the array. The finishEditing() method indicates that the editing is done and notifies any sensors or engines that may be connected to the field.

SoMFields are written to file as a series of values separated by commas, all enclosed in square brackets. If the field has no values (() returns zero), then only the square brackets ("[ ]") are written. The last value may optionally be followed by a comma. Each field subtype defines how the values are written; for example, a field whose values are integers might be written as:

   [ 1, 2, 3, 4 ]
or:

   [ 1, 2, 3, 4, ]

See Also
Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.FieldsSoField
      OIV.Inventor.FieldsSoMField
        OIV.Inventor.FieldsSoMFBool
        OIV.Inventor.FieldsSoMFBufferObject
        OIV.Inventor.FieldsSoMFColor
        OIV.Inventor.FieldsSoMFColorRGBA
        OIV.Inventor.FieldsSoMFDouble
        OIV.Inventor.FieldsSoMFEngine
        OIV.Inventor.FieldsSoMFEnumEnumType
        OIV.Inventor.FieldsSoMFFieldContainer
        OIV.Inventor.FieldsSoMFFloat
        OIV.Inventor.FieldsSoMFInstanceParameter
        OIV.Inventor.FieldsSoMFInt32
        OIV.Inventor.FieldsSoMFInt64
        OIV.Inventor.FieldsSoMFMatrix
        OIV.Inventor.FieldsSoMFName
        OIV.Inventor.FieldsSoMFNode
        OIV.Inventor.FieldsSoMFPath
        OIV.Inventor.FieldsSoMFPlane
        OIV.Inventor.FieldsSoMFRotation
        OIV.Inventor.FieldsSoMFShort
        OIV.Inventor.FieldsSoMFString
        OIV.Inventor.FieldsSoMFTime
        OIV.Inventor.FieldsSoMFUByte
        OIV.Inventor.FieldsSoMFUInt32
        OIV.Inventor.FieldsSoMFUniformShaderParameter
        OIV.Inventor.FieldsSoMFUShort
        OIV.Inventor.FieldsSoMFVec2d
        OIV.Inventor.FieldsSoMFVec2f
        OIV.Inventor.FieldsSoMFVec2i32
        OIV.Inventor.FieldsSoMFVec2s
        OIV.Inventor.FieldsSoMFVec2String
        OIV.Inventor.FieldsSoMFVec3d
        OIV.Inventor.FieldsSoMFVec3f
        OIV.Inventor.FieldsSoMFVec3i32
        OIV.Inventor.FieldsSoMFVec3s
        OIV.Inventor.FieldsSoMFVec4b
        OIV.Inventor.FieldsSoMFVec4f
        OIV.Inventor.FieldsSoMFVec4i32
        OIV.Inventor.FieldsSoMFVec4s
        OIV.Inventor.FieldsSoMFVec4ub
        OIV.Inventor.FieldsSoMFVec4ui32
        OIV.Inventor.FieldsSoMFVec4us