/// <summary> /// Creates a new instance of this class with given parameters. /// </summary> /// <param name="nodeLoader">Reference to <see cref="NodeLoader"/> that will be used to load required nodes.</param> /// <param name="maxBufferElements">Maximum amount of points that can be stored in buffer.</param> /// <param name="rebuildSteps">Amount of steps that buffer building process is split into.</param> public BufferBuilder(NodeLoader nodeLoader, int maxBufferElements, int rebuildSteps) { this.nodeLoader = nodeLoader; this.maxBufferElements = maxBufferElements; this.rebuildSteps = rebuildSteps; bufferA = new ComputeBuffer(maxBufferElements, UnsafeUtility.SizeOf <PointCloudPoint>(), ComputeBufferType.Default, ComputeBufferMode.Immutable); bufferB = new ComputeBuffer(maxBufferElements, UnsafeUtility.SizeOf <PointCloudPoint>(), ComputeBufferType.Default, ComputeBufferMode.Immutable); }
/// <summary> /// Initializes new, empty tree based on data stored under given path. /// </summary> /// <param name="pathOnDisk">Path under which data for this tree is stored. Must exist.</param> /// <param name="loadedPointsLimit">Maximum amount of points that can be loaded into memory at once.</param> /// <param name="zipData">Environment archive metadata (only applicable to ZIP files).</param> protected NodeTree(string pathOnDisk, int loadedPointsLimit, ZipTreeData zipData = null) { this.pathOnDisk = pathOnDisk; ZipData = zipData; NodeLoader = new NodeLoader(this, loadedPointsLimit); }