mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
Provide an alternative void centering scheme
This commit is contained in:
parent
3a143e63c4
commit
5c9500628c
1 changed files with 23 additions and 1 deletions
|
@ -243,7 +243,29 @@ public:
|
|||
{
|
||||
walkNode(rootNode, traverse);
|
||||
}
|
||||
|
||||
|
||||
template<typename T, typename T2>
|
||||
void walkNodeWithMark(VoidNode *node, T& traverse, const T2& mark)
|
||||
{
|
||||
T2 new_mark = mark;
|
||||
|
||||
if (!traverse(node, new_mark))
|
||||
return;
|
||||
|
||||
VoidList::iterator i = node->children.begin();
|
||||
|
||||
while (i != node->children.end())
|
||||
{
|
||||
walkNodeWithMark(*i, traverse, new_mark);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T,typename T2>
|
||||
void walkWithMark(T& traverse, T2 mark)
|
||||
{
|
||||
walkNodeWithMark(rootNode, traverse, mark);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue