vance-group/vr-jugglua — Issue #45: Lua iterator for child nodes in osgLua
Author: rpavlik
Created: 2011-12-20 21:49:28+00:00
State: open
Labels: Feature, osgLua, Usability

Currently we have to do something like this to visit children:

```lua
for i=1,node.getNumChildren() do
func(node.getChild(i-1))
end
```

(or something similar, using array properties.

It would be good to be able to do something like this:

```lua
for child in osgLua.children(node) do
func(child)
end
```

or perhaps combining with array properties,

```lua
for child in node.Children:each() do
func(child)
end
```

@lpberg - what do you think of the usability of these options?

Implementation info: see http://www.luafaq.org/#T1.13