Пример #1
0
        public void AddHitPoint(PPMHitPoint hp)
        {
            if (this.hitPoints.Count <= MaxHitPoints)
            {
                this.hitPoints.Add(hp);
#if VERBOSE
                if (hitPoints.Count % 1000 == 0)
                    Tracer.TraceLine("HitPoints -Collected {0} / Needed {1}", hitPoints.Count, MaxHitPoints);
#endif
            }
            else
            {
                if (Grid == null)
                {
                    lock (build_lock)
                    {
                        Tracer.TraceLine("Start building photons hashgrid");
                        Grid = new HashGrid(hitPoints, Width, Height);
                        Grid.ReHash();
                        Tracer.TraceLine("Complete!");
                    }
                }
            }

        }