コード例 #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>();
        }
コード例 #2
0
ファイル: V2TraversalThread.cs プロジェクト: carounisa/BPAExp
 /// <summary>
 /// Creates the object, but does not start the thread yet
 /// </summary>
 public V2TraversalThread(V2Renderer mainThread, V2LoadingThread loadingThread, List <Node> rootNodes, double minNodeSize, uint pointBudget, uint nodesLoadedPerFrame, uint nodesGOsPerFrame, V2Cache cache)
 {
     this.mainThread          = mainThread;
     this.loadingThread       = loadingThread;
     this.rootNodes           = rootNodes;
     this.minNodeSize         = minNodeSize;
     this.pointBudget         = pointBudget;
     visibleNodes             = new HashSet <Node>();
     this.cache               = cache;
     this.nodesLoadedPerFrame = nodesLoadedPerFrame;
     this.nodesGOsPerFrame    = nodesGOsPerFrame;
 }
コード例 #3
0
 public V2LoadingThread(V2Cache cache)
 {
     loadingQueue = new ThreadSafeQueue <Node>();
     this.cache   = cache;
 }