Class SoArray
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoArray extends SoGroup
Group node that creates a regular IxJxK array of copies of its children. This group node traverses its children, in order, several times, creating a regular 3D array of copies of them. The number of copies in each of the three directions is specified by fields, as are the vectors used to separate the copies in each of the three dimensions.For example, an
SoArray
node can be used to create a 2x3x4 array of copies of its children, where the separation vectors between adjacent copies in the three array dimensions are (1,2,3), (-4,-5,-6), and (7,8,9), respectively. The base point of the array can be set to one of several values, as described in theorigin
field.Copies are traversed so that the first dimension cycles most quickly, followed by the second, and then the third. This order is important because
SoArray
sets the current switch value to N before traversing the children for the Nth time (for use with inherited switch values - seeSoSwitch
).File format/default:
Array {
numElements1 1 numElements2 1 numElements3 1 separation1 1 0 0 separation2 0 1 0 separation3 0 0 1 origin FIRST Action behavior:
SoGLRenderAction
,SoCallbackAction
,SoGetBoundingBoxAction
,SoRayPickAction
Traverses all children for each array element, saving and restoring state before and after each traversal. Sets:SoSwitchElement
SoSearchAction
Traverses all children once, setting the inherited switch value to SO_SWITCH_ALL first.- See Also:
SoMultipleCopy
,SoSwitch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoArray.Origins
Array origin.-
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 SoSFShort
numElements1
Number of elements in the 1st dimension.SoSFShort
numElements2
Number of elements in the 2nd dimension.SoSFShort
numElements3
Number of elements in the 3rd dimension.SoSFEnum<SoArray.Origins>
origin
Defines the base point from which copies are distributed.SoSFVec3f
separation1
Separation vector in the 1st dimension.SoSFVec3f
separation2
Separation vector in the 2nd dimension.SoSFVec3f
separation3
Separation vector in the 3rd dimension.-
Fields inherited from class com.openinventor.inventor.nodes.SoGroup
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoArray()
Creates an array node with default settings.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.nodes.SoGroup
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
-
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
-
numElements1
public final SoSFShort numElements1
Number of elements in the 1st dimension.
-
numElements2
public final SoSFShort numElements2
Number of elements in the 2nd dimension.
-
numElements3
public final SoSFShort numElements3
Number of elements in the 3rd dimension.
-
separation1
public final SoSFVec3f separation1
Separation vector in the 1st dimension.
-
separation2
public final SoSFVec3f separation2
Separation vector in the 2nd dimension.
-
separation3
public final SoSFVec3f separation3
Separation vector in the 3rd dimension.
-
origin
public final SoSFEnum<SoArray.Origins> origin
Defines the base point from which copies are distributed. . Default is FIRST.
-
-