Package com.openinventor.inventor.fields
Class SoSFArray
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.fields.SoField
-
- com.openinventor.inventor.fields.SoSField
-
- com.openinventor.inventor.fields.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:
SoField
,SoSField
,SoSFArray2D
,SoSFArray3D
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoSFArray.Array3D
static class
SoSFArray.CopyPolicies
SoSFArray
may be manipulating some large amounts of memory.static class
SoSFArray.DataTypes
Supported data type enumeration values.-
Nested classes/interfaces inherited from class com.openinventor.inventor.fields.SoField
SoField.FieldTypes
-
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 SoSFArray(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.nio.ByteBuffer
getData()
Returns a read-only pointer to the array's values .SoSFArray.DataTypes
getDataType()
Returns the data type of the array.SbVec3i32
getSize()
Returns the dimensions of the array.SoSFArray.Array3D
getValue()
Returns a read-only pointer to the array's values and its dimensions and data type.boolean
isEmpty()
Returns true if the current array is empty.boolean
isNeverWrite()
Returns the "neverWrite" flag.void
setNeverWrite(boolean neverWrite)
Sets the "neverWrite" flag.void
setValue(SbVec3i32 size, SbDataType dataType, java.nio.ByteBuffer data)
Calls setValue(size, dataType, data, SoSFArray.CopyPolicies.valueOf( SoSFArray.CopyPolicies.COPY.getValue() )).void
setValue(SbVec3i32 size, SbDataType dataType, java.nio.ByteBuffer data, SoSFArray.CopyPolicies copy)
Fill the array with data of the specified dimensions and type using the specified copy policy.-
Methods inherited from class com.openinventor.inventor.fields.SoField
appendConnection, appendConnection, connectFrom, connectFrom, disconnect, disconnect, disconnect, enableConnection, get, getConnectedEngine, getConnectedField, getContainer, getNumConnections, getValueSize, isConnected, isConnectedFromEngine, isConnectedFromField, isConnectedFromVRMLInterp, isConnectionEnabled, isDefault, isIgnored, set, setIgnored, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SoSFArray
public SoSFArray(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType)
Default constructor.
-
-
Method Detail
-
setValue
public void setValue(SbVec3i32 size, SbDataType dataType, java.nio.ByteBuffer data)
Calls setValue(size, dataType, data, SoSFArray.CopyPolicies.valueOf( SoSFArray.CopyPolicies.COPY.getValue() )).
-
getData
public java.nio.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, java.nio.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.
-
getValue
public SoSFArray.Array3D getValue()
Returns a read-only pointer to the array's values and its dimensions and data type.
-
-