Exemplo n.º 1
0
        public ViewerViewModel(Viewer viewer)
        {
            if (viewer == null) throw new ArgumentNullException("viewer");
            this.viewer = viewer;

            DirectionalLightViewModel = new DirectionalLightViewModel(viewer);
        }
Exemplo n.º 2
0
        public Workspace(Game game)
        {
            if (game == null) throw new ArgumentNullException("game");
            Game = game;

            GraphicsDevice = game.GraphicsDevice;

            interBlockMeshLoadQueue = new InterBlockMeshLoadQueue();
            blockMeshLoadQueue = new BlockMeshLoadQueue(100);

            StorageBlockService = game.Services.GetRequiredService<IStorageBlockService>();

            Viewer = new Viewer(this);

            Preview = new Preview(this);

            GridBlockMesh = new GridBlockMesh(GraphicsDevice, 16, 0.1f, Color.White);

            BasicBlockEffect = new BasicBlockEffect(GraphicsDevice);
            BasicBlockEffect.EnableDefaultLighting();
        }
Exemplo n.º 3
0
 public Viewer CreateViewer()
 {
     var viewer = new Viewer(Workspace);
     viewers.Add(viewer);
     return viewer;
 }