Ejemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_create_task_find_and_answer_addtoscene_cardboard);

    ctx = this;

    cardboardView = (CardboardView) findViewById(R.id.cardboardView_findAndAnswerCreateTask);
    cardboardView.setRestoreGLStateEnabled(false);
    cardboardView.setRenderer(this);
    setCardboardView(cardboardView);

    mCamera = new float[16];
    mView = new float[16];
    mModelCube = new float[16];
    headView = new float[16];
    cameraFloat = new float[16];

    modelView = new float[16];

    modelViewProjection = new float[16];

    color = new float[] {1.0f, 0.0f, 0.0f, 1.0f};
    mVibrator = (Vibrator) this.getSystemService(Context.VIBRATOR_SERVICE);
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_cardboardui);
   CardboardView cardboardView = (CardboardView) findViewById(R.id.cardboard_view);
   cardboardView.setRenderer(this);
   setCardboardView(cardboardView);
   setConvertTapIntoTrigger(true);
 }
Ejemplo n.º 3
0
  /**
   * Sets the view to our CardboardView and initializes the transformation matrices we will use to
   * render our scene.
   *
   * @param savedInstanceState
   */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.common_ui);
    cardboardView = (CardboardView) findViewById(R.id.cardboard_view);
    cardboardView.setRenderer(this);
    setCardboardView(cardboardView);

    mCamera = new float[16];
    mView = new float[16];

    mOverlayView = (CardboardOverlayView) findViewById(R.id.overlay);
    mOverlayView.show3DToast("Not every day is Purim.");
  }
  /**
   * Sets the view to our CardboardView and initializes the transformation matrices we will use to
   * render our scene.
   *
   * @param savedInstanceState
   */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.common_ui);
    cardboardView = (CardboardView) findViewById(R.id.cardboard_view);
    cardboardView.setRenderer(this);
    setCardboardView(cardboardView);

    //        mModelCube = new float[16];
    mCamera = new float[16];
    mView = new float[16];
    //        mModelViewProjection = new float[16];
    //        mModelView = new float[16];
    //        mModelFloor = new float[16];
    //        mHeadView = new float[16];
    //        mVibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
    //
    //
    mOverlayView = (CardboardOverlayView) findViewById(R.id.overlay);
    mOverlayView.show3DToast("Pull the magnet when you find an object.");
  }