public SceneEditorControl(TgcSceneEditor editor) { InitializeComponent(); this.editor = editor; parser = new TgcSceneParser(); sceneLoader = new TgcSceneLoader(); pickingRay = new TgcPickingRay(); translateGizmo = new SceneEditorTranslateGizmo(); helpWindow = new SceneEditorHelpWindow(); //openMeshDialog openMeshDialog = new OpenFileDialog(); openMeshDialog.CheckFileExists = true; openMeshDialog.Title = "Seleccionar malla de formato TGC"; openMeshDialog.Filter = "-TgcScene.xml |*-TgcScene.xml"; openMeshDialog.Multiselect = false; //openMeshDialog.InitialDirectory = GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\"; openMeshDialog.FileName = GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\Box\\Box-TgcScene.xml"; fileName.Text = "Box-TgcScene.xml"; meshFilePath = openMeshDialog.FileName; //openHeighmapDialog openHeighmapDialog = new OpenFileDialog(); openHeighmapDialog.CheckFileExists = true; openHeighmapDialog.Title = "Seleccionar Heighmap"; openHeighmapDialog.Filter = ".JPG|*.jpg|.JPEG|*.jpeg|.GIF|*.gif|.PNG|*.png|.BMP|*.bmp | .TGA |*.tga"; openHeighmapDialog.Multiselect = false; openHeighmapDialog.InitialDirectory = GuiController.Instance.ExamplesMediaDir + "Heighmaps\\"; //openHeighmapDialog openTextureDialog = new OpenFileDialog(); openTextureDialog.CheckFileExists = true; openTextureDialog.Title = "Seleccionar textura de terreno"; openTextureDialog.Filter = ".JPG|*.jpg|.JPEG|*.jpeg|.GIF|*.gif|.PNG|*.png|.BMP|*.bmp | .TGA |*.tga"; openTextureDialog.Multiselect = false; openTextureDialog.InitialDirectory = GuiController.Instance.ExamplesMediaDir + "Heighmaps\\"; //saveSceneDialog saveSceneDialog = new SaveFileDialog(); saveSceneDialog.DefaultExt = ".xml"; saveSceneDialog.Filter = ".XML |*.xml"; saveSceneDialog.AddExtension = true; selectedMeshList = new List <SceneEditorMeshObject>(); //Estado inicial currentState = GuiState.Nothing; tabControl.SelectedTab = tabControl.TabPages["tabPageCreate"]; //Camara inicial GuiController.Instance.FpsCamera.setCamera(new Vector3(50.406f, 185.5353f, -143.7283f), new Vector3(-92.5515f, -567.6361f, 498.3744f)); }
public SceneEditorModifier(string varName, TgcSceneEditor editor) : base(varName) { editorControl = new SceneEditorControl(editor); contentPanel.Controls.Add(editorControl); }