AvogadroLibs  1.95.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Node Class Reference

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

#include <avogadro/rendering/node.h>

Inheritance diagram for Node:
GeometryNode GroupNode TransformNode

Public Member Functions

virtual void accept (Visitor &)
 
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 Member Functions

void setParent (GroupNode *parent)
 Set the parent node for the node. More...
 

Protected Attributes

GroupNode * m_parent
 
bool m_visible
 

Detailed Description

Author
Marcus D. Hanwell

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

Member Function Documentation

◆ accept()

virtual void accept ( Visitor &  )
virtual

Accept a visit from our friendly visitor.

Reimplemented in GroupNode, and GeometryNode.

◆ parent()

const GroupNode* parent ( ) const
Returns
Pointer to the parent node, nullptr if no parent.

◆ setVisible()

void setVisible ( bool  visibility)
Parameters
visibilityTrue if the node is visible, false if invisible.

◆ isVisible()

bool isVisible ( ) const
Returns
True if visible.

◆ cast()

T * cast ( )
Returns
Valid pointer to specified type, or null.

◆ setParent()

void setParent ( GroupNode *  parent)
protected
Parameters
parentThe parent, a value of nullptr denotes no parent node.

The documentation for this class was generated from the following file: