public QuadTree(QuadTree <T> parent, Rectangle range, QuadTreeSetting setting) { this.parent = parent; this.range = range; this.setting = setting; this.level = parent == null ? 1 : parent.level + 1; branches = new List <QuadTree <T> >(4); objects = new List <T>(); }
public QuadTreeCulling(QuadTreeSetting setting) { Setting = setting; if (Setting != null && Setting.CullingPatchesCS != null) { kernelCullingPatches = Setting.CullingPatchesCS.FindKernel("CSCullingPatches"); MatrixVPID = Shader.PropertyToID("matrixVP"); MeshRadiusID = Shader.PropertyToID("meshRadius"); IsOpenGLID = Shader.PropertyToID("isOpenGL"); PatchesBufferID = Shader.PropertyToID("patchesBuffer"); CullingResultID = Shader.PropertyToID("cullingResult"); } }
public QuadTreeLodMap(QuadTreeSetting setting) { Setting = setting; if (Setting != null && Setting.BuildLodMapCS != null) { kernelBuildLodMap = Setting.BuildLodMapCS.FindKernel("BuildLodMap"); LodMapShaderID = Shader.PropertyToID("LodMap"); LodMapSizeShaderID = Shader.PropertyToID("LodMapSize"); MaxLODShaderID = Shader.PropertyToID("MaxLOD"); NodeSizeAtMaxLodID = Shader.PropertyToID("NodeSizeAtMaxLOD"); NodeDescriptorsShaderID = Shader.PropertyToID("NodeDescriptors"); } }
public QuadTreeBuildPatches(QuadTreeSetting setting) { Setting = setting; if (Setting != null && Setting.BuildPatchesCS != null) { kernelBuildPatches = Setting.BuildPatchesCS.FindKernel("BuildPatches"); FinalNodeListShaderID = Shader.PropertyToID("FinalNodeList"); RenderPatchListShaderID = Shader.PropertyToID("RenderPatchList"); LengthOfLod0ShaderID = Shader.PropertyToID("LengthOfLod0"); MaxLODShaderID = Shader.PropertyToID("MaxLOD"); LodMapShaderID = Shader.PropertyToID("LodMap"); NodeSizeAtMaxLodID = Shader.PropertyToID("NodeSizeAtMaxLOD"); LodMeshStepID = Shader.PropertyToID("LodMeshStep"); } }
public QuadTreeTraverser(QuadTreeSetting setting) { Setting = setting; if (Setting != null && Setting.TraverserCS != null) { kernelTraverseQuadTree = Setting.TraverserCS.FindKernel("TraverseQuadTree"); CameraPosShaderID = Shader.PropertyToID("CameraPos"); ConsumeNodeListShaderID = Shader.PropertyToID("ConsumeNodeList"); AppendNodeListShaderID = Shader.PropertyToID("AppendNodeList"); AppendFinalNodeListShaderID = Shader.PropertyToID("AppendFinalNodeList"); LengthOfLod0ShaderID = Shader.PropertyToID("LengthOfLod0"); MaxLODShaderID = Shader.PropertyToID("MaxLOD"); ConsumeNodeCountShaderID = Shader.PropertyToID("ConsumeNodeCount"); PassLODShaderID = Shader.PropertyToID("PassLOD"); NodeSizeAtMaxLodID = Shader.PropertyToID("NodeSizeAtMaxLOD"); NodeDescriptorsShaderID = Shader.PropertyToID("NodeDescriptors"); } }
public TerrainQuadTree(QuadTreeSetting setting) { Setting = setting; }