Android Open Source - Cardboard Head Mounted Display






From Project

Back to project page Cardboard.

License

The source code is released under:

Apache License

If you think the Android project Cardboard listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.google.vrtoolkit.cardboard;
//www.  j  a v  a  2s  . co  m
import android.view.Display;

public class HeadMountedDisplay {
  private ScreenParams mScreen;
  private CardboardDeviceParams mCardboard;

  public HeadMountedDisplay(Display display) {
    this.mScreen = new ScreenParams(display);
    this.mCardboard = new CardboardDeviceParams();
  }

  public HeadMountedDisplay(HeadMountedDisplay hmd) {
    this.mScreen = new ScreenParams(hmd.mScreen);
    this.mCardboard = new CardboardDeviceParams(hmd.mCardboard);
  }

  public void setScreen(ScreenParams screen) {
    this.mScreen = new ScreenParams(screen);
  }

  public ScreenParams getScreen() {
    return this.mScreen;
  }

  public void setCardboard(CardboardDeviceParams cardboard) {
    this.mCardboard = new CardboardDeviceParams(cardboard);
  }

  public CardboardDeviceParams getCardboard() {
    return this.mCardboard;
  }

  public boolean equals(Object other) {
    if (other == null) {
      return false;
    }
    if (other == this) {
      return true;
    }
    if (!(other instanceof HeadMountedDisplay)) {
      return false;
    }
    HeadMountedDisplay o = (HeadMountedDisplay) other;

    return (this.mScreen.equals(o.mScreen))
        && (this.mCardboard.equals(o.mCardboard));
  }
}




Java Source Code List

com.google.vrtoolkit.cardboard.BuildConfig.java
com.google.vrtoolkit.cardboard.CardboardActivity.java
com.google.vrtoolkit.cardboard.CardboardDeviceParams.java
com.google.vrtoolkit.cardboard.CardboardView.java
com.google.vrtoolkit.cardboard.DistortionRenderer.java
com.google.vrtoolkit.cardboard.Distortion.java
com.google.vrtoolkit.cardboard.EyeParams.java
com.google.vrtoolkit.cardboard.EyeTransform.java
com.google.vrtoolkit.cardboard.FieldOfView.java
com.google.vrtoolkit.cardboard.HeadMountedDisplay.java
com.google.vrtoolkit.cardboard.HeadTransform.java
com.google.vrtoolkit.cardboard.ScreenParams.java
com.google.vrtoolkit.cardboard.Viewport.java
com.google.vrtoolkit.cardboard.samples.treasurehunt.CardboardOverlayView.java
com.google.vrtoolkit.cardboard.samples.treasurehunt.MainActivity.java
com.google.vrtoolkit.cardboard.samples.treasurehunt.WorldLayoutData.java
com.google.vrtoolkit.cardboard.sensors.HeadTracker.java
com.google.vrtoolkit.cardboard.sensors.MagnetSensor.java
com.google.vrtoolkit.cardboard.sensors.NfcSensor.java
com.google.vrtoolkit.cardboard.sensors.internal.Matrix3x3d.java
com.google.vrtoolkit.cardboard.sensors.internal.OrientationEKF.java
com.google.vrtoolkit.cardboard.sensors.internal.So3Util.java
com.google.vrtoolkit.cardboard.sensors.internal.Vector3d.java