Example #1
0
        /// <summary>
        /// This is called when the blockmap needs to be refilled, because it was invalidated.
        /// This usually happens when geometry is changed by undo, redo, cut or paste actions.
        /// Lines and Things are added to the block map by the base implementation.
        /// </summary>
        protected virtual void FillBlockMap()
        {
            //if(blockmap != null) blockmap.Dispose();
            blockmap = new VisualBlockMap();

            blockmap.AddLinedefsSet(General.Map.Map.Linedefs);
            blockmap.AddThingsSet(General.Map.Map.Things);
            blockmap.AddSectorsSet(General.Map.Map.Sectors);
        }
Example #2
0
 /// <summary>
 /// Provides specialized functionality for a visual (3D) Doom Builder editing mode.
 /// </summary>
 public VisualMode()
 {
     // Initialize
     this.renderer = General.Map.Renderer3D;
     //this.renderer3d = (Renderer3D)General.Map.Renderer3D;
     this.blockmap        = new VisualBlockMap();
     this.allsectors      = new Dictionary <Sector, VisualSector>(General.Map.Map.Sectors.Count);
     this.allthings       = new Dictionary <Thing, VisualThing>(General.Map.Map.Things.Count);
     this.visibleblocks   = new List <VisualBlockEntry>();
     this.visiblesectors  = new Dictionary <Sector, VisualSector>(50);
     this.visiblegeometry = new List <VisualGeometry>(200);
     this.visiblethings   = new List <VisualThing>(100);
     this.processgeometry = true;
     this.processthings   = true;
 }
Example #3
0
        // Disposer
        public override void Dispose()
        {
            // Not already disposed?
            if (!isdisposed)
            {
                // Clean up
                foreach (KeyValuePair <Sector, VisualSector> s in allsectors)
                {
                    s.Value.Dispose();
                }
                //blockmap.Dispose();
                visiblesectors  = null;
                visiblegeometry = null;
                visibleblocks   = null;
                visiblethings   = null;
                allsectors      = null;
                allthings       = null;
                blockmap        = null;

                // Done
                base.Dispose();
            }
        }