Rotates a camera on a sphere, whose center is camera's Target.

Just like a satellite moves around a fixed star.

Наследование: Manipulater, IMouseHandler
Пример #1
0
        private void ScientificCanvas_Load(object sender, EventArgs e)
        {
            var camera = new Camera(new vec3(4, 1.6f, 3), new vec3(0, 0, 0), new vec3(0, 1, 0),
                 CameraType.Perspecitive, this.Width, this.Height);
            var cameraManipulater = new SatelliteManipulater();
            cameraManipulater.Bind(camera, this);
            this.cameraManipulater = cameraManipulater;

            this.Scene = new Scene(camera, this);
            //this.Scene.Cursor.Enabled = false;
            {
                var uiAxis = new UIAxis(AnchorStyles.Left | AnchorStyles.Bottom,
                    new Padding(10, 10, 10, 10), new Size(128, 128));
                uiAxis.Initialize();
                //// display this UI control's area.
                //uiAxis.StateList.Add(new ClearColorState());
                this.Axis = uiAxis;
                this.Scene.RootUI.Children.Add(uiAxis);
            }
            {
                var uiColorPalette = new UIColorPaletteRenderer(100,
                    CodedColor.GetDefault(),
                    AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right,
                    new Padding(148, 10, 60, 10 + 40), new Size(400, 40), -100, 100);
                uiColorPalette.Initialize();
                this.ColorPalette = uiColorPalette;
                this.Scene.RootUI.Children.Add(uiColorPalette);
            }
            this.Resize += this.Scene.Resize;
            this.OpenGLDraw += ScientificCanvas_OpenGLDraw;
            //this.MouseDown += ScientificCanvas_MouseDown;
            //this.MouseMove += ScientificCanvas_MouseMove;
            //this.MouseUp += ScientificCanvas_MouseUp;
            //this.MouseWheel += ScientificCanvas_MouseWheel;
        }