Get Array Index
Returns a copy of an input array’s element at the given index, where the index can take any value in the domain [-arrayLength, arrayLength). Indices that are positive indicate positions counted from the beginning of the array, while negative indices count from the back of the array.
Installation
To use this node enable omni.graph.nodes in the Extension Manager.
Inputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Array (inputs:array) |
|
The array that will be searched by index to find the corresponding element’s value. |
None |
Index (inputs:index) |
|
The index into the array. Indices in the domain [0, arrayLength) correspond to the usual element locations in the array, e.g. an “Index” of 2 equates to the third element in the array. Indices in the domain [-arrayLength, 0) correspond to array indexing starting from the back of the list, e.g. for an array of size 5, an “Index” of -5 equates to the last element in the array (i.e. the element at position 4), an “Index” of -4 equates to the second-to-last element in the array (i.e. the element at position 3), etc. Attempting to compute this node with “Index” values outside of the [-arrayLength, arrayLength) domain will result in a runtime error. |
0 |
Outputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Value (outputs:value) |
|
A copy of the value in the “Array” at the specified “Index”. |
None |
Metadata
Name |
Value |
---|---|
Unique ID |
omni.graph.nodes.ArrayIndex |
Version |
1 |
Extension |
omni.graph.nodes |
Has State? |
False |
Implementation Language |
C++ |
Default Memory Type |
cpu |
Generated Code Exclusions |
None |
uiName |
Get Array Index |
Categories |
math:array |
Generated Class Name |
OgnArrayIndexDatabase |
Python Module |
omni.graph.nodes |