亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dxmutmisc.cs

?? VC中使用C#作為腳本引擎編程
?? CS
?? 第 1 頁 / 共 5 頁
字號:
        /// </summary>
        public void OnMove(int x, int y)
        {
            if (isDragging)
            {
                currentPt = ScreenToVector((float)x, (float)y);
                nowQuat = downQuat * QuaternionFromBallPoints(downPt, currentPt);
            }
        }
        /// <summary>
        /// Done dragging the arcball
        /// </summary>
        public void OnEnd()
        {
            isDragging = false;
        }

        /// <summary>
        /// Handle messages from the window
        /// </summary>
        public bool HandleMessages(IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
        {
            // Current mouse position
            short mouseX = NativeMethods.LoWord((uint)lParam.ToInt32());
            short mouseY = NativeMethods.HiWord((uint)lParam.ToInt32());

            switch(msg)
            {
                case NativeMethods.WindowMessage.LeftButtonDown:
                case NativeMethods.WindowMessage.LeftButtonDoubleClick:
                    // Set capture
                    NativeMethods.SetCapture(hWnd);
                    OnBegin(mouseX, mouseY);
                    return true;
                case NativeMethods.WindowMessage.LeftButtonUp:
                    // Release capture
                    NativeMethods.ReleaseCapture();
                    OnEnd();
                    return true;

                case NativeMethods.WindowMessage.RightButtonDown:
                case NativeMethods.WindowMessage.RightButtonDoubleClick:
                case NativeMethods.WindowMessage.MiddleButtonDown:
                case NativeMethods.WindowMessage.MiddleButtonDoubleClick:
                    // Set capture
                    NativeMethods.SetCapture(hWnd);
                    // Store off the position of the cursor
                    lastMousePosition = new System.Drawing.Point(mouseX, mouseY);
                    return true;

                case NativeMethods.WindowMessage.RightButtonUp:
                case NativeMethods.WindowMessage.MiddleButtonUp:
                    // Release capture
                    NativeMethods.ReleaseCapture();
                    return true;

                case NativeMethods.WindowMessage.MouseMove:
                    short buttonState = NativeMethods.LoWord((uint)wParam.ToInt32());
                    bool leftButton = ((buttonState & (short)NativeMethods.MouseButtons.Left) != 0);
                    bool rightButton = ((buttonState & (short)NativeMethods.MouseButtons.Right) != 0);
                    bool middleButton = ((buttonState & (short)NativeMethods.MouseButtons.Middle) != 0);

                    if (leftButton)
                    {
                        OnMove(mouseX, mouseY);
                    }
                    else if (rightButton || middleButton)
                    {
                        // Normalize based on size of window and bounding sphere radius
                        float deltaX = (lastMousePosition.X - mouseX) * radiusTranslation / width;
                        float deltaY = (lastMousePosition.Y - mouseY) * radiusTranslation / height;

                        if (rightButton)
                        {
                            translationDelta = Matrix.Translation(-2*deltaX,2*deltaY, 0.0f);
                            translation *= translationDelta;
                        }
                        else // Middle button
                        {
                            translationDelta = Matrix.Translation(0.0f, 0.0f, 5*deltaY);
                            translation *= translationDelta;
                        }
                        // Store off the position of the cursor
                        lastMousePosition = new System.Drawing.Point(mouseX, mouseY);
                    }
                    return true;
            }

            return false;
        }
    }
    #endregion

    #region Cameras
    /// <summary>
    /// Used to map keys to the camera
    /// </summary>
    public enum CameraKeys : byte
    {
        StrafeLeft,
        StrafeRight,
        MoveForward,
        MoveBackward,
        MoveUp,
        MoveDown,
        Reset,
        ControlDown,
        MaxKeys,
        Unknown=0xff
    }

    /// <summary>
    /// Mouse button mask values
    /// </summary>
    [Flags]
    public enum MouseButtonMask : byte
    {
        None = 0,
        Left = 0x01,
        Middle = 0x02,
        Right = 0x04,
        Wheel = 0x08,
    }

    /// <summary>
    /// Simple base camera class that moves and rotates.  The base class
    /// records mouse and keyboard input for use by a derived class, and 
    /// keeps common state.
    /// </summary>
    public abstract class Camera
    {
        /// <summary>
        /// Maps NativeMethods.WindowMessage.Key* msg to a camera key
        /// </summary>
        protected static CameraKeys MapKey(IntPtr param)
        {
            System.Windows.Forms.Keys key = (System.Windows.Forms.Keys)param.ToInt32();
            switch(key)
            {
                case System.Windows.Forms.Keys.ControlKey: return CameraKeys.ControlDown;
                case System.Windows.Forms.Keys.Left: return CameraKeys.StrafeLeft;
                case System.Windows.Forms.Keys.Right: return CameraKeys.StrafeRight;
                case System.Windows.Forms.Keys.Up: return CameraKeys.MoveForward;
                case System.Windows.Forms.Keys.Down: return CameraKeys.MoveBackward;
                case System.Windows.Forms.Keys.Prior: return CameraKeys.MoveUp; // pgup
                case System.Windows.Forms.Keys.Next: return CameraKeys.MoveDown; // pgdn

                case System.Windows.Forms.Keys.A: return CameraKeys.StrafeLeft;
                case System.Windows.Forms.Keys.D: return CameraKeys.StrafeRight;
                case System.Windows.Forms.Keys.W: return CameraKeys.MoveForward;
                case System.Windows.Forms.Keys.S: return CameraKeys.MoveBackward;
                case System.Windows.Forms.Keys.Q: return CameraKeys.MoveUp; 
                case System.Windows.Forms.Keys.E: return CameraKeys.MoveDown; 

                case System.Windows.Forms.Keys.NumPad4: return CameraKeys.StrafeLeft;
                case System.Windows.Forms.Keys.NumPad6: return CameraKeys.StrafeRight;
                case System.Windows.Forms.Keys.NumPad8: return CameraKeys.MoveForward;
                case System.Windows.Forms.Keys.NumPad2: return CameraKeys.MoveBackward;
                case System.Windows.Forms.Keys.NumPad9: return CameraKeys.MoveUp; 
                case System.Windows.Forms.Keys.NumPad3: return CameraKeys.MoveDown; 

                case System.Windows.Forms.Keys.Home: return CameraKeys.Reset; 
            }
            // No idea
            return (CameraKeys)byte.MaxValue;
        }


        #region Instance Data
        protected Matrix viewMatrix; // View Matrix
        protected Matrix projMatrix; // Projection matrix

        protected System.Drawing.Point lastMousePosition;  // Last absolute position of mouse cursor
        protected bool isMouseLButtonDown;    // True if left button is down 
        protected bool isMouseMButtonDown;    // True if middle button is down 
        protected bool isMouseRButtonDown;    // True if right button is down 
        protected int currentButtonMask;   // mask of which buttons are down
        protected int mouseWheelDelta;     // Amount of middle wheel scroll (+/-) 
        protected Vector2 mouseDelta;          // Mouse relative delta smoothed over a few frames
        protected float framesToSmoothMouseData; // Number of frames to smooth mouse data over

        protected Vector3 defaultEye;          // Default camera eye position
        protected Vector3 defaultLookAt;       // Default LookAt position
        protected Vector3 eye;                 // Camera eye position
        protected Vector3 lookAt;              // LookAt position
        protected float cameraYawAngle;      // Yaw angle of camera
        protected float cameraPitchAngle;    // Pitch angle of camera

        protected System.Drawing.Rectangle dragRectangle; // Rectangle within which a drag can be initiated.
        protected Vector3 velocity;            // Velocity of camera
        protected bool isMovementDrag;        // If true, then camera movement will slow to a stop otherwise movement is instant
        protected Vector3 velocityDrag;        // Velocity drag force
        protected float dragTimer;           // Countdown timer to apply drag
        protected float totalDragTimeToZero; // Time it takes for velocity to go from full to 0
        protected Vector2 rotationVelocity;         // Velocity of camera

        protected float fieldOfView;                 // Field of view
        protected float aspectRatio;              // Aspect ratio
        protected float nearPlane;           // Near plane
        protected float farPlane;            // Far plane

        protected float rotationScaler;      // Scaler for rotation
        protected float moveScaler;          // Scaler for movement

        protected bool isInvertPitch;         // Invert the pitch axis
        protected bool isEnablePositionMovement; // If true, then the user can translate the camera/model 
        protected bool isEnableYAxisMovement; // If true, then camera can move in the y-axis

        protected bool isClipToBoundary;      // If true, then the camera will be clipped to the boundary
        protected Vector3 minBoundary;         // Min point in clip boundary
        protected Vector3 maxBoundary;         // Max point in clip boundary

        protected bool isResetCursorAfterMove;// If true, the class will reset the cursor position so that the cursor always has space to move 

        // State of the input
        protected bool[] keys;
        public static readonly Vector3 UpDirection = new Vector3(0,1,0);
        #endregion

        #region Simple Properties
        /// <summary>Is the camera being 'dragged' at all?</summary>
        public bool IsBeingDragged { get { return (isMouseLButtonDown || isMouseMButtonDown || isMouseRButtonDown); } }
        /// <summary>Is the left mouse button down</summary>
        public bool IsMouseLeftButtonDown { get { return isMouseLButtonDown; } }
        /// <summary>Is the right mouse button down</summary>
        public bool IsMouseRightButtonDown { get { return isMouseRButtonDown; } }
        /// <summary>Is the middle mouse button down</summary>
        public bool IsMouseMiddleButtonDown { get { return isMouseMButtonDown; } }
        /// <summary>Returns the view transformation matrix</summary>
        public Matrix ViewMatrix { get { return viewMatrix; } }
        /// <summary>Returns the projection transformation matrix</summary>
        public Matrix ProjectionMatrix { get { return projMatrix; } }
        /// <summary>Returns the location of the eye</summary>
        public Vector3 EyeLocation { get { return eye; } }
        /// <summary>Returns the look at point of the camera</summary>
        public Vector3 LookAtPoint { get { return lookAt; } }
        /// <summary>Is position movement enabled</summary>
        public bool IsPositionMovementEnabled { get {return isEnablePositionMovement; } set { isEnablePositionMovement = value; } }
        #endregion
        
        /// <summary>
        /// Abstract method to control camera during frame move
        /// </summary>
        public abstract void FrameMove(float elapsedTime);

        /// <summary>
        /// Constructor for the base camera class (Sets up camera defaults)
        /// </summary>
        protected Camera()
        {
            // Create the keys
            keys = new bool[(int)CameraKeys.MaxKeys];

            // Set attributes for the view matrix
            eye = Vector3.Empty;
            lookAt = new Vector3(0.0f, 0.0f, 1.0f);

            // Setup the view matrix
            SetViewParameters(eye, lookAt);

            // Setup the projection matrix
            SetProjectionParameters((float)Math.PI / 4, 1.0f, 1.0f, 1000.0f);

            // Store mouse information
            lastMousePosition = System.Windows.Forms.Cursor.Position;
            isMouseLButtonDown = false;
            isMouseRButtonDown = false;
            isMouseMButtonDown = false;
            mouseWheelDelta = 0;
            currentButtonMask = 0;

            // Setup camera rotations
            cameraYawAngle = 0.0f;
            cameraPitchAngle = 0.0f;

            dragRectangle = new System.Drawing.Rectangle(0, 0, int.MaxValue, int.MaxValue);
            velocity = Vector3.Empty;
            isMovementDrag = false;
            velocityDrag = Vector3.Empty;
            dragTimer = 0.0f;
            totalDragTimeToZero = 0.25f;
            rotationVelocity = Vector2.Empty;
            rotationScaler = 0.1f;
            moveScaler = 5.0f;
            isInvertPitch = false;
            isEnableYAxisMovement = true;
            isEnablePositionMovement = true;
            mouseDelta = Vector2.Empty;
            framesToSmoothMouseData = 2.0f;
            isClipToBoundary = false;
            minBoundary = new Vector3(-1.0f,-1.0f, -1.0f);
            maxBoundary = new Vector3(1,1,1);
            isResetCursorAfterMove = false;
        }

        /// <summary>
        /// Call this from your message proc so this class can handle window messages
        /// </summary>
        public virtual bool HandleMessages(IntPtr hWnd, NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
        {
            switch(msg)
            {
                // Handle the keyboard
                case NativeMethods.WindowMessage.KeyDown:
                    CameraKeys mappedKeyDown = MapKey(wParam);
                    if (mappedKeyDown != (CameraKeys)byte.MaxValue)
                    {
                        // Valid key was pressed, mark it as 'down'
                        keys[(int)mappedKeyDown] = true;
                    }
                    break;
                case NativeMethods.WindowMessage.KeyUp:
                    CameraKeys mappedKeyUp = MapKey(wParam);
                    if (mappedKeyUp != (CameraKeys)byte.MaxValue)
                    {
                        // Valid key was let go, mark it as 'up'
                        keys[(int)mappedKeyUp] = false;
                    }
                    break;

                // Handle the mouse
                case NativeMethods.WindowMessage.LeftButtonDoubleClick:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
4438x亚洲最大成人网| 成人av电影在线观看| 亚洲影院理伦片| 亚洲免费在线观看视频| 亚洲欧美影音先锋| 中文字幕一区二区不卡| 综合色中文字幕| 亚洲精品视频观看| 亚洲6080在线| 免费成人在线视频观看| 国产一区二区主播在线| 国产高清成人在线| 国产91对白在线观看九色| 福利一区二区在线| 色就色 综合激情| 欧美高清激情brazzers| 欧美va日韩va| 中文欧美字幕免费| 亚洲情趣在线观看| 婷婷激情综合网| 国产一区福利在线| 91免费在线看| 日韩视频一区在线观看| 久久婷婷久久一区二区三区| 中文字幕乱码久久午夜不卡| 中文字幕不卡一区| 亚洲一级电影视频| 另类综合日韩欧美亚洲| 北岛玲一区二区三区四区| 在线观看国产91| 久久久精品天堂| 亚洲线精品一区二区三区八戒| 日韩成人精品在线观看| 成人黄色软件下载| 91精品一区二区三区久久久久久| 久久免费看少妇高潮| 亚洲综合在线观看视频| 国产成人亚洲综合a∨猫咪| 91福利视频网站| 精品久久久久久久久久久久久久久 | 亚洲欧美日韩人成在线播放| 日韩中文字幕亚洲一区二区va在线 | 日韩影院精彩在线| 成人免费高清视频在线观看| 欧美另类变人与禽xxxxx| 国产精品情趣视频| 麻豆精品在线视频| 欧美色图天堂网| 国产亚洲欧美日韩在线一区| 日日摸夜夜添夜夜添亚洲女人| 国产不卡高清在线观看视频| 欧美欧美欧美欧美首页| 国产精品色呦呦| 国产一区二区三区四区在线观看| 欧美亚洲精品一区| 国产精品久久午夜夜伦鲁鲁| 精品伊人久久久久7777人| 欧美在线免费视屏| 一区在线中文字幕| 成人激情免费网站| 久久久亚洲综合| 狠狠色2019综合网| 日韩免费观看高清完整版| 午夜精品视频一区| 欧美精品在线一区二区三区| 亚洲日本欧美天堂| www.一区二区| 国产精品人妖ts系列视频 | 亚洲国产成人在线| 国产尤物一区二区| 久久久久久**毛片大全| 国产资源精品在线观看| 精品国产第一区二区三区观看体验| 日韩av中文字幕一区二区三区| 日本韩国欧美三级| 亚洲精品高清视频在线观看| av在线综合网| 亚洲精品第1页| 欧美日精品一区视频| 亚洲一区二区av在线| 欧美伦理视频网站| 天天操天天干天天综合网| 欧美精品乱码久久久久久按摩| 亚洲成人黄色影院| 欧美一区二区三区性视频| 石原莉奈在线亚洲三区| 91精品国产aⅴ一区二区| 麻豆成人av在线| 26uuu色噜噜精品一区二区| 国产精华液一区二区三区| 国产精品免费人成网站| 日本电影亚洲天堂一区| 青娱乐精品在线视频| 国产喂奶挤奶一区二区三区| 波多野结衣中文字幕一区| 一区二区三区免费网站| 制服丝袜在线91| 国产一区二区不卡老阿姨| 中文字幕一区二区三区在线不卡| 在线亚洲一区二区| 老司机精品视频导航| 中国av一区二区三区| 欧美色图在线观看| 国产精品自拍一区| 亚洲一区二区3| 久久久久久久久久久久久久久99| 99视频在线观看一区三区| 日韩和欧美的一区| 亚洲国产激情av| 337p亚洲精品色噜噜| 成人中文字幕在线| 日本va欧美va精品发布| 《视频一区视频二区| 日韩欧美成人一区| 色婷婷综合在线| 国产一区二区三区电影在线观看| 亚洲精品国产一区二区精华液| 精品少妇一区二区三区在线视频| 99国内精品久久| 黄色小说综合网站| 亚洲一二三区在线观看| 欧美激情在线看| 欧美成人激情免费网| 欧美曰成人黄网| 国产99精品国产| 国产在线视频一区二区三区| 亚洲乱码国产乱码精品精98午夜| 久久婷婷成人综合色| 欧美精品一二三| 91久久精品国产91性色tv| 成人免费毛片片v| 精品在线免费观看| 青青草国产精品亚洲专区无| 一区二区三区在线视频免费观看| 日本一区二区三区免费乱视频| 日韩欧美综合一区| 欧美日韩一本到| 欧美在线看片a免费观看| 91丨九色porny丨蝌蚪| 成人小视频免费观看| 国产在线日韩欧美| 久久精品国产精品亚洲精品| 日本女人一区二区三区| 日韩高清不卡在线| 日韩精品一级二级| 奇米精品一区二区三区四区 | 久久只精品国产| 日韩欧美一区在线| 欧美一个色资源| 91精品国产综合久久国产大片| 在线视频综合导航| 欧美日韩中文字幕精品| 欧美在线视频你懂得| 一本大道久久a久久精二百| 色综合一个色综合亚洲| 日本精品视频一区二区三区| 日本韩国欧美在线| 欧美日韩日日骚| 日韩亚洲欧美在线| 精品国产露脸精彩对白| 久久九九影视网| 亚洲欧洲美洲综合色网| 一区二区三区蜜桃| 天天综合天天做天天综合| 另类小说色综合网站| 国产高清亚洲一区| 99精品久久只有精品| 欧美日韩一区二区在线视频| 欧美一区二区三区播放老司机| 欧美r级电影在线观看| 国产情人综合久久777777| 日韩毛片一二三区| 午夜视频在线观看一区| 奇米888四色在线精品| 国产不卡视频在线播放| 色94色欧美sute亚洲线路一久| 欧美日韩一区高清| 久久久久久久综合色一本| 亚洲精品视频在线看| 久久综合综合久久综合| 成人精品gif动图一区| 欧美性做爰猛烈叫床潮| 久久久久久久久久久电影| 一区二区三区四区视频精品免费| 丝袜亚洲另类丝袜在线| 国产精品亚洲一区二区三区在线 | 日韩一区二区三区视频在线| 国产亚洲精品中文字幕| 亚洲电影在线播放| 国产精品正在播放| 欧美少妇一区二区| 久久久九九九九| 五月天中文字幕一区二区| 国产精品一区二区黑丝| 欧美浪妇xxxx高跟鞋交| 亚洲欧美中日韩| 国产精品亚洲午夜一区二区三区| 欧美综合亚洲图片综合区| 国产亚洲欧洲一区高清在线观看| 一区二区高清在线|