Пример #1
0
        /// <summary>
        /// Provides specialized functionality for a visual (3D) Doom Builder editing mode.
        /// </summary>
        protected VisualMode()
        {
            // Initialize
            this.renderer        = 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 Dictionary <Thing, VisualThing>(100);
            this.processgeometry = true;
            this.processthings   = true;
            this.vertices        = new Dictionary <Vertex, VisualVertexPair>();     //mxd

            //mxd. Synch camera position to cursor position or center of the screen in 2d-mode
            if (General.Settings.GZSynchCameras && General.Editing.Mode is ClassicMode)
            {
                ClassicMode oldmode = (ClassicMode)General.Editing.Mode;

                if (oldmode.IsMouseInside)
                {
                    initialcameraposition = new Vector2D(oldmode.MouseMapPos.x, oldmode.MouseMapPos.y);
                }
                else
                {
                    initialcameraposition = new Vector2D(General.Map.CRenderer2D.Viewport.Left + General.Map.CRenderer2D.Viewport.Width / 2.0f, General.Map.CRenderer2D.Viewport.Top + General.Map.CRenderer2D.Viewport.Height / 2.0f);
                }
            }
        }
Пример #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;
 }