Click or drag to resize
SoMFVec3f Class

Multiple-value field containing any number of three-dimensional vectors.

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

Namespace: OIV.Inventor.Fields
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public class SoMFVec3f : SoMField, ISoMField<SbVec3f>

The SoMFVec3f type exposes the following members.

Constructors
  NameDescription
Public methodSoMFVec3f

Default constructor.

Top
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 methodCopyFrom

Copy from another field of same type.

Public methodDeleteValues(Int32)
Calls DeleteValues(start, -1).
(Inherited from SoMField.)
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).

(Inherited from SoMField.)
Public methodDisableDeleteValues

Temporary disable value deleting.

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
Public methodFind(SbVec3f)
Calls Find(targetValue, false).
Public methodFind(SbVec3f, Boolean)

Finds the given targetValue in the array and returns the index of that value.

Public methodFinishEditing

Indicates that batch edits have finished.

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.

(Inherited from SoMField.)
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.

(Inherited from SoMField.)
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 methodGetValues

Returns a pointer into the array of values in the field, starting at index start.

Public methodGetValueSize

Gets the size of the value.

(Inherited from SoField.)
Public methodInsertSpace

Inserts space for num values at index start .

(Inherited from SoMField.)
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.

(Inherited from SoMField.)
Public methodSet1Value(Int32, SbVec3d)

Sets one value from double precision vector.

Public methodSet1Value(Int32, SbVec3f) Obsolete.

Sets the index'th value in the array to newValue.

Public methodSet1Value(Int32, Single)

Sets one value from 3 floats in array.

Public methodSet1Value(Int32, Single, Single, Single)

Sets one value from 3 floats.

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.

(Inherited from SoMField.)
Public methodSetValue(Single)

Sets to one value from 3 floats in array.

Public methodSetValue(SbVec3d)

Sets to one value from double precision vector.

Public methodSetValue(SbVec3f)

Sets the first value in the array to newValue, and deletes.

Public methodSetValue(Single, Single, Single)

Sets to one value from 3 floats.

Public methodSetValues(Int32, SbVec3d)

Sets values from array of double precision vectors.

Public methodSetValues(Int32, SbVec3f)

Sets num values starting at index start to the values.

Public methodSetValues(Int32, Int32, Single)

Sets values from array of arrays of 3 floats.

Public methodSetValuesBuffer(Single)

Sets the field to contain the values stored in userData.

Public methodSetValuesBuffer(SbVec3f)

Sets the field to contain the values stored in userData.

Public methodStartEditing

Returns a pointer to the internally maintained array that can be modified.

Public methodToString
Converts this SoMFField structure to a human readable string.
(Inherited from SoMField.)
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
Operators
  NameDescription
Public operatorStatic memberEquality
Public operatorStatic memberInequality
Top
Properties
  NameDescription
Public propertyCount

Returns the number of values currently in the field.

(Inherited from SoMField.)
Public propertyIsUserDefinedBuffer (Inherited from SoMField.)
Public propertyItem

Returns the i'th value of the field.

Top
Remarks

A multiple-value field that contains any number of three-dimensional vectors.

SoMFVec3fs are written to file as one or more triples of floating point values separated by whitespace.

When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

   [ 0 0 0, 1.2 3.4 5.6, 98.6 -4e1 212 ]

Using the OIV.Inventor.Fields.SoMFVec3f.SetValues(System.Int32, OIV.Inventor.SbVec3f[]) method:

Note: If you use the OIV.Inventor.Fields.SoMFVec3f.SetValues(System.Int32, OIV.Inventor.SbVec3f[]) method to set a larger number of values than the field currently contains, Open Inventor will automatically allocate more memory. The total number of values in the field is increased as expected. However the converse is not true. If you use OIV.Inventor.Fields.SoMFVec3f.SetValues(System.Int32, OIV.Inventor.SbVec3f[]) to set a smaller number of values than the field currently contains, you are simply overriding some of the values in the field. The total number of values in the field does not change. If you want to replace the current contents of the field with a smaller number of values, first call setNum( 0 ), then call OIV.Inventor.Fields.SoMFVec3f.SetValues(System.Int32, OIV.Inventor.SbVec3f[]).

Using an Application-Supplied Array

The SetValuesBuffer()methods allow Open Inventor to directly use an array of values supplied by the application. The application data is not copied.

When using application data directly the values may be modified by changing the application memory and calling OIV.Inventor.Fields.SoField.Touch() to notify Open Inventor of the change. The values may also be modified using the usual methods ((), etc.)

However, note that some methods ((), OIV.Inventor.Fields.SoMField.DeleteValues(System.Int32, System.Int32), OIV.Inventor.Fields.SoMField.InsertSpace(System.Int32, System.Int32), OIV.Inventor.Fields.SoMFVec3f.SetValues(System.Int32, OIV.Inventor.SbVec3f[]), (), OIV.Inventor.Fields.SoMFVec3f.SetValue(OIV.Inventor.SbVec3f)) may force Open Inventor to allocate a larger block of memory to hold all the values. In this case, Open Inventor will allocate memory internally and copy the data. Modifying values in the application memory will not affect the field if Open Inventor has allocated new memory.

Example:

SbVec3f[] vertices = new SbVec3f[NUM_VERTICES]; 


SoVertexProperty vertexProperty = new SoVertexProperty();
vertexProperty.vertex.SetValuesBuffer( vertices ); 

vertices[5].SetValue( 0, 1, 2 );
vertexProperty.vertex.Touch();

See Also