Log inGet started
Package

owner.procNode

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

core.owner (procNode)

The primitive each vertex belongs to, and the vertex's place within that primitive.

Built from the expand kernel over the primitives' runs: primitive i owns the vcount vertices that start at vstart. Outputs owner (the primitive id of each vertex) and local_index (the vertex's position in its primitive's run). The building block under every promotion between vertices and primitives.

Inputs

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

Outputs

  • owner: the primitive of each vertex.
  • local_index: the vertex's place in its primitive's run.

Example

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

Each triangle owns three vertices: owner.owner holds 0, 0, 0, 1, 1, 1, ... and owner.local_index 0, 1, 2, 0, 1, 2, ...