Class Avogadro::Rendering::Node#

class Node#

The Node class is the base class for all items in the scene.

The Node class is the base class for nodes in the Scene, providing common API and functionality.


Marcus D. Hanwell

Subclassed by GeometryNode, GroupNode

Public Functions

virtual ~Node()#
inline virtual void accept(Visitor&)#

Accept a visit from our friendly visitor.

inline const GroupNode *parent() const#

Get a pointer to the node’s parent.


Pointer to the parent node, nullptr if no parent.

inline GroupNode *parent()#
inline void setVisible(bool visibility)#

Set the visibility of the node.


visibility – True if the node is visible, false if invisible.

inline bool isVisible() const#

Get the current visibility of the node.


True if visible.

template<typename T>
T *cast()#

Attempt to dynamic_cast to specified node type.


Valid pointer to specified type, or null.

template<typename T>
const T *cast() const#

Protected Functions

void setParent(GroupNode *parent)#

Set the parent node for the node.


parent – The parent, a value of nullptr denotes no parent node.

Protected Attributes

GroupNode *m_parent#
bool m_visible#


friend class GroupNode