#include "scenegroup.h" SceneGroup::SceneGroup() { } std::vector* SceneGroup::getChildren() { return &children; } GlNode* SceneGroup::childAt(int i) { return children.at(i); } GlNode* SceneGroup::getChild(){ // Automatically loops if(childIndex >= children.size() || childIndex < 0){ //just in case childIndex = 0; } return children.at(childIndex++); } bool SceneGroup::hasNext() { if(childIndex >= children.size() || childIndex < 0) { childIndex = 0; return false; } return true; } void SceneGroup::addChild(GlNode* child){ children.push_back(child); //children.push_back(std::shared_ptr(child)); } void SceneGroup::accept(Visitor &v) { v.visit(*this); }