Exemplo n.º 1
0
        private void UnapplyCameraSceneRotation(/* final */ TouchEvent pCameraSceneTouchEvent)
        {
            /* final */
            float cameraSceneRotation = -this.mCameraSceneRotation;

            if (cameraSceneRotation != 0)
            {
                //VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_X] = pCameraSceneTouchEvent.getX();
                VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_X] = pCameraSceneTouchEvent.X;
                //VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_Y] = pCameraSceneTouchEvent.getY();
                VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_Y] = pCameraSceneTouchEvent.Y;

                MathUtils.RevertRotateAroundCenter(VERTICES_TOUCH_TMP, cameraSceneRotation, (this.mMaxX - this.mMinX) * 0.5f, (this.mMaxY - this.mMinY) * 0.5f);

                pCameraSceneTouchEvent.Set(VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_X], VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_Y]);
            }
        }
Exemplo n.º 2
0
        private void UnapplySceneRotation(/* final */ TouchEvent pSceneTouchEvent)
        {
            /* final */
            float rotation = this.mRotation;

            if (rotation != 0)
            {
                //VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_X] = pSceneTouchEvent.getX();
                VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_X] = pSceneTouchEvent.X;
                //VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_Y] = pSceneTouchEvent.getY();
                VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_Y] = pSceneTouchEvent.Y;

                //MathUtils.revertRotateAroundCenter(VERTICES_TOUCH_TMP, rotation, this.getCenterX(), this.getCenterY());
                MathUtils.RevertRotateAroundCenter(VERTICES_TOUCH_TMP, rotation, this.CenterX, this.CenterY);

                pSceneTouchEvent.Set(VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_X], VERTICES_TOUCH_TMP[Constants.VERTEX_INDEX_Y]);
            }
        }