Beispiel #1
0
 /// <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();
 }
Beispiel #2
0
 /// <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>();
     holders       = GameObject.FindGameObjectWithTag("MeshConfig").GetComponent <GeoQuadMeshConfiguration>().holders;
     this.camera   = camera;
     this.config   = config;
     cache         = new V2Cache(cacheSize);
     loadingThread = new V2LoadingThread(cache, holders);
     loadingThread.Start();
     traversalThread = new V2TraversalThread(this, loadingThread, rootNodes, minNodeSize, pointBudget, nodesLoadedPerFrame, nodesGOsperFrame, cache);
     traversalThread.Start();
 }