public CollisionTreeNode(BoundingBox boundingBox, List <int> indices, CollisionTreeNode leftNode, CollisionTreeNode rightNode)
        {
            if (leftNode == null || rightNode == null)
            {
                if (leftNode != null || rightNode != null)
                {
                    throw new ArgumentException("either both branches must be null, or neither");
                }
                if (boundingBox.Maximum != boundingBox.Minimum)
                {
                    throw new ArgumentException("bounding box must be a single point when branches are null");
                }
            }

            this.boundingBox = boundingBox;
            this.indices     = indices;
            this.leftNode    = leftNode;
            this.rightNode   = rightNode;
        }
 private CollisionTree(CollisionTreeNode root)
 {
     this.root = root;
 }