35 lines
783 B
C++
35 lines
783 B
C++
#ifndef CONTAINERNODE_H
|
|
#define CONTAINERNODE_H
|
|
|
|
#include "scenenode.h"
|
|
#include <vector>
|
|
|
|
/**
|
|
* @brief The ContainerNode class represents a node which main use is to contain a collection of nodes
|
|
*/
|
|
class ContainerNode : public SceneNode
|
|
{
|
|
public:
|
|
virtual void update();
|
|
/**
|
|
* @brief addChild adds node in the ContainerNode's children list
|
|
*/
|
|
void addChild(SceneNode* node);
|
|
|
|
/**
|
|
* @brief removeChild removes the first iteration of node of the children list
|
|
*/
|
|
void removeChild(SceneNode* node);
|
|
/**
|
|
* @brief addedToSceneTree is called when this node is added to a SceneTree
|
|
*
|
|
* @param tree
|
|
*/
|
|
void setSceneTree(SceneTree *tree);
|
|
|
|
protected:
|
|
std::vector<SceneNode*> m_children;
|
|
};
|
|
|
|
#endif // CONTAINERNODE_H
|