diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-05-29 05:37:38 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-05-29 05:37:38 -0500 |
| commit | 0e7f4dc5cef8a97cb1dd08aa2f79538ced267888 (patch) | |
| tree | f8556aa8a56a876bb0e1105bd7424da0ea05d17f /indra/llmath/lloctree.h | |
| parent | 0a54fb6b24790263c45f096415fee0e2d03323e0 (diff) | |
Octree per LLVolumeFace WIP
Diffstat (limited to 'indra/llmath/lloctree.h')
| -rw-r--r-- | indra/llmath/lloctree.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 2f34fb1bb0..8bba12783f 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -73,6 +73,13 @@ public: }; template <class T> +class LLOctreeTravelerDepthFirst : public LLOctreeTraveler<T> +{ +public: + virtual void traverse(const LLOctreeNode<T>* node); +}; + +template <class T> class LLOctreeNode : public LLTreeNode<T> { public: @@ -710,4 +717,15 @@ void LLOctreeTraveler<T>::traverse(const LLOctreeNode<T>* node) traverse(node->getChild(i)); } } + +template <class T> +void LLOctreeTravelerDepthFirst<T>::traverse(const LLOctreeNode<T>* node) +{ + for (U32 i = 0; i < node->getChildCount(); i++) + { + traverse(node->getChild(i)); + } + node->accept(this); +} + #endif |
