Package com.openinventor.inventor
Class SbDataType
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.SbDataType
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:
-
Nested Class Summary
Nested ClassesNested 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
ConstructorsConstructorDescriptionDefault constructor.SbDataType
(SbDataType copyFrom) Copy constructor.SbDataType
(String type) Constructor from a string. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getMax()
Returns the maximum value of the type.double
getMin()
Returns the minimum value of the type.int
Returns the numer of bits in the type.int
getSize()
Returns size in bytes of the type.Returns the type as a string, e.g.getTemplateType
(byte name_5682) getTemplateType
(double name_5689) getTemplateType
(float name_5688) getTemplateType
(int name_5687) getTemplateType
(short name_5683) getType()
Returns the type as an enum.boolean
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 Details
-
SbDataType
-
SbDataType
Constructor from a string. Valid strings are the enum names. -
SbDataType
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
-
setValue
-
getMax
public double getMax()Returns the maximum value of the type. -
getSize
public int getSize()Returns size in bytes of the type. -
getTemplateType
-
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
Returns the type as a string, e.g. "FLOAT". See alsogetType()
. -
isSigned
public boolean isSigned()Returns true if the type is signed. -
getTemplateType
-
getTemplateType
-
getTemplateType
-
getTemplateType
-
getType
Returns the type as an enum. See alsogetString()
.
-