15 #include <vsg/core/Allocator.h>
16 #include <vsg/nodes/Node.h>
26 explicit Group(
size_t numChildren = 0);
28 template<
typename Iterator>
29 Group(Iterator begin, Iterator end)
31 for (Iterator itr = begin; itr != end; ++itr) addChild(*itr);
34 template<
class N,
class V>
35 static void t_traverse(N& node, V& visitor)
37 for (
auto& child : node.children) child->accept(visitor);
40 void traverse(
Visitor& visitor)
override { t_traverse(*
this, visitor); }
41 void traverse(
ConstVisitor& visitor)
const override { t_traverse(*
this, visitor); }
42 void traverse(
RecordTraversal& visitor)
const override { t_traverse(*
this, visitor); }
46 void read(
Input& input)
override;
47 void write(
Output& output)
const override;
54 children.push_back(child);
Definition: ConstVisitor.h:147
Group node provides a list of children.
Definition: Group.h:24
int compare(const Object &rhs) const override
compare two objects, return -1 if this object is less than rhs, return 0 if it's equal,...
RecordTraversal traverses a scene graph doing view frustum culling and invoking state/commands to rec...
Definition: RecordTraversal.h:61
Definition: Visitor.h:147
std container adapter for allocating with MEMORY_AFFINITY_NODES
Definition: Allocator.h:138