示例#1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    options = setupOptions();

    LoadingThread.OLD_MODEL_ORIENTATION_FIX = false;
    MTLOBJLoader.loadFromLocalAssets(getApplicationContext());
    dataManager = setupDataManager();
    sensorManager = setupSensorManager();

    setupScenes(dataManager);

    arViewPlaceHolder = new RelativeLayout(this);
    setupUILayout(arViewPlaceHolder);

    initARViews();

    // setup compass
    setupCompass(); // we create it anyway to show if needed later
    if ((options & OAARComponentBase.OPTION_HIDE_COMPASS_VIEW) != 0)
      compassView.setWillNotDraw(true);

    initScenes();
  }
示例#2
0
  // initialization called from constructors
  private final void init(Context context) {
    // set context to access assets from
    assetsContext = context;

    // tell the model loader to read from the assets
    MTLOBJLoader.loadFromLocalAssets(assetsContext);

    // try to set the scenes file to default files
    if (!setScenesFile(OADataManagerAssets.DEFAULT_XML_SCENES_FILE))
      setScenesFile(OADataManagerAssets.DEFAULT_DB_SCENES_FILE);
  }