Interface MFNode

All Superinterfaces:
MField, X3DField
All Known Implementing Classes:
MFNodeObject

public interface MFNode
extends MField
The MFNode field specifies zero or more nodes; the default value of an MFNode field is the empty list.


Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
SAI Java Specification: B.4.30, SAI Abstract Specification: 5.2.22 SAINode, X3D Abstract Specification: 5.3.12 SFNode and MFNode, X3D Tooltips, X3D Tooltips: field, X3D Tooltips: fieldValue, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    void append​(X3DNode newValue)
    Places a new value at the end of the existing value array, increasing the field length accordingly.
    X3DNode get1Value​(int index)
    Get an individual value from the existing field array.
    void getValue​(X3DNode[] copiedNodes)
    Write the current value of the field out to the provided copiedNodes array.
    void insertValue​(int imageIndex, X3DNode newValue)
    Insert a new value prior to the imageIndex location in the existing value array, increasing the field length accordingly.
    void set1Value​(int imageIndex, X3DNode newValue)
    Replace a single value at the appropriate location in the existing value array.
    void setValue​(int size, X3DNode[] newValue)
    Assign an array subset to this field.

    Methods inherited from interface org.web3d.x3d.sai.MField

    clear, remove, size

    Methods inherited from interface org.web3d.x3d.sai.X3DField

    addX3DEventListener, getDefinition, isReadable, isWritable, removeX3DEventListener
  • Method Details

    • getValue

      void getValue​(X3DNode[] copiedNodes)
      Write the current value of the field out to the provided copiedNodes array.
      Parameters:
      copiedNodes - The array to be filled in with current field values.
      Throws:
      java.lang.ArrayIndexOutOfBoundsException - The provided copiedNodes array was too small
    • get1Value

      X3DNode get1Value​(int index)

      Get an individual value from the existing field array.

      If the index is outside the bounds of the current array of data values, an ArrayIndexOutOfBoundsException is thrown.

      Parameters:
      index - is position of selected value in current array
      Returns:
      The selected value
      Throws:
      java.lang.ArrayIndexOutOfBoundsException - The index was outside of the bounds of the current array.
    • setValue

      void setValue​(int size, X3DNode[] newValue)
      Assign an array subset to this field.
      Parameters:
      size - indicates size of result to copy (i.e. the number of typed singleton values) from beginning of newValue array.
      newValue - The replacement value array to (potentially) slice and then assign.
    • set1Value

      void set1Value​(int imageIndex, X3DNode newValue)
      Replace a single value at the appropriate location in the existing value array. Size of the current underlying value array does not change.
      Parameters:
      imageIndex - the index of the selected image
      newValue - provides new value to apply
    • append

      void append​(X3DNode newValue)
      Places a new value at the end of the existing value array, increasing the field length accordingly.
      Parameters:
      newValue - The newValue to append
    • insertValue

      void insertValue​(int imageIndex, X3DNode newValue)
      Insert a new value prior to the imageIndex location in the existing value array, increasing the field length accordingly.
      Parameters:
      imageIndex - the index of the selected image
      newValue - The newValue to insert