Class Avogadro::Rendering::Node#

class Avogadro::Rendering::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.

Author

Marcus D. Hanwell

Subclassed by GeometryNode, GroupNode

Public Functions

Node()#
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.

Returns

Pointer to the parent node, nullptr if no parent.

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

Set the visibility of the node.

Parameters

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

inline bool isVisible() const#

Get the current visibility of the node.

Returns

True if visible.

template<typename T>
T *cast()#

Attempt to dynamic_cast to specified node type.

Returns

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.

Parameters

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

Protected Attributes

GroupNode *m_parent#
bool m_visible#

Friends

friend class GroupNode