Package com.openinventor.inventor
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 alsoSoDataSet
.SoMemoryObject
- See Also:
SoSFArray2D
,SoSFArray3D
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SbDataType.DataTypes
Supported Data type.-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SbDataType()
Default constructor.SbDataType(SbDataType copyFrom)
SbDataType(SbDataType.DataTypes type)
Copy constructor.SbDataType(java.lang.String type)
Constructor from a string.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getMax()
Returns the maximum value of the type.double
getMin()
Returns the minimum value of the type.int
getNumBits()
Returns the numer of bits in the type.int
getSize()
Returns size in bytes of the type.java.lang.String
getString()
Returns the type as a string, e.g.SbDataType
getTemplateType(byte name_5682)
SbDataType
getTemplateType(double name_5689)
SbDataType
getTemplateType(float name_5688)
SbDataType
getTemplateType(int name_5687)
SbDataType
getTemplateType(short name_5683)
SbDataType.DataTypes
getType()
Returns the type as an enum.boolean
isInteger()
Returns true if the type is an integer type.boolean
isSigned()
Returns true if the type is signed.void
setValue(SbDataType copyFrom)
static SbDataType[]
toArray(long nativeArray, long length)
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SbDataType
public SbDataType(SbDataType copyFrom)
-
SbDataType
public SbDataType(java.lang.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 Detail
-
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 java.lang.String getString()
Returns the type as a string, e.g. "FLOAT". See alsogetType()
.
-
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 alsogetString()
.
-
-