public BinaryLeafEnumerator(OctreeHelper parent, sbyte[] src, uint offset, int maxDepth) { this.parent = parent; stack = new Stack <BinNodeIterator>(OctreeHelper.TreeMaxDepth + 1); reader = new Reader(src, offset); this.maxDepth = maxDepth; current = default; var startIt = new BinNodeIterator(reader.ReadUshort()); stack.Push(startIt); }
public LeafEnumerator(OctreeHelper parent, sbyte[] src, uint offset, uint valueStride, int maxDepth) { this.parent = parent; stack = new Stack <NodeIterator>(OctreeHelper.TreeMaxDepth); reader = new Reader(src, offset); this.maxDepth = maxDepth; strideAfterValue = valueStride - 4; current = default; reader.Skip(valueStride); var startIt = new NodeIterator(reader.ReadByte()); stack.Push(startIt); }