public SelectedMaterialControl(Screen screen)
            : base(screen)
        {
            cubeMesh = new CubeMesh(screen.GraphicsDevice, 1);
            cubeMesh.Effect.EnableDefaultLighting();

            view = new ChaseView
            {
                Distance = 3.5f,
                Angle = new Vector2(-MathHelper.PiOver4 * 0.5f, MathHelper.PiOver4)
            };
            projection = new PerspectiveFov
            {
                NearPlaneDistance = 0.01f,
                FarPlaneDistance = 100
            };
        }
Esempio n. 2
0
        public Workspace(Game game)
        {
            if (game == null) throw new ArgumentNullException("game");
            Game = game;

            GraphicsDevice = game.GraphicsDevice;

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

            Scene = new Scene(this);

            CubeMesh = new CubeMesh(GraphicsDevice, CellSize);
            CubeMesh.Effect.EnableDefaultLighting();

            Section = new Section(this);

            // todo: code for demo
            Block = CreateOctahedronLikeBlock();
            Section.FetchElements();
        }
Esempio n. 3
0
        public Workspace(Game game)
        {
            if (game == null)
            {
                throw new ArgumentNullException("game");
            }
            Game = game;

            GraphicsDevice = game.GraphicsDevice;

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

            Scene = new Scene(this);

            CubeMesh = new CubeMesh(GraphicsDevice, CellSize);
            CubeMesh.Effect.EnableDefaultLighting();

            Section = new Section(this);

            // todo: code for demo
            Block = CreateOctahedronLikeBlock();
            Section.FetchElements();
        }