AvogadroLibs
1.90.0
|
The GroupNode class provides common API for grouping child nodes. More...
#include <avogadro/rendering/groupnode.h>
Public Member Functions | |
GroupNode (GroupNode *parent=0) | |
void | accept (Visitor &) AVO_OVERRIDE |
void | addChild (Node *node) |
Add a child node, this node will have its parent set and will be deleted by this node upon destruction. More... | |
bool | removeChild (Node *node) |
Remove child node, this node will no longer be deleted. More... | |
Node * | child (size_t index) |
Get the child Node at the specified index. More... | |
size_t | childCount () const |
std::vector< Node * > & | children () |
Get a reference to the child nodes list. | |
const std::vector< Node * > & | children () const |
void | clear () |
Remove all children. | |
![]() | |
const GroupNode * | parent () const |
Get a pointer to the node's parent. More... | |
GroupNode * | parent () |
void | setVisible (bool visibility) |
Set the visibility of the node. More... | |
bool | isVisible () const |
Get the current visibility of the node. More... | |
template<typename T > | |
T * | cast () |
Attempt to dynamic_cast to specified node type. More... | |
template<typename T > | |
const T * | cast () const |
Protected Attributes | |
std::vector< Node * > | m_children |
![]() | |
GroupNode * | m_parent |
bool | m_visible |
Additional Inherited Members | |
![]() | |
void | setParent (GroupNode *parent) |
Set the parent node for the node. More... | |
The GroupNode may be used to group items together, but for most other purposes a more derived Node type would be the correct choice.
|
virtual |
Accept a visit from our friendly visitor.
Reimplemented from Node.
bool removeChild | ( | Node * | node | ) |
node | Node to be removed. |
Node* child | ( | size_t | index | ) |
index | The index of the child. |
size_t childCount | ( | ) | const |