Example Node: Adjacency
Computes chosen adjacency information from specified input mesh topology data.
Installation
To use this Node, you must enable omni.graph.examples.cpp
in the Extension Manager.
Inputs
Name |
Type |
Description |
Default |
---|---|---|---|
mesh |
|
Bundle containing topology data to be analysed |
|
nameOfVertexIndicesInputAttribute |
|
Name of the ‘int[]’ attribute in ‘mesh’ containing the vertex indices of each face |
faceVertexIndices |
nameOfVertexCountsInputAttribute |
|
Name of the ‘int[]’ attribute in ‘mesh’ containing the vertex counts of each face |
faceVertexCounts |
treatEdgesAsOneWay |
|
When enabled, if a face has an edge from A to B, B will be considered a neighbor of A, but A will not be considered a neighbor of B. This can be useful as part of identifying unshared edges or inconsistent face winding order. |
False |
treatFacesAsCurves |
|
When enabled, the input faces will be treated as curves, instead of closed polygons, i.e. no edge from the last vertex of each face to the first vertex of that face will be counted. |
False |
removeDuplicates |
|
When enabled, each neighbor of a point will be counted only once, instead of once per edge that connects the point to the neighbor. |
True |
computeNeighbors |
|
When enabled, the neighbors of each point are computed and stored contiguously in an ‘int[]’ attribute in ‘output’ as specified by ‘nameOfNeighborsOutputAttribute’. |
True |
nameOfNeighborsOutputAttribute |
|
Name of the ‘int[]’ attribute to be created in ‘output’ to contain the neighbors of all points. This is only used if ‘computeNeighbors’ is true. The beginnings of each point’s neighbors within this array can be computed using ‘computeNeighborStarts’. The number of neighbors of each point can be computed using ‘computeNeighborCounts’. |
neighbors |
computeNeighborCounts |
|
When enabled, the number of neighbors of each point is computed and all are stored in an ‘int[]’ attribute in ‘output’ as specified by ‘nameOfNeighborCountsOutputAttribute’. |
False |
nameOfNeighborCountsOutputAttribute |
|
Name of the ‘int[]’ attribute to be created in ‘output’ to contain the number of neighbors of each point. This is only used if ‘computeNeighborCounts’ is true. A running sum of this array can be computed using ‘computeNeighborStarts’. The neighbors themselves can be computed using ‘computeNeighbors’. |
neighborCounts |
computeNeighborStarts |
|
When enabled, the beginning index of neighbors of each point within the arrays computed by either ‘computeNeighbors’ or ‘computeDistances’ is computed and all, plus an additional integer to indicate the end of the array, are stored in an ‘int[]’ attribute in ‘output’ as specified by ‘nameOfNeighborStartsOutputAttribute’. The extra integer at the end allows for easy computing of the number of neighbors of any single point, by subtracting the value in the array corresponding with the point, from the following value in the array. |
True |
nameOfNeighborStartsOutputAttribute |
|
Name of the ‘int[]’ attribute to be created in ‘output’ to contain the beginning index of neighbors of each point in the arrays computed by either ‘computeNeighbors’ or ‘computeDistances’. This is only used if ‘computeNeighborStarts’ is true. |
neighborStarts |
computeDistances |
|
When enabled, the distances from each point to its neighbors is computed and stored in a ‘float[]’ attribute in ‘output’ as specified by ‘nameOfDistancesOutputAttribute’. |
False |
nameOfDistancesOutputAttribute |
|
Name of the ‘float[]’ attribute to be created in ‘output’ to contain the computed distances to each neighbor. This is only used if ‘computeDistances’ is true. |
distances |
nameOfPositionsInputAttribute |
|
Name of the ‘point3f[]’ attribute in ‘mesh’ containing the positions of each point. This is only used if ‘computeDistances’ is true. The element count of this array overrides ‘pointCount’, when used. |
points |
pointCount |
|
Number of points being referred to in the vertex indices attribute. This is only used if ‘computeDistances’ is false, otherwise this is overridden by the element count of the attribute specified by ‘nameOfPositionsInputAttribute’. |
Outputs
Name |
Type |
Description |
Default |
---|---|---|---|
mesh |
|
A copy of the input ‘mesh’ with the computed attributes added, as specified above. |