public void initScene() {
    scene.lights().add(new Light());

    mSkyBox = new SkyBox(5.0f, 2);
    mSkyBox.addTexture(SkyBox.Face.North, R.drawable.wood_back, "north");
    mSkyBox.addTexture(SkyBox.Face.East, R.drawable.wood_right, "east");
    mSkyBox.addTexture(SkyBox.Face.South, R.drawable.wood_back, "south");
    mSkyBox.addTexture(SkyBox.Face.West, R.drawable.wood_left, "west");
    mSkyBox.addTexture(SkyBox.Face.Up, R.drawable.ceiling, "up");
    mSkyBox.addTexture(SkyBox.Face.Down, R.drawable.floor, "down");
    mSkyBox.scale().y = 0.8f;
    mSkyBox.scale().z = 2.0f;
    scene.addChild(mSkyBox);

    IParser parser =
        Parser.createParser(
            Parser.Type.MAX_3DS, getResources(), "min3d.sampleProject1:raw/monster_high", true);
    parser.parse();

    mMonster = parser.getParsedObject();
    mMonster.scale().x = mMonster.scale().y = mMonster.scale().z = .1f;
    mMonster.position().y = -2.5f;
    mMonster.position().z = -3;
    scene.addChild(mMonster);

    mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_UI);
  }
  public void initScene() {
    scene.lights().add(new Light());

    IParser parser =
        Parser.createParser(
            Parser.Type.MD2, getResources(), "min3d.sampleProject1:raw/ogro", false);
    parser.parse();

    ogre = parser.getParsedAnimationObject();
    ogre.scale().x = ogre.scale().y = ogre.scale().z = .07f;
    ogre.rotation().z = -90;
    ogre.rotation().x = -90;
    scene.addChild(ogre);
    ogre.setFps(70);
  }
Ejemplo n.º 3
0
  public static void loadBackGroundImage(Scene scene) {
    if (background == null) {
      IParser parser =
          Parser.createParser(
              Parser.Type.OBJ, Shared.context().getResources(), "com.knb:raw/background_obj", true);
      parser.parse();
      background = parser.getParsedObject();
      background.scale().x = background.scale().y = background.scale().z = SBStore.BACKGROUND_SCALE;
      background.position().z = -1.99f;
    }

    if (scene != null) {

      scene.addChild(background);
    }
  }
Ejemplo n.º 4
0
  @Override
  public void initScene() {

    scene.lights().add(new Light());

    IParser parser =
        Parser.createParser(
            Parser.Type.MAX_3DS, getResources(), "min3d.sampleProject1:raw/monster_high", false);
    parser.parse();

    monster = parser.getParsedObject();
    monster.scale().x = monster.scale().y = monster.scale().z = .5f;
    monster.position().y = -10;
    scene.addChild(monster);

    scene.camera().target = monster.position();
  }
  public void initScene() {
    scene.lights().add(new Light());

    // scene.backgroundColor().setAll(0xff444444);

    IParser parser =
        Parser.createParser(
            Parser.Type.MAX_3DS,
            getResources(),
            "com.razortooth.ikimono.proto:raw/monster_high",
            false);
    parser.parse();

    objModel = parser.getParsedObject();
    objModel.scale().x = objModel.scale().y = objModel.scale().z = .1f;
    scene.addChild(objModel);
  }