Exemplo n.º 1
0
  private final void initARViews() {
    sceneView = new OAARVRViewComponent(this, dataManager, sensorManager);

    initTouch();

    // Setup the ar view component, this implements our new vision of the way components work in
    // outdoor ar.
    arView = new ARViewComponent(this);
    if ((options & OPTION_DISABLE_CAMERA_BACKGROUND) != 0) arView.enableCameraBackground(false);
    arView.setDelayOnResume(700);
    arView.setSceneView(sceneView);
    arViewPlaceHolder.addView(
        arView,
        new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
  }
Exemplo n.º 2
0
  @Override
  protected void onPause() {
    Log.d("ARComponentBase", "onPause()");

    sensorManager.pause();
    sceneView.onPause();
    arView.onPause();

    super.onPause();
  }
Exemplo n.º 3
0
  @Override
  protected void onResume() {
    Log.d("ARComponentBase", "onResume()");
    super.onResume();

    arView.onResume();
    sceneView.onResume();
    sensorManager.resume();

    /*/ // no use
    Handler handler = new Handler();
    handler.postDelayed(new Runnable() {

    	@Override
    	public void run() {
    		sceneView.bringToFront();
    		if(compassView != null) compassView.bringToFront();
    	}

    }, 2500);
    /**/
  }
Exemplo n.º 4
0
 public final void enableCameraBackground(boolean enable) {
   if (arView != null) arView.enableCameraBackground(enable);
 }