コード例 #1
0
            public override void OnEnter()
            {
                base.OnEnter();

                oldInputHandler = view.StateInputHandler;
                editor1         = new Graphics.Editors.GroundTextureEditor
                {
                    Camera          = view.Scene.Camera,
                    GroundIntersect = view.GroundProbe,
                    SoftwareTexture = new Graphics.Software.Texture <Graphics.Software.Texel.A8R8G8B8>[]
                    {
                        new Graphics.Software.Texture <Graphics.Software.Texel.A8R8G8B8>(
                            TextureUtil.ReadTexture <Graphics.Software.Texel.A8R8G8B8>(MainWindow.Instance.CurrentMap.Ground.SplatMap1.Resource9, 0)),
                        new Graphics.Software.Texture <Graphics.Software.Texel.A8R8G8B8>(
                            TextureUtil.ReadTexture <Graphics.Software.Texel.A8R8G8B8>(MainWindow.Instance.CurrentMap.Ground.SplatMap2.Resource9, 0)),
                    },
                    Texture9 = new SlimDX.Direct3D9.Texture[]
                    {
                        MainWindow.Instance.CurrentMap.Ground.SplatMap1.Resource9,
                        MainWindow.Instance.CurrentMap.Ground.SplatMap2.Resource9
                    },
                    Position = MainWindow.Instance.CurrentMap.Ground.Translation,
                    Size     = MainWindow.Instance.CurrentMap.Ground.Size,
                    Viewport = view.Viewport
                };
                editor1.TextureValuesChanged += new Graphics.Editors.TextureValuesChangedEventHandler(editor_TextureValuesChanged);
                editorRenderer = new Graphics.Editors.GroundTextureEditorRenderer(editor1);
                editor1.Pencil = settings.Pencil1;

                view.StateInputHandler = editor1;
            }
コード例 #2
0
 public override void OnEnter()
 {
     base.OnEnter();
     oldInputHandler = view.StateInputHandler;
     editor          = new Graphics.Editors.GroundTextureEditor
     {
         Camera          = view.Scene.Camera,
         GroundIntersect = view.GroundProbe,
         SoftwareTexture = new Graphics.Software.Texture <Graphics.Software.Texel.R32F>[]
         {
             new Graphics.Software.Texture <Graphics.Software.Texel.R32F>(
                 MainWindow.Instance.CurrentMap.Ground.Heightmap)
         },
         Position = MainWindow.Instance.CurrentMap.Ground.Translation,
         Size     = MainWindow.Instance.CurrentMap.Ground.Size,
         Viewport = view.Viewport
     };
     editor.TextureValuesChanged += new Graphics.Editors.TextureValuesChangedEventHandler(editor_TextureValuesChanged);
     editorRenderer         = new Graphics.Editors.GroundTextureEditorRenderer(editor);
     InputHandler           = editor;
     view.StateInputHandler = this;
     editor.Pencil          = pencil;
 }
コード例 #3
0
            public override void OnEnter()
            {
                base.OnEnter();

                oldInputHandler = view.StateInputHandler;
                editor1 = new Graphics.Editors.GroundTextureEditor
                {
                    Camera = view.Scene.Camera,
                    GroundIntersect = view.GroundProbe,
                    SoftwareTexture = new Graphics.Software.Texture<Graphics.Software.Texel.A8R8G8B8>[]
                    {
                        new Graphics.Software.Texture<Graphics.Software.Texel.A8R8G8B8>(
                            TextureUtil.ReadTexture<Graphics.Software.Texel.A8R8G8B8>(MainWindow.Instance.CurrentMap.Ground.SplatMap1.Resource9, 0)),
                        new Graphics.Software.Texture<Graphics.Software.Texel.A8R8G8B8>(
                            TextureUtil.ReadTexture<Graphics.Software.Texel.A8R8G8B8>(MainWindow.Instance.CurrentMap.Ground.SplatMap2.Resource9, 0)),
                    },
                    Texture9 = new SlimDX.Direct3D9.Texture[]
                    {
                        MainWindow.Instance.CurrentMap.Ground.SplatMap1.Resource9,
                        MainWindow.Instance.CurrentMap.Ground.SplatMap2.Resource9
                    },
                    Position = MainWindow.Instance.CurrentMap.Ground.Translation,
                    Size = MainWindow.Instance.CurrentMap.Ground.Size,
                    Viewport = view.Viewport
                };
                editor1.TextureValuesChanged += new Graphics.Editors.TextureValuesChangedEventHandler(editor_TextureValuesChanged);
                editorRenderer = new Graphics.Editors.GroundTextureEditorRenderer(editor1);
                editor1.Pencil = settings.Pencil1;

                view.StateInputHandler = editor1;
            }
コード例 #4
0
 public override void OnEnter()
 {
     base.OnEnter();
     oldInputHandler = view.StateInputHandler;
     editor = new Graphics.Editors.GroundTextureEditor
     {
         Camera = view.Scene.Camera,
         GroundIntersect = view.GroundProbe,
         SoftwareTexture = new Graphics.Software.Texture<Graphics.Software.Texel.R32F>[]
         {
             new Graphics.Software.Texture<Graphics.Software.Texel.R32F>(
                 MainWindow.Instance.CurrentMap.Ground.Heightmap)
         },
         Position = MainWindow.Instance.CurrentMap.Ground.Translation,
         Size = MainWindow.Instance.CurrentMap.Ground.Size,
         Viewport = view.Viewport
     };
     editor.TextureValuesChanged += new Graphics.Editors.TextureValuesChangedEventHandler(editor_TextureValuesChanged);
     editorRenderer = new Graphics.Editors.GroundTextureEditorRenderer(editor);
     InputHandler = editor;
     view.StateInputHandler = this;
     editor.Pencil = pencil;
 }