private void TranslationControl(GVRSceneObject gvrWebViewSceneObjectFinal) {
        GVRScene mainScene = gvrContext.getMainScene();
        GVRCameraRig gvrCameraRig = mainScene.getMainCameraRig();
        initialCameralookAt = gvrCameraRig.getLookAt();

        gvrWebViewSceneObjectFinal.getTransform().getModelMatrix4f().getTranslation(translationObjectTranslationGlobal);
        gvrWebViewSceneObjectFinal.getTransform().getLocalModelMatrix4f().getTranslation(translationObjectTranslationLocal);

        if (gvrTextTranslationObject != null) {
            gvrTextTranslationObject.setTextColor(textColorIsActive);
        }
        webViewTranslation = true;

        for ( int i = 0; i < 3; i++ ) {
            if (i == 2) beginUIClickPos[i] = webPagePlusUIPosition[i] - cubeUIPosition[i];
            else beginUIClickPos[i] = webPagePlusUIPosition[i] + cubeUIPosition[i] + textTranslatePosition[i];
            diffWebPageUIClick[i] = beginUIClickPos[i] - webPagePlusUIPosition[i];
        }

        mOnDrawFrame = new DrawFrame();
        gvrContext.registerDrawFrameListener(mOnDrawFrame);
    }
private void TranslationControl ( GVRSceneObject gvrWebViewSceneObjectFinal ) { GVRScene mainScene = gvrContext . getMainScene ( ) ; GVRCameraRig gvrCameraRig = mainScene . getMainCameraRig ( ) ; initialCameralookAt = gvrCameraRig . getLookAt ( ) ; gvrWebViewSceneObjectFinal . getTransform ( ) . getModelMatrix4f ( ) . getTranslation ( translationObjectTranslationGlobal ) ; gvrWebViewSceneObjectFinal . getTransform ( ) . getLocalModelMatrix4f ( ) . getTranslation ( translationObjectTranslationLocal ) ; if ( gvrTextTranslationObject != null ) { gvrTextTranslationObject . setTextColor ( textColorIsActive ) ; } webViewTranslation = true ; for ( int i = 0 ; i < 3 ; i ++ ) { if ( i == 2 ) beginUIClickPos [ i ] = webPagePlusUIPosition [ i ] - cubeUIPosition [ i ] ; else beginUIClickPos [ i ] = webPagePlusUIPosition [ i ] + cubeUIPosition [ i ] + textTranslatePosition [ i ] ; diffWebPageUIClick [ i ] = beginUIClickPos [ i ] - webPagePlusUIPosition [ i ] ; } mOnDrawFrame = new DrawFrame ( ) ; gvrContext . registerDrawFrameListener ( mOnDrawFrame ) ; }
end WebPageTranformControls