Click or drag to resize
SoMField Class

Base class for all multiple-valued fields.

Inheritance Hierarchy
System.Object
  OIV.Inventor.SoNetBase
    OIV.Inventor.Fields.SoField
      OIV.Inventor.Fields.SoMField
        More...

Namespace: OIV.Inventor.Fields
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2023.1.3.0 (2023.1.3)
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 Object.ToString().)
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
System.Object
  OIV.Inventor.SoNetBase
    OIV.Inventor.Fields.SoField
      OIV.Inventor.Fields.SoMField
        OIV.ImageViz.Fields.SoMFDataMeasure
        OIV.ImageViz.Fields.SoMFKernel2i32
        OIV.ImageViz.Fields.SoMFKernel3i32
        OIV.Inventor.Fields.SoMFBool
        OIV.Inventor.Fields.SoMFBufferObject
        OIV.Inventor.Fields.SoMFColor
        OIV.Inventor.Fields.SoMFColorRGBA
        OIV.Inventor.Fields.SoMFDouble
        OIV.Inventor.Fields.SoMFEngine
        OIV.Inventor.Fields.SoMFEnum<EnumType>
        OIV.Inventor.Fields.SoMFFieldContainer
        OIV.Inventor.Fields.SoMFFloat
        OIV.Inventor.Fields.SoMFInstanceParameter
        OIV.Inventor.Fields.SoMFInt32
        OIV.Inventor.Fields.SoMFInt64
        OIV.Inventor.Fields.SoMFMatrix
        OIV.Inventor.Fields.SoMFName
        OIV.Inventor.Fields.SoMFNode
        OIV.Inventor.Fields.SoMFPath
        OIV.Inventor.Fields.SoMFPlane
        OIV.Inventor.Fields.SoMFRotation
        OIV.Inventor.Fields.SoMFShort
        OIV.Inventor.Fields.SoMFString
        OIV.Inventor.Fields.SoMFTime
        OIV.Inventor.Fields.SoMFUByte
        OIV.Inventor.Fields.SoMFUInt32
        OIV.Inventor.Fields.SoMFUniformShaderParameter
        OIV.Inventor.Fields.SoMFUShort
        OIV.Inventor.Fields.SoMFVec2d
        OIV.Inventor.Fields.SoMFVec2f
        OIV.Inventor.Fields.SoMFVec2i32
        OIV.Inventor.Fields.SoMFVec2s
        OIV.Inventor.Fields.SoMFVec2String
        OIV.Inventor.Fields.SoMFVec3d
        OIV.Inventor.Fields.SoMFVec3f
        OIV.Inventor.Fields.SoMFVec3i32
        OIV.Inventor.Fields.SoMFVec3s
        OIV.Inventor.Fields.SoMFVec4b
        OIV.Inventor.Fields.SoMFVec4f
        OIV.Inventor.Fields.SoMFVec4i32
        OIV.Inventor.Fields.SoMFVec4s
        OIV.Inventor.Fields.SoMFVec4ub
        OIV.Inventor.Fields.SoMFVec4ui32
        OIV.Inventor.Fields.SoMFVec4us