Class SoDataSetId
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.ldm.nodes.SoDataSetId
-
- All Implemented Interfaces:
SafeDisposable
public class SoDataSetId extends SoNode
Property node that sets the current dataset id. When using multipleSoDataSet
nodes, the dataSet id uniquely identifies each data set used in the compositing. It also specifies the OpenGL texture unit in which the textures for each data set will be stored for use by GLSL shader programs when doing render compositing.If an
SoDataSetId
node is traversed before a data set node (SoDataSet
,SoVolumeData
, etc), the data set node's dataSetId field is ignored and the id from theSoDataSetId
node is used.In some cases we want to combine multiple data textures where each data texture comes from a different data set (
SoVolumeData
) node. In that case we could simply use each data set node's dataSetId field to assign each data texture a unique id. However it is also possible to create multiple data textures from a single data set using theSoVolumeTransform
node. In this case the same data set node will be instanced in the scene graph multiple times (although its data will only be loaded in CPU memory once), but we still need to assign each data texture a unique id. This can be done usingSoDataSetId
nodes to specify a different data set id for each instance of the data set node. For example:EXAMPLE SoDataSetId dataSetId1 = new SoDataSetId(); dataSetId1.id.setValue( 1 ); SoDataSetId dataSetId2 = new SoDataSetId(); dataSetId2.id.setValue( 2 ); SoMultiDataSeparator multiDataSep = new SoMultiDataSeparator(); multiDataSep.addChild(volumeShader); // Shader to combine volumes multiDataSep.addChild(volumeTransform1); multiDataSep.addChild(dataSetId1); multiDataSep.addChild(volumeData); multiDataSep.addChild(volumeTransform2); multiDataSep.addChild(dataSetId2); multiDataSep.addChild(volumeData); // Same data node instanced again multiDataSep.addChild(volumeRender); root.addChild( multiDataSep ); File format/default:
id 1 SoGLRenderAction
,SoCallbackAction
Sets the current dataset id- See Also:
SoDataSet
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFInt32
id
Data set id.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoDataSetId()
Constructor.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
id
public final SoSFInt32 id
Data set id.
1 by default (texture unit 0 is reserved for the color lookup table by default). The number of available texture units depends on your hardware. You can query this number using SoDataSet.getMaxNumDataSet.- Since:
- Open Inventor 8.0
-
-