docs: function() {
              if (!this.removed) {
                  this.removed = true;
  
                  if (_CSGDEBUG) {
                      if (this.isRootNode()) throw new Error("Assertion failed"); // can't remove root node
                      if (this.children.length) throw new Error("Assertion failed"); // we shouldn't remove nodes with children
                  }
  
                  // remove ourselves from the parent's children list:
                  var parentschildren = this.parent.children;
                  var i = parentschildren.indexOf(this);
                  if (i < 0) throw new Error("Assertion failed");
                  parentschildren.splice(i, 1);
  
                  // invalidate the parent's polygon, and of all parents above it:
                  this.parent.recursivelyInvalidatePolygon();
              }
          }