Example #1
0
        public Scene(Workspace workspace)
        {
            if (workspace == null) throw new ArgumentNullException("workspace");
            this.workspace = workspace;

            graphicsDevice = workspace.GraphicsDevice;

            projection = new PerspectiveFov
            {
                NearPlaneDistance = 0.01f,
                FarPlaneDistance = 100
            };

            CameraMoveScale = 0.05f;

            CameraView = new ChaseView
            {
                Distance = 3.5f,
                Angle = new Vector2(-MathHelper.PiOver4 * 0.5f, MathHelper.PiOver4)
            };
            CurrentView = CameraView;

            DirectionalLightModel0 = new DirectionalLightModel
            {
                Enabled = true,
                DiffuseColor = Vector3.One
            };
            DirectionalLightModel1 = new DirectionalLightModel { Enabled = false };
            DirectionalLightModel2 = new DirectionalLightModel { Enabled = false };

            AmbientLightColor = new Vector3(0.05333332f, 0.09882354f, 0.1819608f);

            GridBlockMesh = new GridBlockMesh(graphicsDevice, gridSize, cellSize, Color.White);
        }
Example #2
0
        public BasicCamera(string name)
        {
            if (name == null) throw new ArgumentNullException("name");

            Name = name;

            View = new View();
            Projection = new PerspectiveFov();
            Frustum = new BoundingFrustum(Matrix.Identity);

            FocusDistance = DefaultFocusDistance;
            FocusRange = DefaultFocusRange;
        }
Example #3
0
        public BasicCamera(string name)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            Name = name;

            View       = new View();
            Projection = new PerspectiveFov();
            Frustum    = new BoundingFrustum(Matrix.Identity);

            FocusDistance = DefaultFocusDistance;
            FocusRange    = DefaultFocusRange;
        }
        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
            };
        }
Example #5
0
        public Scene(Workspace workspace)
        {
            if (workspace == null)
            {
                throw new ArgumentNullException("workspace");
            }
            this.workspace = workspace;

            graphicsDevice = workspace.GraphicsDevice;

            projection = new PerspectiveFov
            {
                NearPlaneDistance = 0.01f,
                FarPlaneDistance  = 100
            };

            CameraMoveScale = 0.05f;

            CameraView = new ChaseView
            {
                Distance = 3.5f,
                Angle    = new Vector2(-MathHelper.PiOver4 * 0.5f, MathHelper.PiOver4)
            };
            CurrentView = CameraView;

            DirectionalLightModel0 = new DirectionalLightModel
            {
                Enabled      = true,
                DiffuseColor = Vector3.One
            };
            DirectionalLightModel1 = new DirectionalLightModel {
                Enabled = false
            };
            DirectionalLightModel2 = new DirectionalLightModel {
                Enabled = false
            };

            AmbientLightColor = new Vector3(0.05333332f, 0.09882354f, 0.1819608f);

            GridBlockMesh = new GridBlockMesh(graphicsDevice, gridSize, cellSize, Color.White);
        }