Ejemplo n.º 1
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(int minNodeSize, uint pointBudget, uint nodesLoadedPerFrame, uint nodesGOsperFrame, Camera camera, MeshConfiguration config, uint cacheSize)
        {
            rootNodes     = new List <Node>();
            this.camera   = camera;
            this.config   = config;
            cache         = new V2Cache(cacheSize);
            loadingThread = new V2LoadingThread(cache);
            loadingThread.Start();
            traversalThread = new V2TraversalThread(this, loadingThread, rootNodes, minNodeSize, pointBudget, nodesLoadedPerFrame, nodesGOsperFrame, cache);
            traversalThread.Start();
            toDeleteExternal = new Queue <Node>();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Continues the rendering after pausing
 /// </summary>
 public void Continue()
 {
     loadingThread.Start();
     traversalThread.Start();
     paused = false;
 }