@@ -568,25 +568,6 @@ class InternalNode
568568 template <typename CombineOp, typename OtherValueType>
569569 void combine2 (const InternalNode& other, const OtherValueType&, bool valIsActive, CombineOp&);
570570
571- // / @brief Calls the templated functor BBoxOp with bounding box
572- // / information for all active tiles and leaf nodes in this node.
573- // / An additional level argument is provided for each callback.
574- // /
575- // / @note The bounding boxes are guaranteed to be non-overlapping.
576- template <typename BBoxOp> void visitActiveBBox (BBoxOp&) const ;
577-
578- template <typename VisitorOp> void visit (VisitorOp&);
579- template <typename VisitorOp> void visit (VisitorOp&) const ;
580-
581- template <typename OtherNodeType, typename VisitorOp>
582- void visit2Node (OtherNodeType& other, VisitorOp&);
583- template <typename OtherNodeType, typename VisitorOp>
584- void visit2Node (OtherNodeType& other, VisitorOp&) const ;
585- template <typename IterT, typename VisitorOp>
586- void visit2 (IterT& otherIter, VisitorOp&, bool otherIsLHS = false );
587- template <typename IterT, typename VisitorOp>
588- void visit2 (IterT& otherIter, VisitorOp&, bool otherIsLHS = false ) const ;
589-
590571 // / Set all voxels that lie outside the given axis-aligned box to the background.
591572 void clip (const CoordBBox&, const ValueType& background);
592573
@@ -791,17 +772,6 @@ class InternalNode
791772 void resetChildNode (Index i, ChildNodeType* child);// checks for an existing child
792773 ChildNodeType* unsetChildNode (Index i, const ValueType& value);
793774
794- template <typename NodeT, typename VisitorOp, typename ChildAllIterT>
795- static inline void doVisit (NodeT&, VisitorOp&);
796-
797- template <typename NodeT, typename OtherNodeT, typename VisitorOp,
798- typename ChildAllIterT, typename OtherChildAllIterT>
799- static inline void doVisit2Node (NodeT&, OtherNodeT&, VisitorOp&);
800-
801- template <typename NodeT, typename VisitorOp,
802- typename ChildAllIterT, typename OtherChildAllIterT>
803- static inline void doVisit2 (NodeT&, OtherChildAllIterT&, VisitorOp&, bool otherIsLHS);
804-
805775 // /@{
806776 // / @brief Returns a pointer to the child node at the linear offset n.
807777 // / @warning This protected method assumes that a child node exists at
@@ -2886,173 +2856,6 @@ InternalNode<ChildT, Log2Dim>::combine2(const InternalNode& other, const OtherVa
28862856// //////////////////////////////////////
28872857
28882858
2889- template <typename ChildT, Index Log2Dim>
2890- template <typename BBoxOp>
2891- inline void
2892- InternalNode<ChildT, Log2Dim>::visitActiveBBox(BBoxOp& op) const
2893- {
2894- for (ValueOnCIter i = this ->cbeginValueOn (); i; ++i) {
2895- op.template operator ()<LEVEL>(CoordBBox::createCube (i.getCoord (), ChildNodeType::DIM));
2896- }
2897- if (op.template descent <LEVEL>()) {
2898- for (ChildOnCIter i = this ->cbeginChildOn (); i; ++i) i->visitActiveBBox (op);
2899- } else {
2900- for (ChildOnCIter i = this ->cbeginChildOn (); i; ++i) {
2901- op.template operator ()<LEVEL>(i->getNodeBoundingBox ());
2902- }
2903- }
2904- }
2905-
2906-
2907- template <typename ChildT, Index Log2Dim>
2908- template <typename VisitorOp>
2909- inline void
2910- InternalNode<ChildT, Log2Dim>::visit(VisitorOp& op)
2911- {
2912- doVisit<InternalNode, VisitorOp, ChildAllIter>(*this , op);
2913- }
2914-
2915-
2916- template <typename ChildT, Index Log2Dim>
2917- template <typename VisitorOp>
2918- inline void
2919- InternalNode<ChildT, Log2Dim>::visit(VisitorOp& op) const
2920- {
2921- doVisit<const InternalNode, VisitorOp, ChildAllCIter>(*this , op);
2922- }
2923-
2924-
2925- template <typename ChildT, Index Log2Dim>
2926- template <typename NodeT, typename VisitorOp, typename ChildAllIterT>
2927- inline void
2928- InternalNode<ChildT, Log2Dim>::doVisit(NodeT& self, VisitorOp& op)
2929- {
2930- typename NodeT::ValueType val;
2931- for (ChildAllIterT iter = self.beginChildAll (); iter; ++iter) {
2932- if (op (iter)) continue ;
2933- if (typename ChildAllIterT::ChildNodeType* child = iter.probeChild (val)) {
2934- child->visit (op);
2935- }
2936- }
2937- }
2938-
2939-
2940- // //////////////////////////////////////
2941-
2942-
2943- template <typename ChildT, Index Log2Dim>
2944- template <typename OtherNodeType, typename VisitorOp>
2945- inline void
2946- InternalNode<ChildT, Log2Dim>::visit2Node(OtherNodeType& other, VisitorOp& op)
2947- {
2948- doVisit2Node<InternalNode, OtherNodeType, VisitorOp, ChildAllIter,
2949- typename OtherNodeType::ChildAllIter>(*this , other, op);
2950- }
2951-
2952-
2953- template <typename ChildT, Index Log2Dim>
2954- template <typename OtherNodeType, typename VisitorOp>
2955- inline void
2956- InternalNode<ChildT, Log2Dim>::visit2Node(OtherNodeType& other, VisitorOp& op) const
2957- {
2958- doVisit2Node<const InternalNode, OtherNodeType, VisitorOp, ChildAllCIter,
2959- typename OtherNodeType::ChildAllCIter>(*this , other, op);
2960- }
2961-
2962-
2963- template <typename ChildT, Index Log2Dim>
2964- template <
2965- typename NodeT,
2966- typename OtherNodeT,
2967- typename VisitorOp,
2968- typename ChildAllIterT,
2969- typename OtherChildAllIterT>
2970- inline void
2971- InternalNode<ChildT, Log2Dim>::doVisit2Node(NodeT& self, OtherNodeT& other, VisitorOp& op)
2972- {
2973- // Allow the two nodes to have different ValueTypes, but not different dimensions.
2974- static_assert (OtherNodeT::NUM_VALUES == NodeT::NUM_VALUES,
2975- " visit2() requires nodes to have the same dimensions" );
2976- static_assert (OtherNodeT::LEVEL == NodeT::LEVEL,
2977- " visit2() requires nodes to be at the same tree level" );
2978-
2979- typename NodeT::ValueType val;
2980- typename OtherNodeT::ValueType otherVal;
2981-
2982- ChildAllIterT iter = self.beginChildAll ();
2983- OtherChildAllIterT otherIter = other.beginChildAll ();
2984-
2985- for ( ; iter && otherIter; ++iter, ++otherIter)
2986- {
2987- const size_t skipBranch = static_cast <size_t >(op (iter, otherIter));
2988-
2989- typename ChildAllIterT::ChildNodeType* child =
2990- (skipBranch & 1U ) ? nullptr : iter.probeChild (val);
2991- typename OtherChildAllIterT::ChildNodeType* otherChild =
2992- (skipBranch & 2U ) ? nullptr : otherIter.probeChild (otherVal);
2993-
2994- if (child != nullptr && otherChild != nullptr ) {
2995- child->visit2Node (*otherChild, op);
2996- } else if (child != nullptr ) {
2997- child->visit2 (otherIter, op);
2998- } else if (otherChild != nullptr ) {
2999- otherChild->visit2 (iter, op, /* otherIsLHS=*/ true );
3000- }
3001- }
3002- }
3003-
3004-
3005- // //////////////////////////////////////
3006-
3007-
3008- template <typename ChildT, Index Log2Dim>
3009- template <typename OtherChildAllIterType, typename VisitorOp>
3010- inline void
3011- InternalNode<ChildT, Log2Dim>::visit2(OtherChildAllIterType& otherIter,
3012- VisitorOp& op, bool otherIsLHS)
3013- {
3014- doVisit2<InternalNode, VisitorOp, ChildAllIter, OtherChildAllIterType>(
3015- *this , otherIter, op, otherIsLHS);
3016- }
3017-
3018-
3019- template <typename ChildT, Index Log2Dim>
3020- template <typename OtherChildAllIterType, typename VisitorOp>
3021- inline void
3022- InternalNode<ChildT, Log2Dim>::visit2(OtherChildAllIterType& otherIter,
3023- VisitorOp& op, bool otherIsLHS) const
3024- {
3025- doVisit2<const InternalNode, VisitorOp, ChildAllCIter, OtherChildAllIterType>(
3026- *this , otherIter, op, otherIsLHS);
3027- }
3028-
3029-
3030- template <typename ChildT, Index Log2Dim>
3031- template <typename NodeT, typename VisitorOp, typename ChildAllIterT, typename OtherChildAllIterT>
3032- inline void
3033- InternalNode<ChildT, Log2Dim>::doVisit2(NodeT& self, OtherChildAllIterT& otherIter,
3034- VisitorOp& op, bool otherIsLHS)
3035- {
3036- if (!otherIter) return ;
3037-
3038- const size_t skipBitMask = (otherIsLHS ? 2U : 1U );
3039-
3040- typename NodeT::ValueType val;
3041- for (ChildAllIterT iter = self.beginChildAll (); iter; ++iter) {
3042- const size_t skipBranch = static_cast <size_t >(
3043- otherIsLHS ? op (otherIter, iter) : op (iter, otherIter));
3044-
3045- typename ChildAllIterT::ChildNodeType* child =
3046- (skipBranch & skipBitMask) ? nullptr : iter.probeChild (val);
3047-
3048- if (child != nullptr ) child->visit2 (otherIter, op, otherIsLHS);
3049- }
3050- }
3051-
3052-
3053- // //////////////////////////////////////
3054-
3055-
30562859template <typename ChildT, Index Log2Dim>
30572860inline void
30582861InternalNode<ChildT, Log2Dim>::writeBuffers(std::ostream& os, bool toHalf) const
0 commit comments