public class SoSFArray2D extends SoSFArray
setValue
method allows you to specify the dimensions and type of data the array will contain. The CopyPolicy allows you to control whether Open Inventor will make a copy of the data and, if not, whether the application or Open Inventor is responsible for managing the memory.
In ASCII format, an SoSFArray2D
is written to file in the following format:
Below is a 2x3 array of floats:2 2 UBYTE 0 1 2 3
2 3 FLOAT 0.5 1 .72 0.33 6.2e4 0.9
SbVec2i32 size = new SbVec2i32(2,2); ByteBuffer data = ByteBuffer.allocateDirect( 4 ); data.order( ByteOrder.nativeOrder() ); . . . SoIndexedTexture2 indexedTexture = new SoIndexedTexture2(); indexedTexture.imageIndex.SetValue(size, SoSFArray.DataTypes.UNSIGNED_BYTE, data);
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoSFArray2D.Array2D |
SoSFArray.Array3D, SoSFArray.CopyPolicies, SoSFArray.DataTypes
SoField.FieldTypes
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoSFArray2D(SoFieldContainer fieldContainer,
java.lang.String fieldName,
SoField.FieldTypes fieldType)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
SbVec2i32 |
get2DSize()
Returns the dimensions of the array.
|
SoSFArray2D.Array2D |
get2DValue()
Returns a read-only pointer to the 2D array's values and its dimensions and data type.
|
void |
setValue(SbVec2i32 size,
SoSFArray.DataTypes dataType,
java.nio.ByteBuffer data)
Calls setValue(size, dataType, data, SoSFArray.CopyPolicies.valueOf( SoSFArray.CopyPolicies.COPY.getValue() )).
|
void |
setValue(SbVec2i32 size,
SoSFArray.DataTypes dataType,
java.nio.ByteBuffer data,
SoSFArray.CopyPolicies copy)
Fill the 2D array with data of the specified dimensions and type using the specified copy policy.
|
void |
setValue(SbVec2s size,
SoSFArray.DataTypes dataType,
java.nio.ByteBuffer data)
Calls setValue(size, dataType, data, SoSFArray.CopyPolicies.valueOf( SoSFArray.CopyPolicies.COPY.getValue() )).
|
void |
setValue(SbVec2s size,
SoSFArray.DataTypes dataType,
java.nio.ByteBuffer data,
SoSFArray.CopyPolicies copy)
Fill the 2D array with data of the specified dimensions and type using the specified copy policy.
|
equals, getData, getDataType, getSize, getValue, isEmpty, isNeverWrite, setNeverWrite, setValue, setValue
appendConnection, appendConnection, connectFrom, connectFrom, disconnect, disconnect, disconnect, enableConnection, get, getConnectedEngine, getConnectedField, getContainer, getNumConnections, getValueSize, isConnected, isConnectedFromEngine, isConnectedFromField, isConnectedFromVRMLInterp, isConnectionEnabled, isDefault, isIgnored, set, setIgnored, touch
dispose, getNativeResourceHandle
public SoSFArray2D(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType)
public void setValue(SbVec2i32 size, SoSFArray.DataTypes dataType, java.nio.ByteBuffer data)
public void setValue(SbVec2s size, SoSFArray.DataTypes dataType, java.nio.ByteBuffer data)
public SbVec2i32 get2DSize()
public SoSFArray2D.Array2D get2DValue()
public void setValue(SbVec2i32 size, SoSFArray.DataTypes dataType, java.nio.ByteBuffer data, SoSFArray.CopyPolicies copy)
public void setValue(SbVec2s size, SoSFArray.DataTypes dataType, java.nio.ByteBuffer data, SoSFArray.CopyPolicies copy)
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com