コード例 #1
0
ファイル: Camera.cs プロジェクト: woncomp/LiliumLab
        void CreateControls()
        {
            var cameraInfo = new Lilium.Controls.Label("Camera Pos", () => Position.ToString("0.000"));
            var button = new Lilium.Controls.Button("Front", () =>
            {
                CameraYaw = 0;
                CameraPitch = 0;
            });
            var sliderx = new Lilium.Controls.Slider("Focus Point X", -10, 10, () => FocusPoint.X, val => FocusPoint.X = val);
            var slidery = new Lilium.Controls.Slider("Focus Point Y", -10, 10, () => FocusPoint.Y, val => FocusPoint.Y = val);
            var sliderz = new Lilium.Controls.Slider("Focus Point Z", -10, 10, () => FocusPoint.Z, val => FocusPoint.Z = val);

            //var clearColor = new Lilium.Controls.ColorPicker("Clear Color", () => ClearColor.ToVector4(), val => ClearColor = new Color(val));
            var sky1 = new Lilium.Controls.ColorPicker("Sky Bottom", () => SkyBottomColor, val => SkyBottomColor = val);
            var sky2 = new Lilium.Controls.ColorPicker("Sky Top", () => SkyTopColor, val => SkyTopColor = val);

            controls = new Controls.Control[] { cameraInfo, button, sliderx, slidery, sliderz, sky1, sky2 };
        }
コード例 #2
0
ファイル: Light.cs プロジェクト: woncomp/LiliumLab
 void CreateControls()
 {
     var lightInfo = new Lilium.Controls.Label("Light Dir", () => LightDirection.ToString("0.000"));
     var lightSlider = new Lilium.Controls.Slider("Light Distance", 1, 100, () => LightDistance, val => LightDistance = val);
     var lightToggle = new Lilium.Controls.Toggle("Draw Light", () => DrawLight, val => DrawLight = val);
     var ambient = new Lilium.Controls.ColorPicker("Ambient Color", () => AmbientColor, val => AmbientColor = val);
     var diffuse = new Lilium.Controls.ColorPicker("Diffuse Color", () => DiffuseColor, val => DiffuseColor = val);
     controls = new Controls.Control[] { lightInfo, lightSlider, lightToggle, ambient, diffuse };
 }