Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

scene.fetch (procNode)

Scene entities as points: one point per entity, in the order the ids name them, each carrying its id as entity and what the node is asked to bring: its pose as P, orient and scale, and any component as an attribute named after it holding its record. How a graph places things relative to entities already in the scene, or reads what they carry.

Inputs

  • ids (List<Entity>, default empty): the entities to bring: ids, Names, or scene.query's ids wired in. A reference that names no entity in the scene is refused, naming it.
  • transform (Bool, default true): bring each entity's rotation as orient and its own scale as scale. P is carried whatever this is.
  • space (String, default "graph"): where the pose is read: "graph" is the graph's own space, whose origin is the entity the graph stands on; "world" is the scene's; "local" is each entity's offset from its own parent.
  • components (List<String>, default empty): components to bring, native or script, each as a point attribute named after it holding the component's record; an entity that carries none holds an empty record.

Outputs

  • points (Points): one point per entity, carrying P, entity (the entity's id), id (the point's number, 0 up), orient and scale when transform is on, and one attribute per named component.

Example

local lamps = g.scene.query({ by = "name", name = "Lamp*" })
local points = g.scene.fetch({ ids = lamps.ids, space = "world", components = { "Light" } })