public ViewerViewModel(Viewer viewer) { if (viewer == null) throw new ArgumentNullException("viewer"); this.viewer = viewer; DirectionalLightViewModel = new DirectionalLightViewModel(viewer); }
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(); }
public Viewer CreateViewer() { var viewer = new Viewer(Workspace); viewers.Add(viewer); return viewer; }