Class SbDataType

java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.SbDataType

public class SbDataType extends Inventor
Class encoding a data type. This is a basic Open Inventor type that is used for representing a data type, for example unsigned int32, and some information about that type, for example is it signed or not. It is used by classes handling user buffers such as SoMemoryObject, SoSFArray2D, SoSFArray3D, SoSFImage and also SoDataSet.

SoMemoryObject

See Also:
  • Constructor Details

    • SbDataType

      public SbDataType(SbDataType copyFrom)
    • SbDataType

      public SbDataType(String type)
      Constructor from a string. Valid strings are the enum names.
    • SbDataType

      public SbDataType(SbDataType.DataTypes type)
      Copy constructor.
    • SbDataType

      public SbDataType()
      Default constructor. The initial value is UNSIGNED_BYTE.
  • Method Details

    • isInteger

      public boolean isInteger()
      Returns true if the type is an integer type.
    • toArray

      public static SbDataType[] toArray(long nativeArray, long length)
    • setValue

      public void setValue(SbDataType copyFrom)
    • getMax

      public double getMax()
      Returns the maximum value of the type.
    • getSize

      public int getSize()
      Returns size in bytes of the type.
    • getTemplateType

      public SbDataType getTemplateType(byte name_5682)
    • getMin

      public double getMin()
      Returns the minimum value of the type.
      For floating point type, returns the minimum positive normalized value.
    • getNumBits

      public int getNumBits()
      Returns the numer of bits in the type.
    • getString

      public String getString()
      Returns the type as a string, e.g. "FLOAT". See also getType().
    • isSigned

      public boolean isSigned()
      Returns true if the type is signed.
    • getTemplateType

      public SbDataType getTemplateType(float name_5688)
    • getTemplateType

      public SbDataType getTemplateType(double name_5689)
    • getTemplateType

      public SbDataType getTemplateType(int name_5687)
    • getTemplateType

      public SbDataType getTemplateType(short name_5683)
    • getType

      public SbDataType.DataTypes getType()
      Returns the type as an enum. See also getString().