示例#1
0
            private void ParseNode(int node)
            {
                if (IsoToDepth.TryAdd(node, 0) == false)
                {
                    return;
                }

                //no children nothing to do
                if (TopologicalListFrontToBack.TryGetFirstValue(node, out var childNode, out var it))
                {
                    do
                    {
                        ParseNode(childNode);
                    }while (TopologicalListFrontToBack.TryGetNextValue(out childNode, ref it));
                }

                IsometricIndexForThisFrame.Add(node);
            }
示例#2
0
            /// <inheritdoc />
            public void Execute()
            {
                CurrentLevelList.Clear();
                IsoToDepth.Clear();

                //Parse all object in cameras for find tops
                while (IsometricDataFromComputation.Count > 0)
                {
                    var value = IsometricDataFromComputation.Dequeue();

                    if (IsoToDepth.TryAdd(value, 0))
                    {
                        CurrentLevelList.Add(value);
                    }
                }

                IsoToDepth.Clear();

                for (int i = 0; i < CurrentLevelList.Length; i++)
                {
                    ParseNode(CurrentLevelList[i]);
                }
            }