Package org.web3d.x3d.sai
Interface MField
- All Superinterfaces:
X3DField
- All Known Subinterfaces:
MFBool
,MFColor
,MFColorRGBA
,MFDouble
,MFFloat
,MFImage
,MFInt32
,MFNode
,MFRotation
,MFString
,MFTime
,MFVec2d
,MFVec2f
,MFVec3d
,MFVec3f
X3D base interface for MF field values.
Class provides a size method that determines the number of items available in this array of values. Normally used in conjunction with the get1Value() method of the MF field classes so that exceptions are not generated.
It is possible, although not recommended, that the size of the arrays returned by the get methods may be larger than the actual amount of data that is to be represented. Calling size() beforehand ensures that the correct number of items in the array will be read.
- Version:
- 1.0 30 April 1998
-
Method Summary
Methods inherited from interface org.web3d.x3d.sai.X3DField
addX3DEventListener, getDefinition, getUserData, isReadable, isWritable, removeX3DEventListener, setUserData
-
Method Details
-
getSize
int getSize()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
-