예제 #1
0
        public override void init()
        {
            Device d3dDevice = GuiController.Instance.D3dDevice;

            camera          = new TerrainFpsCamera();
            Terrain         = new SmartTerrain();
            this.brush      = new DummyBrush();
            this.vegetation = new List <TgcMesh>();
            modifierPanel   = new TerrainEditorModifier("Panel", this);

            GuiController.Instance.Modifiers.add(modifierPanel);

            pickingRay     = new TgcPickingRay();
            ShowVegetation = true;
            mouseMove      = new MouseEventHandler(Panel3d_MouseMove);
            mouseLeave     = new EventHandler(Panel3d_MouseLeave);
            noBrush        = new DummyBrush();
            GuiController.Instance.Panel3d.MouseMove  += mouseMove;
            GuiController.Instance.Panel3d.MouseLeave += mouseLeave;

            //Configurar FPS Camara
            camera.Enable            = true;
            camera.RotateMouseButton = cameraRotationButton;
            camera.setCamera(new Vector3(-722.6171f, 495.0046f, -31.2611f), new Vector3(164.9481f, 35.3185f, -61.5394f));

            labelFPS      = new TgcText2d();
            labelFPS.Text = "Press F to go back to edition mode";
            labelFPS.changeFont(new System.Drawing.Font("Arial", 12, FontStyle.Bold));
            labelFPS.Color = Color.Red;
            labelFPS.Align = TgcText2d.TextAlign.RIGHT;

            labelVegetationHidden      = new TgcText2d();
            labelVegetationHidden.Text = "Press V to show vegetation";
            labelVegetationHidden.changeFont(new System.Drawing.Font("Arial", 12, FontStyle.Bold));
            labelVegetationHidden.Color  = Color.GreenYellow;
            labelVegetationHidden.Format = DrawTextFormat.Bottom | DrawTextFormat.Center;
        }
예제 #2
0
 /// <summary>
 /// Crea la cámara con valores iniciales.
 /// Aceleración desactivada por Default
 /// </summary>
 public TerrainFpsCamera(SmartTerrain terrain)
 {
     Terrain = terrain;
     resetValues();
 }
예제 #3
0
        public override void init()
        {
            Device d3dDevice = GuiController.Instance.D3dDevice;

            camera = new TerrainFpsCamera();
            Terrain = new SmartTerrain();
            this.brush = new DummyBrush();
            this.vegetation = new List<TgcMesh>();
            modifierPanel = new TerrainEditorModifier("Panel", this);

            GuiController.Instance.Modifiers.add(modifierPanel);

            pickingRay = new TgcPickingRay();
            ShowVegetation = true;
            mouseMove = new MouseEventHandler(Panel3d_MouseMove);
            mouseLeave = new EventHandler(Panel3d_MouseLeave);
            noBrush = new DummyBrush();
            GuiController.Instance.Panel3d.MouseMove += mouseMove;
            GuiController.Instance.Panel3d.MouseLeave += mouseLeave;

            //Configurar FPS Camara
            camera.Enable = true;
            camera.RotateMouseButton = cameraRotationButton;
            camera.setCamera(new Vector3(-722.6171f, 495.0046f, -31.2611f), new Vector3(164.9481f, 35.3185f, -61.5394f));

            labelFPS = new TgcText2d();
            labelFPS.Text = "Press F to go back to edition mode";
            labelFPS.changeFont(new System.Drawing.Font("Arial", 12, FontStyle.Bold));
            labelFPS.Color = Color.Red;
            labelFPS.Align = TgcText2d.TextAlign.RIGHT;

            labelVegetationHidden = new TgcText2d();
            labelVegetationHidden.Text = "Press V to show vegetation";
            labelVegetationHidden.changeFont(new System.Drawing.Font("Arial", 12, FontStyle.Bold));
            labelVegetationHidden.Color = Color.GreenYellow;
            labelVegetationHidden.Format = DrawTextFormat.Bottom|DrawTextFormat.Center;
        }
예제 #4
0
 /// <summary>
 /// Crea la cámara con valores iniciales.
 /// Aceleración desactivada por Default
 /// </summary>
 public TerrainFpsCamera(SmartTerrain terrain)
 {
     Terrain = terrain;
     resetValues();
 }