Beispiel #1
0
        public void OnMouseMove(object sender, MouseEventArgs e)
        {
            if (_dragging)
            {
                float dx = (float)(e.Y - _oldy) / 50;
                float dy = (float)(_oldx - e.X) / 50;

                if (_controlkey == true)
                {
                    _scene.defaultCamera.shift(0, 0, dx);
                }
                else
                {
                    _scene.rotate(dx, dy, 0);
                }


                _scene.render();

                _oldx = e.X;
                _oldy = e.Y;

                Refresh();
            }
        }
Beispiel #2
0
        public bool RotateScene(warp_Quaternion quat, float x, float y, float z)
        {
            if (_scene == null)
            {
                return(false);
            }

            _scene.rotate(quat, x, y, z);

            return(true);
        }
Beispiel #3
0
        public bool RotateScene(warp_Quaternion quat)
        {
            if (_scene == null)
            {
                return(false);
            }

            _scene.rotate(quat);

            return(true);
        }