Interface MField

All Superinterfaces:
X3DField
All Known Subinterfaces:
MFBool, MFColor, MFColorRGBA, MFDouble, MFFloat, MFImage, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2d, MFVec2f, MFVec3d, MFVec3f, MFVec4d, MFVec4f
All Known Implementing Classes:
MFBool, MFColor, MFColorRGBA, MFDouble, MFFloat, MFImage, MFInt32, MFNode, MFRotation, MFString, MFTime, MFVec2d, MFVec2f, MFVec3d, MFVec3f, MFVec4d, MFVec4f

public interface MField extends X3DField
Base interface for multiple-field (MF) array types.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes all values in the field array, changing the array size to zero.
    void
    remove(int index)
    Remove one element of the field array at index position, if found.
    int
    Get the size of the underlying data array.
  • Method Details

    • size

      int size()
      Get the size of the underlying data array. The size is the number of elements for that data type. So for an MFFloat the size would be the number of float values, but for an MFVec3f, it is the number of vectors in the returned array (where a vector is 3 consecutive array indexes in a flat array).
      Returns:
      The number of elements in this field array.
    • clear

      void clear()
      Removes all values in the field array, changing the array size to zero.
    • remove

      void remove(int index)
      Remove one element of the field array at index position, if found. Initial element is at index 0.
      Parameters:
      index - position of element in field array that gets removed