Uploaded image for project: 'OpenVDB'
  1. OpenVDB
  2. OVDB-124

Adding a Root Node Child

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • Core
    • None

      I've had a look through my implementation of the parallel merge and the only missing functionality (I think) is a way to insert an existing RootNode::ChildNodeType* that I have ownership of into a root node at a specific Coord, something like:

      void RootNode::addChild(const Coord& xyz, ChildType* child)
      {
          MapIter iter = this->findCoord(xyz);
          if (iter == mTable.end()) {//background
              mTable[this->coordToKey(xyz)] = NodeStruct(*child);
          } else {//child or tile
              setChild(iter, *child);//this also deletes the existing child node
          }
      }

      There's already:

      void RootNode::addTile(const Coord& xyz, const ValueType& value, bool state);
      

      but no equivalent public methods that adds child nodes. Any thoughts on adding something like this to the RootNode?

            danrbailey danrbailey
            danrbailey danrbailey
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: