Ejemplo n.º 1
0
 public StaticRenderer(AbstractPointCloudSet pcset, MeshConfiguration config)
 {
     this.pcset      = pcset;
     rootNodes       = new List <Node>();
     toLoad          = new Queue <Node>();
     toDisplay       = new Queue <Node>();
     toRemove        = new Queue <Node>();
     nodePointcounts = new Dictionary <Node, uint>();
     this.config     = config;
 }
Ejemplo n.º 2
0
        private Queue <Node> toDeleteExternal; //Nodes that have been scheduled for removal via removeRoot

        /// <summary>
        /// Creates a new V2Renderer and starts all the threads
        /// </summary>
        /// <param name="minNodeSize">Minimum Node Size</param>
        /// <param name="pointBudget">Point Budget</param>
        /// <param name="nodesLoadedPerFrame">Maximum number of nodes loaded per frame</param>
        /// <param name="nodesGOsperFrame">Maximum number of nodes for which GameObjects should be created per frame</param>
        /// <param name="camera">User Camera</param>
        /// <param name="config">MeshConfiguration, defining how the points should be rendered</param>
        /// <param name="cacheSize">Size of cache in points</param>
        public V2Renderer(AbstractPointCloudSet pcset, int minNodeSize, uint pointBudget, uint nodesLoadedPerFrame, uint nodesGOsperFrame, Camera camera, MeshConfiguration config, uint cacheSize)
        {
            this.pcset    = pcset;
            rootNodes     = new List <Node>();
            this.camera   = camera;
            this.config   = config;
            cache         = new V2Cache(cacheSize);
            loadingThread = new V2LoadingThread(cache);
            loadingThread.Start();
            traversalThread = new V2TraversalThread(pcset.gameObject, this, loadingThread, rootNodes, minNodeSize, pointBudget, nodesLoadedPerFrame, nodesGOsperFrame, cache);
            traversalThread.Start();
            toDeleteExternal = new Queue <Node>();
        }