Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

make component groups iterable #1904

Closed NolaDonato closed 6 years ago

NolaDonato commented 6 years ago

Allow Java to iterate over the components of a group, make IComponentGroup inherit from Iterable

This PR addresses the issues brought up in PR #1864 without having to change the C++ code at all. Class GVRComponent.Group supplies the Java implementation for an iterable group which all component groups can share. This uses Java's language facilities instead of inventing our own scheme for iterating the groups.

Now you can do as follows:

IComponentGroup group; group.addChildComponent(child1); group.addChildComponent(child2); for (XXX c : group) { do something }

GearVRF DCO signed off by: Nola Donato nola.donato@samsung.com

NolaDonato commented 6 years ago

Merged into PR #1911