12#ifndef NODE_H_6014714286
13#define NODE_H_6014714286
48 const std::unique_ptr< Details > pimpl;
57 explicit Node(
const std::string& tag =
"" );
Defines Carna::base::Spatial.
Represents an association.
Notified by Node objects.
Defines the inner node of a scene graph. Implements a spatial scene element that is allowed to have c...
void attachChild(Spatial *child)
Attaches child to this node in and takes it's possession.
void removeNodeListener(NodeListener &listener)
Removes listener from being notified of changes related to this node in .
Spatial * detachChild(Spatial &child)
Detaches child from this node in . The caller takes possession of the child.
bool hasChild(const Spatial &child) const
Tells whether child is among the children of this node in .
std::size_t children() const
Tells number of children.
void addNodeListener(NodeListener &listener)
Notifies listener of changes related to this node in .
void deleteAllChildren()
Deletes all children of this node.
void visitChildren(bool recursively, const MutableVisitor &visit)
Invokes visit once on each child of this node recursively.
void invalidate() override
Notifies all its listeners that this subtree has changed. This may include changes of the tree struct...
void visitChildren(bool recursively, const ImmutableVisitor &visit) const
Node(const std::string &tag="")
Instantiates.
virtual void updateWorldTransform() override
Computes the transformation to world space for this node just like the base class does,...
Represents a spatial scene element. It's location is determined relatively to another spatial that is...
std::function< void(Spatial &) > MutableVisitor
Declares an entity that visits mutable Spatial instances.
std::function< void(const Spatial &) > ImmutableVisitor
Declares an entity that visits mutable Spatial instances.