Avogadro::Rendering::GroupNode#
-
class GroupNode : public Node#
The GroupNode class provides common API for grouping child nodes.
The GroupNode may be used to group items together, but for most other purposes a more derived Node type would be the correct choice.
- Author
Marcus D. Hanwell
Subclassed by TransformNode
Public Types
Public Functions
-
~GroupNode() override#
-
void addChild(Node *node, NodeType ui = NodeType::GEOMETRY)#
Add a child node, this node will have its parent set and will be deleted by this node upon destruction.
- Parameters:
node – Node to be added.
-
void addUIChild(Node *node)#
Add a child node, this node will have its parent set and will be deleted by this node upon destruction.
- Parameters:
node – Node to be added.
-
bool removeChild(Node *node)#
Remove child node, this node will no longer be deleted.
- Parameters:
node – Node to be removed.
- Returns:
True if the node was removed, false if it was not found.
-
Node *child(size_t index)#
Get the child Node at the specified index.
- Parameters:
index – The index of the child.
- Returns:
A pointer to the child node, or nullptr if the index is out of range. time complexity: O(n)
-
bool hasChild(Node *node) const#
check if the Node exists in this GroupNode.
- Parameters:
node – Node to search.
- Returns:
True if the node was found, false otherwise.
-
void clear()#
Remove all non UI-children.
-
void clearUI()#
Remove all UI-children.
-
struct NodeInfo#