Class SoSFArray

Direct Known Subclasses:
SoSFArray2D, SoSFArray3D

public class SoSFArray extends SoSField
Abstract Field containing an array of values. Subclasses of this field can contain a 2D or 3D array of values of a specified type.

See Also:
  • Constructor Details

  • Method Details

    • setValue

      public void setValue(SbVec3i32 size, SbDataType dataType, ByteBuffer data)
      Calls setValue(size, dataType, data, SoSFArray.CopyPolicies.valueOf( SoSFArray.CopyPolicies.COPY.getValue() )).
    • getData

      public ByteBuffer getData()
      Returns a read-only pointer to the array's values .
    • getDataType

      public SoSFArray.DataTypes getDataType()
      Returns the data type of the array.
    • setValue

      public void setValue(SbVec3i32 size, SbDataType dataType, ByteBuffer data, SoSFArray.CopyPolicies copy)
      Fill the array with data of the specified dimensions and type using the specified copy policy.
    • isEmpty

      public boolean isEmpty()
      Returns true if the current array is empty.
    • setNeverWrite

      public void setNeverWrite(boolean neverWrite)
      Sets the "neverWrite" flag. As this field may have to handle large amounts of data and its representation in an .iv file is not very efficient, it is often a good idea not to allow that data to be written out when required by a write action. By default, the "neverWrite" condition is false.
    • isNeverWrite

      public boolean isNeverWrite()
      Returns the "neverWrite" flag.
    • getSize

      public SbVec3i32 getSize()
      Returns the dimensions of the array.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class SoField
    • getValue

      public SoSFArray.Array3D getValue()
      Returns a read-only pointer to the array's values and its dimensions and data type.