/// <inheritdoc /> public void Execute(int index) { var chunkIndex = ChunkList[index]; int itemCount = SpatialHashing.QueryCount(chunkIndex); var isoDataList = new NativeList <IsometricData>(itemCount, Allocator.Temp); SpatialHashing.Query(chunkIndex, isoDataList); for (int i = 0; i < itemCount; i++) { var currentIsoData = isoDataList[i]; Assert.IsTrue(currentIsoData.SpatialHashingIndex > 0); IsometricDataPresent.Enqueue(currentIsoData.SpatialHashingIndex); for (int j = i + 1; j < itemCount; j++) { var comparisonIsoData = isoDataList[j]; if (IsIsoObjectOverlap(currentIsoData, comparisonIsoData) && IsObjectIsInFrontOf(currentIsoData, comparisonIsoData)) { TopologicalListFrontToBack.Add(currentIsoData.SpatialHashingIndex, comparisonIsoData.SpatialHashingIndex); } if (IsIsoObjectOverlap(comparisonIsoData, currentIsoData) && IsObjectIsInFrontOf(comparisonIsoData, currentIsoData)) { TopologicalListFrontToBack.Add(comparisonIsoData.SpatialHashingIndex, currentIsoData.SpatialHashingIndex); } } } }
/// <inheritdoc /> public void Execute() { ResultHelpUnicity.Clear(); Result.Clear(); for (int i = 0; i < CameraDatas.Length; i++) { ResultHelpIteration.Clear(); SpatialHashing.Query(CameraDatas[i].Bounds, ResultHelpIteration); for (int j = 0; j < ResultHelpIteration.Length; j++) { if (ResultHelpUnicity.TryAdd(ResultHelpIteration[j], 0)) { Result.Add(ResultHelpIteration[j]); } } } }
// Use this for initialization public void Start() { Debug.Log("Reconstructor START"); m_Points = new Vector4[k_MaxPointCount]; m_SpatialHashing = new SpatialHashing(); }