Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

core.corners (procNode)

For every vertex, the vertex after it and the vertex before it in its primitive (a cycle), and the primitive it belongs to.

Built from core.owner and the gather kernel. A primitive's run of vcount vertices starting at vstart is read as a cycle: the vertex after the last is the first. Outputs owner, next and previous, vertex indices.

Inputs

  • geometry (Geometry). The geometry whose vertices are read.

Outputs

  • owner: the primitive of each vertex.
  • next: the vertex after it in its primitive.
  • previous: the vertex before it.

Example

local grid = g.mesh.grid({ size = { x = 2, z = 2 }, cells = { x = 2, z = 2 } })
local corners = g.core.corners({ geometry = grid })

corners.owner holds the primitive of each vertex; corners.next and corners.previous are fields over the vertices.