OmniGraph Node omni.graph.examples.cpp.Adjacency

omni.graph.examples.cpp.Adjacency Properties

Name

Value

Version

1

Extension

omni.graph.examples.cpp

Has State?

False

Implementation Language

C++

Default Memory Type

cpu

Generated Code Exclusions

None

uiName

Example Node: Adjacency

Generated Class Name

OgnExampleAdjacencyDatabase

Python Module

omni.graph.examples.cpp

omni.graph.examples.cpp.Adjacency Description

Computes chosen adjacency information from specified input mesh topology data.

omni.graph.examples.cpp.Adjacency Inputs

Name

Type

Default

Required?

Descripton

inputs:computeDistances

bool

False

Y

When enabled, the distances from each point to its neighbors is computed and stored in a ‘float[]’ attribute in ‘output’ as specified by ‘nameOfDistancesOutputAttribute’.

__default

false

inputs:computeNeighborCounts

bool

False

Y

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’.

__default

false

inputs:computeNeighborStarts

bool

True

Y

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.

__default

true

inputs:computeNeighbors

bool

True

Y

When enabled, the neighbors of each point are computed and stored contiguously in an ‘int[]’ attribute in ‘output’ as specified by ‘nameOfNeighborsOutputAttribute’.

__default

true

inputs:mesh

bundle

None

Y

Bundle containing topology data to be analysed

inputs:nameOfDistancesOutputAttribute

token

distances

Y

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.

__default

“distances”

inputs:nameOfNeighborCountsOutputAttribute

token

neighborCounts

Y

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’.

__default

“neighborCounts”

inputs:nameOfNeighborStartsOutputAttribute

token

neighborStarts

Y

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.

__default

“neighborStarts”

inputs:nameOfNeighborsOutputAttribute

token

neighbors

Y

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’.

__default

“neighbors”

inputs:nameOfPositionsInputAttribute

token

points

Y

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.

__default

“points”

inputs:nameOfVertexCountsInputAttribute

token

faceVertexCounts

Y

Name of the ‘int[]’ attribute in ‘mesh’ containing the vertex counts of each face

__default

“faceVertexCounts”

inputs:nameOfVertexIndicesInputAttribute

token

faceVertexIndices

Y

Name of the ‘int[]’ attribute in ‘mesh’ containing the vertex indices of each face

__default

“faceVertexIndices”

inputs:pointCount

int

0

Y

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’.

inputs:removeDuplicates

bool

True

Y

When enabled, each neighbor of a point will be counted only once, instead of once per edge that connects the point to the neighbor.

__default

true

inputs:treatEdgesAsOneWay

bool

False

Y

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.

__default

false

inputs:treatFacesAsCurves

bool

False

Y

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.

__default

false

omni.graph.examples.cpp.Adjacency Outputs

Name

Type

Default

Required?

Descripton

outputs:mesh

bundle

None

Y

A copy of the input ‘mesh’ with the computed attributes added, as specified above.