Search in sources :

Example 1 with ModelLoader

use of com.badlogic.gdx.assets.loaders.ModelLoader in project libgdx by libgdx.

the class ImportTest method create.

@Override
public void create() {
    super.create();
    ModelLoader g3djLoader = new G3dModelLoader(new JsonReader());
    model = g3djLoader.loadModel(Gdx.files.internal("data/g3d/btscene1.g3dj"));
    disposables.add(model);
    importer = new MyImporter((btDynamicsWorld) world.collisionWorld);
    importer.loadFile(Gdx.files.internal("data/g3d/btscene1.bullet"));
    camera.position.set(10f, 15f, 20f);
    camera.up.set(0, 1, 0);
    camera.lookAt(-10, 8, 0);
    camera.update();
}
Also used : ModelLoader(com.badlogic.gdx.assets.loaders.ModelLoader) G3dModelLoader(com.badlogic.gdx.graphics.g3d.loader.G3dModelLoader) com.badlogic.gdx.physics.bullet.dynamics.btDynamicsWorld(com.badlogic.gdx.physics.bullet.dynamics.btDynamicsWorld) G3dModelLoader(com.badlogic.gdx.graphics.g3d.loader.G3dModelLoader) JsonReader(com.badlogic.gdx.utils.JsonReader)

Aggregations

ModelLoader (com.badlogic.gdx.assets.loaders.ModelLoader)1 G3dModelLoader (com.badlogic.gdx.graphics.g3d.loader.G3dModelLoader)1 com.badlogic.gdx.physics.bullet.dynamics.btDynamicsWorld (com.badlogic.gdx.physics.bullet.dynamics.btDynamicsWorld)1 JsonReader (com.badlogic.gdx.utils.JsonReader)1